Fix crash when creating a tank stack with meta > 15 (#1057)

Also finally fixes the tanks so they properly drop themselves.
This commit is contained in:
Nicholas Ignoffo 2017-02-20 13:47:36 -08:00
parent 58d11dfbdc
commit 93d7efcb40
6 changed files with 45 additions and 31 deletions

View file

@ -39,14 +39,14 @@ public class SigilHoldingPacketProcessor implements IMessage, IMessageHandler<Si
@Override
public IMessage onMessage(SigilHoldingPacketProcessor message, MessageContext ctx)
{
ItemStack itemStack = null;
ItemStack itemStack = ItemStack.EMPTY;
if (message.slot > -1 && message.slot < 9)
{
itemStack = ctx.getServerHandler().playerEntity.inventory.getStackInSlot(message.slot);
}
if (itemStack != null)
if (!itemStack.isEmpty())
{
ItemSigilHolding.cycleToNextSigil(itemStack, message.mode);
}