diff --git a/common/mekanism/client/nei/AdvancedMachineRecipeHandler.java b/common/mekanism/client/nei/AdvancedMachineRecipeHandler.java index 3e799723c..89ff93c5b 100644 --- a/common/mekanism/client/nei/AdvancedMachineRecipeHandler.java +++ b/common/mekanism/client/nei/AdvancedMachineRecipeHandler.java @@ -37,14 +37,14 @@ public abstract class AdvancedMachineRecipeHandler extends TemplateRecipeHandler public void drawExtras(int i) { float f = ticksPassed >= 40 ? (ticksPassed - 40) % 20 / 20.0F : 0.0F; - drawProgressBar(63, 34, 176 + 26, 0, 24, 7, f, 0); + drawProgressBar(63, 34, 176, 0, 24, 7, f, 0); f = ticksPassed >= 20 && ticksPassed < 40 ? (ticksPassed - 20) % 20 / 20.0F : 1.0F; if(ticksPassed < 20) f = 0.0F; - drawProgressBar(45, 32, 176 + 26, 7, 5, 12, f, 3); + drawProgressBar(45, 32, 176, 7, 5, 12, f, 3); f = ticksPassed <= 20 ? ticksPassed / 20.0F : 1.0F; - drawProgressBar(149, 12, 176 + 26, 19, 4, 52, f, 3); + drawProgressBar(149, 12, 176, 19, 4, 52, f, 3); } @Override diff --git a/common/mekanism/client/nei/MachineRecipeHandler.java b/common/mekanism/client/nei/MachineRecipeHandler.java index e7f48b0d3..fb5be5606 100644 --- a/common/mekanism/client/nei/MachineRecipeHandler.java +++ b/common/mekanism/client/nei/MachineRecipeHandler.java @@ -35,9 +35,9 @@ public abstract class MachineRecipeHandler extends TemplateRecipeHandler public void drawExtras(int i) { float f = ticksPassed >= 20 ? (ticksPassed - 20) % 20 / 20.0F : 0.0F; - drawProgressBar(63, 34, 176 + 26, 0, 24, 7, f, 0); + drawProgressBar(63, 34, 176, 0, 24, 7, f, 0); f = ticksPassed <= 20 ? ticksPassed / 20.0F : 1.0F; - drawProgressBar(149, 12, 176 + 26, 7, 4, 52, f, 3); + drawProgressBar(149, 12, 176, 7, 4, 52, f, 3); } @Override diff --git a/common/mekanism/common/EntityObsidianTNT.java b/common/mekanism/common/EntityObsidianTNT.java index e92993f5a..3889c71de 100644 --- a/common/mekanism/common/EntityObsidianTNT.java +++ b/common/mekanism/common/EntityObsidianTNT.java @@ -24,12 +24,17 @@ public class EntityObsidianTNT extends Entity public EntityObsidianTNT(World world, double x, double y, double z) { this(world); + setPosition(x, y, z); + float randPi = (float)(Math.random()*Math.PI*2); + motionX = -(Math.sin(randPi))*0.02F; motionY = 0.2; motionZ = -(Math.cos(randPi))*0.02F; + fuse = Mekanism.obsidianTNTDelay; + prevPosX = x; prevPosY = y; prevPosZ = z; diff --git a/common/mekanism/common/block/BlockObsidianTNT.java b/common/mekanism/common/block/BlockObsidianTNT.java index 20f9605ee..fa132a1a8 100644 --- a/common/mekanism/common/block/BlockObsidianTNT.java +++ b/common/mekanism/common/block/BlockObsidianTNT.java @@ -59,7 +59,7 @@ public class BlockObsidianTNT extends Block if(world.isBlockIndirectlyGettingPowered(x, y, z)) { - onBlockDestroyedByPlayer(world, x, y, z, 1); + explode(world, x, y, z); world.setBlockToAir(x, y, z); } } @@ -69,7 +69,7 @@ public class BlockObsidianTNT extends Block { if(world.isBlockIndirectlyGettingPowered(x, y, z)) { - onBlockDestroyedByPlayer(world, x, y, z, 1); + explode(world, x, y, z); world.setBlockToAir(x, y, z); } } @@ -85,20 +85,13 @@ public class BlockObsidianTNT extends Block } } - @Override - public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) + public void explode(World world, int x, int y, int z) { if(!world.isRemote) { - if((meta & 1) == 0) - { - dropBlockAsItem_do(world, x, y, z, new ItemStack(Mekanism.ObsidianTNT, 1, 0)); - } - else { - EntityObsidianTNT entity = new EntityObsidianTNT(world, x + 0.5F, y + 0.5F, z + 0.5F); - world.spawnEntityInWorld(entity); - world.playSoundAtEntity(entity, "random.fuse", 1.0F, 1.0F); - } + EntityObsidianTNT entity = new EntityObsidianTNT(world, x + 0.5F, y + 0.5F, z + 0.5F); + world.spawnEntityInWorld(entity); + world.playSoundAtEntity(entity, "random.fuse", 1.0F, 1.0F); } } @@ -107,7 +100,7 @@ public class BlockObsidianTNT extends Block { if(entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Item.flintAndSteel.itemID) { - onBlockDestroyedByPlayer(world, x, y, z, 1); + explode(world, x, y, z); world.setBlockToAir(x, y, z); return true; } @@ -131,15 +124,9 @@ public class BlockObsidianTNT extends Block if(entityarrow.isBurning()) { - onBlockDestroyedByPlayer(world, x, y, z, 1); + explode(world, x, y, z); world.setBlockToAir(x, y, z); } } } - - @Override - protected ItemStack createStackedBlock(int i) - { - return null; - } }