From 4123a8beb3df719b81d2f89ee8f20836682f5942 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Wed, 18 Apr 2018 18:24:35 -0500 Subject: [PATCH] Fix munchdews going on long cooldowns too often. Closes #2449 --- .../block/subtile/generating/SubTileMunchdew.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java index 06046ab5a..1dd18a32e 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileMunchdew.java @@ -46,15 +46,19 @@ public class SubTileMunchdew extends SubTileGenerating { public void onUpdate() { super.onUpdate(); + if(getWorld().isRemote) + return; + if(cooldown > 0) { cooldown--; ticksWithoutEating = 0; + ateOnce = false; // don't start ticking ticksWithoutEating again until we eat again return; } int manaPerLeaf = 160; eatLeaves : { - if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorld().isRemote && ticksExisted % 4 == 0) { + if(getMaxMana() - mana >= manaPerLeaf && ticksExisted % 4 == 0) { List coords = new ArrayList<>(); BlockPos pos = supertile.getPos(); @@ -91,8 +95,10 @@ public class SubTileMunchdew extends SubTileGenerating { if(ateOnce) { ticksWithoutEating++; - if(ticksWithoutEating >= 5) + if(ticksWithoutEating >= 5) { cooldown = 1600; + sync(); + } } }