Fix dupe bug #835

Alchemical bag that is held can no longer be moved. Number keys no
longer move items around.
This commit is contained in:
Virtuoel 2015-06-03 16:45:45 +03:00
parent 3f5c108b81
commit e664a7dfad
2 changed files with 49 additions and 3 deletions

View File

@ -96,4 +96,11 @@ public class GuiAlchemicalBag extends GuiContainer
}
}
}
@Override
protected boolean checkHotbarKeys(int key)
{
return false;
}
}

View File

@ -95,15 +95,54 @@ public class ContainerAlchemicalBag extends ContainerEE
{
if (inventoryAlchemicalBag.parentItemStack.getItemDamage() == 0)
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 162));
if(!(entityPlayer.inventory.getStackInSlot(actionBarSlotIndex)==inventoryAlchemicalBag.parentItemStack))
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 162));
}
else
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 162)
{
public boolean canTakeStack(EntityPlayer p_82869_1_)
{
return false;
}
});
}
}
else if (inventoryAlchemicalBag.parentItemStack.getItemDamage() == 1)
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 216));
if(!(entityPlayer.inventory.getStackInSlot(actionBarSlotIndex)==inventoryAlchemicalBag.parentItemStack))
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 216));
}
else
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 216)
{
public boolean canTakeStack(EntityPlayer p_82869_1_)
{
return false;
}
});
}
}
else if (inventoryAlchemicalBag.parentItemStack.getItemDamage() == 2)
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 44 + actionBarSlotIndex * 18, 232));
if(!(entityPlayer.inventory.getStackInSlot(actionBarSlotIndex)==inventoryAlchemicalBag.parentItemStack))
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 44 + actionBarSlotIndex * 18, 232));
}
else
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 44 + actionBarSlotIndex * 18, 232)
{
public boolean canTakeStack(EntityPlayer p_82869_1_)
{
return false;
}
});
}
}
}
}