Fixed tomato plants consuming the item in creative mode

This commit is contained in:
Sollace 2019-01-10 11:34:32 +02:00
parent 854956f37f
commit 8f61402191

View file

@ -30,7 +30,9 @@ public class ItemTomatoSeeds extends Item {
if (block instanceof BlockTomatoPlant) {
if (((BlockTomatoPlant)block).plant(world, pos, state)) {
player.getHeldItem(hand).shrink(1);
if (!player.capabilities.isCreativeMode) {
player.getHeldItem(hand).shrink(1);
}
return EnumActionResult.SUCCESS;
}