mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Fixed batbox capability invalidation.
This commit is contained in:
parent
9fe3fa1c7c
commit
6596a8e6f9
2 changed files with 4 additions and 2 deletions
|
@ -66,6 +66,7 @@ public class BlockBatteryBox extends BlockContainerBase {
|
||||||
if (!stack.isEmpty()) {
|
if (!stack.isEmpty()) {
|
||||||
if (stack.getItem() instanceof ItemBattery && box.inv.getStackInSlot(0).isEmpty()) {
|
if (stack.getItem() instanceof ItemBattery && box.inv.getStackInSlot(0).isEmpty()) {
|
||||||
box.inv.setStackInSlot(0, stack.copy());
|
box.inv.setStackInSlot(0, stack.copy());
|
||||||
|
box.invalidateCapabilities();
|
||||||
player.setItemInHand(hand, ItemStack.EMPTY);
|
player.setItemInHand(hand, ItemStack.EMPTY);
|
||||||
return ItemInteractionResult.SUCCESS;
|
return ItemInteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +75,7 @@ public class BlockBatteryBox extends BlockContainerBase {
|
||||||
if (!inSlot.isEmpty()) {
|
if (!inSlot.isEmpty()) {
|
||||||
player.setItemInHand(hand, inSlot.copy());
|
player.setItemInHand(hand, inSlot.copy());
|
||||||
box.inv.setStackInSlot(0, ItemStack.EMPTY);
|
box.inv.setStackInSlot(0, ItemStack.EMPTY);
|
||||||
|
box.invalidateCapabilities();
|
||||||
return ItemInteractionResult.SUCCESS;
|
return ItemInteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue