Fix a coffee machine dupe bug

Closes #372
This commit is contained in:
Ellpeck 2016-11-18 06:37:28 +01:00
parent 848e7f57a4
commit 3ce31d09fd
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ public class ItemResonantRice extends ItemBase{
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
if(!world.isRemote){
stack = StackUtil.addStackSize(stack, 1);
stack = StackUtil.addStackSize(stack, -1);
world.createExplosion(null, player.posX, player.posY, player.posZ, 0.5F, true);
}
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);

View file

@ -157,7 +157,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
CoffeeIngredient ingredient = ItemCoffee.getIngredientFromStack(this.slots[i]);
if(ingredient != null){
if(ingredient.effect(output)){
this.slots[i] = StackUtil.addStackSize(this.slots[i], 1);
this.slots[i] = StackUtil.addStackSize(this.slots[i], -1);
}
}
}