Force flower checks. This, in theory, should, once again, fix flowers unbinding from spreaders/pools, but we never know because this issue is terrible.

This commit is contained in:
Vasco Lavos committed 2014-06-23 15:48:58 +01:00
1 parent bbdbc47529
commit 604b046574
6 files changed
+17 -2

No files matched your search

@@ -123,4 +123,8 @@ public class DummyMethodHandler implements IInternalMethodHandler {
return null;
}
@Override
public boolean shouldForceCheck() {
return true;
}
}
@@ -67,6 +67,8 @@ public interface IInternalMethodHandler {
public IIcon getSubTileIconForName(String name);
public boolean shouldForceCheck();
public IInventory getBaublesInventory(EntityPlayer player);
@SideOnly(Side.CLIENT)
@@ -118,7 +118,7 @@ public class SubTileFunctional extends SubTileEntity {
if(needsNew) {
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
int size = network.getAllPoolsInWorld(supertile.getWorldObj()).size();
if(size != sizeLastCheck) {
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord);
linkedPool = network.getClosestPool(coords, supertile.getWorldObj(), range);
sizeLastCheck = size;
@@ -101,7 +101,7 @@ public class SubTileGenerating extends SubTileEntity {
if(needsNew) {
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
int size = network.getAllCollectorsInWorld(supertile.getWorldObj()).size();
if(size != sizeLastCheck) {
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord);
linkedCollector = network.getClosestCollector(coords, supertile.getWorldObj(), range);
sizeLastCheck = size;
@@ -34,6 +34,7 @@ public final class ConfigHandler {
public static boolean versionCheckEnabled = true;
public static int spreaderPositionShift = 1;
public static boolean flowerForceCheck = true;
public static boolean fallenKanadeEnabled = true;
public static boolean darkQuartzEnabled = true;
@@ -86,6 +87,9 @@ public final class ConfigHandler {
desc = "Do not ever touch this value if not asked to. Possible symptoms of doing so include your head turning backwards, the appearance of Titans near the walls or you being trapped in a game of Sword Art Online.";
spreaderPositionShift = loadPropInt("spreader.posShift", desc, spreaderPositionShift);
desc = "Turn off ONLY IF you're on an extremely large world with an exhagerated count of Mana Spreaders/Mana Pools and are experiencing TPS lag. This toggles whether flowers are strict with their checking for connecting to pools/spreaders or just check whenever possible.";
flowerForceCheck = loadPropBool("flower.forceCheck", desc, flowerForceCheck);
desc = "Set to false to disable the Fallen Kanade flower (gives Regeneration). This config option is here for those using Blood Magic. Note: Turning this off will not remove ones already in the world, it'll simply prevent the crafting.";
fallenKanadeEnabled = loadPropBool("fallenKanade.enabled", desc, fallenKanadeEnabled);
@@ -134,4 +134,9 @@ public class InternalMethodHandler implements IInternalMethodHandler {
Botania.proxy.sparkleFX(world, x, y, z, r, g, b, size, m);
}
@Override
public boolean shouldForceCheck() {
return ConfigHandler.flowerForceCheck;
}
}