From 34ef0943518aa1318192aa8cf6cfe1b6b9eff4ed Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Tue, 8 Apr 2014 17:56:34 -0400 Subject: [PATCH] remove bucket hack closes #563 --- .../java/tconstruct/blocks/LavaTankBlock.java | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/main/java/tconstruct/blocks/LavaTankBlock.java b/src/main/java/tconstruct/blocks/LavaTankBlock.java index 464e19a6..8d5cbbea 100644 --- a/src/main/java/tconstruct/blocks/LavaTankBlock.java +++ b/src/main/java/tconstruct/blocks/LavaTankBlock.java @@ -167,16 +167,8 @@ public class LavaTankBlock extends BlockContainer ItemStack current = entityplayer.inventory.getCurrentItem(); if (current != null) { - FluidStack liquid; + FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); LavaTankLogic logic = (LavaTankLogic) world.getTileEntity(i, j, k); - if (current.getItem() == Items.lava_bucket) - { - liquid = new FluidStack(FluidRegistry.LAVA, TConstruct.blockLiquidValue); - } - else - { - liquid = FluidContainerRegistry.getFluidForFilledItem(current); - } if (liquid != null) { int amount = logic.fill(ForgeDirection.UNKNOWN, liquid, false); @@ -190,33 +182,6 @@ public class LavaTankBlock extends BlockContainer else return true; } - else if (current.getItem() == Items.lava_bucket) - { - FluidTankInfo[] tanks = logic.getTankInfo(ForgeDirection.UNKNOWN); - FluidStack fillFluid = tanks[0].fluid;// getFluid(); - ItemStack fillStack = new ItemStack(Items.bucket); - if (fillStack != null) - { - logic.drain(ForgeDirection.UNKNOWN, TConstruct.blockLiquidValue, true); - if (!entityplayer.capabilities.isCreativeMode) - { - if (current.stackSize == 1) - { - entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, fillStack); - } - else - { - entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, consumeItem(current)); - - if (!entityplayer.inventory.addItemStackToInventory(fillStack)) - { - entityplayer.dropPlayerItemWithRandomChoice(fillStack, false); - } - } - } - return true; - } - } else if (FluidContainerRegistry.isBucket(current)) { FluidTankInfo[] tanks = logic.getTankInfo(ForgeDirection.UNKNOWN);