Permalink
Browse files

Wristbracerception is now impossible.

  • Loading branch information...
Ri5ux committed Dec 28, 2018
1 parent 574519e commit 2013ff6e12903d392ca2a3adb564f249284b66ae
Showing with 16 additions and 2 deletions.
  1. +16 −2 src/main/java/org/avp/inventory/ContainerWristbracer.java
@@ -17,6 +17,20 @@
public IInventory inventory;
public ItemStack stack;
public EntityPlayer player;

public static class SlotWristbracer extends Slot
{
public SlotWristbracer(IInventory inventoryIn, int index, int xPosition, int yPosition)
{
super(inventoryIn, index, xPosition, yPosition);
}

@Override
public boolean isItemValid(ItemStack stack)
{
return stack != null && !(stack.getItem() instanceof ItemWristbracer);
}
}

public ContainerWristbracer(EntityPlayer player)
{
@@ -30,7 +44,7 @@ public void initialize()
{
for (byte x = 0; x < this.inventory.getSizeInventory(); x++)
{
addSlotToContainer(new Slot(inventory, x, 31 + (28 * x), 16));
addSlotToContainer(new SlotWristbracer(inventory, x, 31 + (28 * x), 16));
}

for (byte x = 0; x < 9; x++)
@@ -145,7 +159,7 @@ public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex)

return ItemStack.EMPTY;
}

@Override
public void onContainerClosed(EntityPlayer player)
{

0 comments on commit 2013ff6

Please sign in to comment.