Fixed creative consumption (#522)

This commit is contained in:
xbony2 2016-12-23 11:00:18 -05:00 committed by Ellpeck
parent a6f3581d24
commit c33a7e4cad

View file

@ -51,8 +51,10 @@ public class ItemWorm extends ItemBase{
EntityWorm worm = new EntityWorm(world);
worm.setPosition(pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5);
world.spawnEntity(worm);
player.setHeldItem(hand, StackUtil.addStackSize(stack, -1));
if(!player.capabilities.isCreativeMode){
player.setHeldItem(hand, StackUtil.addStackSize(stack, -1));
}
}
return EnumActionResult.SUCCESS;
}