Merge remote-tracking branch 'upstream/master' into R1.4.0-improvements
This commit is contained in:
commit
f350b0d17c
23 changed files with 117 additions and 47 deletions
|
@ -62,6 +62,12 @@ public class EventHookContainer
|
|||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/monk.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/monk.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/crack.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/crack.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/tearing.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/tearing.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/rift.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/rift.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftStart.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftStart.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftEnd.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftEnd.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftClose.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftClose.ogg")));
|
||||
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftDoor.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftDoor.ogg")));
|
||||
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
|
||||
import StevenDimDoors.mod_pocketDim.items.ItemRiftBlade;
|
||||
import StevenDimDoors.mod_pocketDim.items.itemDimDoor;
|
||||
import StevenDimDoors.mod_pocketDim.world.LimboProvider;
|
||||
import StevenDimDoors.mod_pocketDim.world.pocketProvider;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
@ -158,7 +159,7 @@ public class RiftGenerator implements IWorldGenerator
|
|||
}
|
||||
|
||||
//Place the shiny transient door into a dungeon
|
||||
ItemRiftBlade.placeDoorBlock(world, x, y + 1, z, 0, mod_pocketDim.transientDoor);
|
||||
itemDimDoor.placeDoorBlock(world, x, y + 1, z, 0, mod_pocketDim.transientDoor);
|
||||
|
||||
//Build the columns around the door
|
||||
world.setBlock(x, y + 1, z - 1, blockID, 0, 3);
|
||||
|
|
|
@ -31,6 +31,7 @@ public class TileEntityRift extends TileEntity
|
|||
public boolean isNearRift=false;
|
||||
private int count=200;
|
||||
private int count2 = 0;
|
||||
private int soundCount = 0;
|
||||
public LinkData nearestRiftData;
|
||||
Random rand = new Random();
|
||||
|
||||
|
@ -46,6 +47,10 @@ public class TileEntityRift extends TileEntity
|
|||
|
||||
if(count>200&&dimHelper.dimList.get(this.worldObj.provider.dimensionId)!=null)
|
||||
{
|
||||
if(rand.nextBoolean())
|
||||
{
|
||||
this.worldObj.playSound(xCoord, yCoord, zCoord, "mods.DimDoors.sfx.rift", (float) .7, 1,true);
|
||||
}
|
||||
nearestRiftData = dimHelper.dimList.get(this.worldObj.provider.dimensionId).findNearestRift(worldObj, 5, xCoord, yCoord, zCoord);
|
||||
if(nearestRiftData!=null)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumToolMaterial;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
@ -25,11 +27,11 @@ import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRiftBlade extends itemDimDoor
|
||||
public class ItemRiftBlade extends ItemSword
|
||||
{
|
||||
public ItemRiftBlade(int par1, Material par2Material)
|
||||
public ItemRiftBlade(int par1)
|
||||
{
|
||||
super(par1, par2Material);
|
||||
super(par1, EnumToolMaterial.GOLD);
|
||||
|
||||
// this.setTextureFile("/PocketBlockTextures.png");
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
|
@ -80,7 +82,7 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
|
||||
public int getDamageVsEntity(Entity par1Entity)
|
||||
{
|
||||
return 8;
|
||||
return 7;
|
||||
}
|
||||
|
||||
public MovingObjectPosition getMovingObjectPositionFromPlayer(World par1World, EntityPlayer par2EntityPlayer, boolean par3)
|
||||
|
@ -183,7 +185,7 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
int rotation = (int) (MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3);
|
||||
LinkData link = new LinkData(par2World.provider.dimensionId, 0, x, y, z, x, y, z, true,rotation);
|
||||
|
||||
if(this.getMaxItemUseDuration(par1ItemStack)-par4>12&&!par2World.isRemote&&this.canPlace(par2World, x, y, z, rotation))
|
||||
if(this.getMaxItemUseDuration(par1ItemStack)-par4>12&&!par2World.isRemote&&itemDimDoor.canPlace(par2World, x, y, z, rotation))
|
||||
{
|
||||
|
||||
if(dimHelper.dimList.get(par2World.provider.dimensionId)!=null)
|
||||
|
@ -197,7 +199,8 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
{
|
||||
dimHelper.instance.createPocket(link,true, false);
|
||||
}
|
||||
placeDoorBlock(par2World, x, y-1, z, rotation, mod_pocketDim.transientDoor);
|
||||
par3EntityPlayer.worldObj.playSoundAtEntity(par3EntityPlayer,"mods.DimDoors.sfx.riftDoor", (float) .6, 1);
|
||||
itemDimDoor.placeDoorBlock(par2World, x, y-1, z, rotation, mod_pocketDim.transientDoor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,14 +229,16 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
{
|
||||
int var12 = MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
|
||||
|
||||
if (!this.canPlace(par2World, par4, par5, par6, var12)||!this.canPlace(par2World, par4, par5-1, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5, par6, par2World)==null)
|
||||
if (!itemDimDoor.canPlace(par2World, par4, par5, par6, var12)||!itemDimDoor.canPlace(par2World, par4, par5-1, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5, par6, par2World)==null)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
placeDoorBlock(par2World, par4, par5-1, par6, var12, var11);
|
||||
itemDimDoor.placeDoorBlock(par2World, par4, par5-1, par6, var12, var11);
|
||||
par3EntityPlayer.worldObj.playSoundAtEntity(par3EntityPlayer,"mods.DimDoors.sfx.riftDoor", (float) .6, 1);
|
||||
|
||||
didFindThing=true;
|
||||
|
||||
|
||||
|
@ -299,17 +304,25 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
|
||||
}
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return EnumToolMaterial.GOLD.getEnchantability();
|
||||
}
|
||||
public String func_77825_f()
|
||||
{
|
||||
return EnumToolMaterial.GOLD.toString();
|
||||
}
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
{
|
||||
return EnumToolMaterial.GOLD.getEnchantability();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return EnumToolMaterial.GOLD.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return mod_pocketDim.itemStableFabric.itemID == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
{
|
||||
|
@ -325,25 +338,19 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
|
||||
|
||||
var11 = mod_pocketDim.transientDoor;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)&&!par3World.isRemote)
|
||||
{
|
||||
int var12 = MathHelper.floor_double((double)((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
|
||||
|
||||
if (!this.canPlace(par3World, par4, par5, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5+1, par6, par3World)==null)
|
||||
if (!itemDimDoor.canPlace(par3World, par4, par5, par6, var12)||dimHelper.instance.getLinkDataFromCoords(par4, par5+1, par6, par3World)==null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
placeDoorBlock(par3World, par4, par5, par6, var12, var11);
|
||||
itemDimDoor.placeDoorBlock(par3World, par4, par5, par6, var12, var11);
|
||||
par2EntityPlayer.worldObj.playSoundAtEntity(par2EntityPlayer,"mods.DimDoors.sfx.rift", (float) .6, 1);
|
||||
|
||||
|
||||
par1ItemStack.damageItem(10, par2EntityPlayer);
|
||||
|
|
|
@ -87,7 +87,9 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||
{
|
||||
dimHelper.instance.createLink(linkCoords[3], par3World.provider.dimensionId, linkCoords[0], linkCoords[1], linkCoords[2],par4, par5+offset, par6);
|
||||
}
|
||||
dimHelper.instance.createLink(par3World.provider.dimensionId, linkCoords[3], par4, par5+offset, par6, linkCoords[0], linkCoords[1], linkCoords[2]);
|
||||
dimHelper.instance.createLink(par3World.provider.dimensionId, linkCoords[3], par4, par5+offset, par6, linkCoords[0], linkCoords[1], linkCoords[2]);
|
||||
par2EntityPlayer.worldObj.playSoundAtEntity(par2EntityPlayer,"mods.DimDoors.sfx.riftEnd", (float) .6, 1);
|
||||
|
||||
par2EntityPlayer.sendChatToPlayer("Rift Created");
|
||||
}
|
||||
else if(!par3World.isRemote)
|
||||
|
@ -105,6 +107,8 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||
//otherwise, it creates the first half of the link. Next click will complete it.
|
||||
key= dimHelper.instance.createUniqueInterDimLinkKey();
|
||||
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId);
|
||||
par2EntityPlayer.worldObj.playSoundAtEntity(par2EntityPlayer,"mods.DimDoors.sfx.riftStart", (float) .6, 1);
|
||||
|
||||
par2EntityPlayer.sendChatToPlayer("Rift Signature Stored");
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -198,7 +198,7 @@ public class itemDimDoor extends ItemDoor
|
|||
|
||||
}
|
||||
|
||||
public boolean canPlace(World world,int i, int j, int k, int p)
|
||||
public static boolean canPlace(World world,int i, int j, int k, int p)
|
||||
{
|
||||
int id = world.getBlockId(i, j, k);
|
||||
|
||||
|
|
|
@ -147,13 +147,7 @@ public class itemLinkSignature extends Item
|
|||
--par1ItemStack.stackSize;
|
||||
par2EntityPlayer.sendChatToPlayer("Rift Created");
|
||||
par1ItemStack.stackTagCompound=null;
|
||||
/**
|
||||
else
|
||||
{
|
||||
par2EntityPlayer.sendChatToPlayer("Both ends of a single rift cannot exist in the same dimension.");
|
||||
|
||||
}
|
||||
**/
|
||||
par2EntityPlayer.worldObj.playSoundAtEntity(par2EntityPlayer,"mods.DimDoors.sfx.riftEnd", (float) .6, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -163,14 +157,9 @@ public class itemLinkSignature extends Item
|
|||
//otherwise, it creates the first half of the link. Next click will complete it.
|
||||
key= dimHelper.instance.createUniqueInterDimLinkKey();
|
||||
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId,orientation);
|
||||
|
||||
|
||||
|
||||
par2EntityPlayer.sendChatToPlayer("Rift Signature Stored");
|
||||
|
||||
|
||||
}
|
||||
|
||||
par2EntityPlayer.worldObj.playSoundAtEntity(par2EntityPlayer,"mods.DimDoors.sfx.riftStart", (float) .6, 1);
|
||||
}
|
||||
//dimHelper.instance.save();
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,8 @@ public class itemRiftRemover extends Item
|
|||
//System.out.println(hit.hitVec);
|
||||
if(dimHelper.instance.removeRift(par2World, hit.blockX, hit.blockY, hit.blockZ, 1, par3EntityPlayer, par1ItemStack))
|
||||
{
|
||||
|
||||
par3EntityPlayer.worldObj.playSoundAtEntity(par3EntityPlayer,"mods.DimDoors.sfx.riftClose", (float) .7, 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ public class mod_pocketDim
|
|||
itemRiftRemover = (new itemRiftRemover(properties.RiftRemoverItemID, Material.wood)).setUnlocalizedName("itemRiftRemover");
|
||||
itemStableFabric = (new ItemStableFabric(properties.StableFabricItemID, 0)).setUnlocalizedName("itemStableFabric");
|
||||
itemChaosDoor = (new ItemChaosDoor(properties.UnstableDoorItemID, Material.iron)).setUnlocalizedName("itemChaosDoor");
|
||||
itemRiftBlade = (new ItemRiftBlade(properties.RiftBladeItemID, Material.iron)).setUnlocalizedName("ItemRiftBlade");
|
||||
itemRiftBlade = (new ItemRiftBlade(properties.RiftBladeItemID)).setUnlocalizedName("ItemRiftBlade");
|
||||
itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(properties.StabilizedRiftSignatureItemID)).setUnlocalizedName("itemStabilizedRiftSig");
|
||||
|
||||
mod_pocketDim.limboBiome= (new BiomeGenLimbo(properties.LimboBiomeID));
|
||||
|
|
57
resources/mods/DimDoors/sfx/creeepysound.aup
Normal file
57
resources/mods/DimDoors/sfx/creeepysound.aup
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" standalone="no" ?>
|
||||
<!DOCTYPE project PUBLIC "-//audacityproject-1.3.0//DTD//EN" "http://audacity.sourceforge.net/xml/audacityproject-1.3.0.dtd" >
|
||||
<project xmlns="http://audacity.sourceforge.net/xml/" projname="creeepysound_data" version="1.3.0" audacityversion="2.0.3" sel0="2.8328344671" sel1="2.8328344671" vpos="0" h="0.0000000000" zoom="86.1328125000" rate="44100.0">
|
||||
<tags/>
|
||||
<wavetrack name="Audio Track" channel="0" linked="1" mute="0" solo="0" height="150" minimized="0" isSelected="0" rate="44100" gain="1.0" pan="0.0">
|
||||
<waveclip offset="0.00000000">
|
||||
<sequence maxsamples="262144" sampleformat="262159" numsamples="636928">
|
||||
<waveblock start="0">
|
||||
<simpleblockfile filename="e0000f7b.au" len="258048" min="-0.208184" max="0.177342" rms="0.031214"/>
|
||||
</waveblock>
|
||||
<waveblock start="258048">
|
||||
<simpleblockfile filename="e0000a54.au" len="258048" min="-0.003662" max="0.004272" rms="0.000371"/>
|
||||
</waveblock>
|
||||
<waveblock start="516096">
|
||||
<simpleblockfile filename="e0000fde.au" len="120832" min="-0.000061" max="0.000061" rms="0.000014"/>
|
||||
</waveblock>
|
||||
</sequence>
|
||||
<envelope numpoints="0"/>
|
||||
</waveclip>
|
||||
</wavetrack>
|
||||
<wavetrack name="Audio Track" channel="1" linked="0" mute="0" solo="0" height="150" minimized="0" isSelected="0" rate="44100" gain="1.0" pan="0.0">
|
||||
<waveclip offset="0.00000000">
|
||||
<sequence maxsamples="262144" sampleformat="262159" numsamples="636928">
|
||||
<waveblock start="0">
|
||||
<simpleblockfile filename="e0000d4e.au" len="258048" min="-0.16133" max="0.200306" rms="0.031537"/>
|
||||
</waveblock>
|
||||
<waveblock start="258048">
|
||||
<simpleblockfile filename="e000041b.au" len="258048" min="-0.003632" max="0.004272" rms="0.000371"/>
|
||||
</waveblock>
|
||||
<waveblock start="516096">
|
||||
<simpleblockfile filename="e000014d.au" len="120832" min="-0.000061" max="0.000061" rms="0.000014"/>
|
||||
</waveblock>
|
||||
</sequence>
|
||||
<envelope numpoints="0"/>
|
||||
</waveclip>
|
||||
</wavetrack>
|
||||
<wavetrack name="Audio Track" channel="0" linked="1" mute="1" solo="0" height="150" minimized="0" isSelected="1" rate="44100" gain="1.0" pan="0.0">
|
||||
<waveclip offset="0.24151927">
|
||||
<sequence maxsamples="262144" sampleformat="262159" numsamples="173056">
|
||||
<waveblock start="0">
|
||||
<simpleblockfile filename="e00006cb.au" len="173056" min="-0.15036" max="0.179535" rms="0.01021"/>
|
||||
</waveblock>
|
||||
</sequence>
|
||||
<envelope numpoints="0"/>
|
||||
</waveclip>
|
||||
</wavetrack>
|
||||
<wavetrack name="Audio Track" channel="1" linked="0" mute="1" solo="0" height="150" minimized="0" isSelected="1" rate="44100" gain="1.0" pan="0.0">
|
||||
<waveclip offset="0.24151927">
|
||||
<sequence maxsamples="262144" sampleformat="262159" numsamples="173056">
|
||||
<waveblock start="0">
|
||||
<simpleblockfile filename="e0000805.au" len="173056" min="-0.15036" max="0.179504" rms="0.01021"/>
|
||||
</waveblock>
|
||||
</sequence>
|
||||
<envelope numpoints="0"/>
|
||||
</waveclip>
|
||||
</wavetrack>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
resources/mods/DimDoors/sfx/rift.ogg
Normal file
BIN
resources/mods/DimDoors/sfx/rift.ogg
Normal file
Binary file not shown.
BIN
resources/mods/DimDoors/sfx/riftClose.ogg
Normal file
BIN
resources/mods/DimDoors/sfx/riftClose.ogg
Normal file
Binary file not shown.
BIN
resources/mods/DimDoors/sfx/riftDoor.ogg
Normal file
BIN
resources/mods/DimDoors/sfx/riftDoor.ogg
Normal file
Binary file not shown.
BIN
resources/mods/DimDoors/sfx/riftEnd.ogg
Normal file
BIN
resources/mods/DimDoors/sfx/riftEnd.ogg
Normal file
Binary file not shown.
BIN
resources/mods/DimDoors/sfx/riftStart.ogg
Normal file
BIN
resources/mods/DimDoors/sfx/riftStart.ogg
Normal file
Binary file not shown.
Loading…
Reference in a new issue