Makes buckets behavior like in creative mode

This commit is contained in:
Kubuxu 2012-09-16 16:24:13 +03:00
parent 4cb363db13
commit 123aba184c

View file

@ -116,8 +116,9 @@ public class BlockTank extends BlockContainer {
ItemStack filled = LiquidManager.fillLiquidContainer(available, current);
liquid = LiquidManager.getLiquidForFilledItem(filled);
if(liquid != null) {
if (!BuildCraftCore.debugMode && !entityplayer.capabilities.isCreativeMode){
if(current.stackSize > 1) {
if(!entityplayer.inventory.addItemStackToInventory(filled))
return false;
@ -129,7 +130,7 @@ public class BlockTank extends BlockContainer {
Utils.consumeItem(current));
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled);
}
}
tank.drain(Orientations.Unknown, liquid.amount, true);
return true;
}