Fix #1843 Improve performance of worldgen hives

This commit is contained in:
mezz committed 2017-09-06 00:35:54 -07:00
1 parent 5707d27598
commit b9924ea98b
16 files changed
+479 -156

No files matched your search

@@ -54,7 +54,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
public class BeekeepingLogic implements IBeekeepingLogic {
private static final int totalBreedingTime = Constants.APIARY_BREEDING_TIME;
@@ -222,7 +222,8 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
errorLogic.setCondition(true, errorState);
}
boolean hasFlowers = hasFlowersCache.hasFlowers(queen, housing);
hasFlowersCache.update(queen, housing);
boolean hasFlowers = hasFlowersCache.hasFlowers();
boolean flowerCacheNeedsSync = hasFlowersCache.needsSync();
errorLogic.setCondition(!hasFlowers, EnumErrorCode.NO_FLOWER);