Notify player of inv changes when filling

This commit is contained in:
CovertJaguar 2013-12-08 21:03:29 -08:00
parent d7575d74ea
commit 4a21f4ce24

View file

@ -36,6 +36,7 @@ public class FluidUtils {
if (used > 0) { if (used > 0) {
if (!player.capabilities.isCreativeMode) { if (!player.capabilities.isCreativeMode) {
player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current)); player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current));
player.inventory.onInventoryChanged();
} }
return true; return true;
} }
@ -50,14 +51,14 @@ public class FluidUtils {
if (liquid != null) { if (liquid != null) {
if (current.stackSize > 1) { if (current.stackSize > 1) {
if (!player.inventory.addItemStackToInventory(filled)) { if (!player.inventory.addItemStackToInventory(filled))
return false; return false;
} else { player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current));
player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current)); player.inventory.onInventoryChanged();
}
} else { } else {
player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current)); player.inventory.setInventorySlotContents(player.inventory.currentItem, InvUtils.consumeItem(current));
player.inventory.setInventorySlotContents(player.inventory.currentItem, filled); player.inventory.setInventorySlotContents(player.inventory.currentItem, filled);
player.inventory.onInventoryChanged();
} }
tank.drain(side, liquid.amount, true); tank.drain(side, liquid.amount, true);