mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
remove bucket hack closes #563
This commit is contained in:
1 parent
e7008e327a
commit
34ef094351
1 file changed
+1
-36
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user