Fix an Exception with Solidified Experience

Closes #541
This commit is contained in:
Ellpeck 2016-12-28 19:28:05 +01:00
parent 964219d4dc
commit f83c4ec60b

View file

@ -59,13 +59,13 @@ public class ItemSolidifiedExperience extends ItemBase{
if(!player.isSneaking()){
amount = SOLID_XP_AMOUNT;
if(!player.capabilities.isCreativeMode){
stack = StackUtil.addStackSize(stack, -1);
stack.stackSize--;
}
}
else{
amount = SOLID_XP_AMOUNT*StackUtil.getStackSize(stack);
if(!player.capabilities.isCreativeMode){
stack = StackUtil.setStackSize(stack, 0);
stack.stackSize = 0;
}
}