mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-26 13:09:22 +01:00
Closes #1061
This commit is contained in:
parent
981a0c6ae1
commit
b91bde4d74
1 changed files with 6 additions and 1 deletions
|
@ -139,7 +139,7 @@ public class ItemWaterBowl extends ItemBase{
|
|||
if(entity instanceof EntityPlayer){
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
if(this.tryPlaceContainedLiquid(player, world, player.getPosition(), true)){
|
||||
player.inventory.setInventorySlotContents(itemSlot, new ItemStack(Items.BOWL));
|
||||
checkReplace(player, stack, new ItemStack(Items.BOWL), itemSlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,6 +159,11 @@ public class ItemWaterBowl extends ItemBase{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkReplace(EntityPlayer player, ItemStack old, ItemStack stack, int slot) {
|
||||
if(player.inventory.getStackInSlot(slot) == old) player.inventory.setInventorySlotContents(slot, stack);
|
||||
else if(player.inventory.offHandInventory.get(slot) == old) player.inventory.offHandInventory.set(slot, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged){
|
||||
|
|
Loading…
Reference in a new issue