Reverted flower binding cache handling changes from a month ago. I have no idea if this will fix anything but we might as well try.

This commit is contained in:
Lizbeth Rika committed 2015-06-08 22:52:49 +01:00
1 parent 507ac6c3e3
commit a242e382b4
3 files changed
+13 -21

No files matched your search

@@ -1,4 +1,4 @@
@API(owner = "Botania", apiVersion = "50", provides = "BotaniaAPI")
@API(owner = "Botania", apiVersion = "51", provides = "BotaniaAPI")
package vazkii.botania.api;
import cpw.mods.fml.common.API;
@@ -91,17 +91,13 @@ public class SubTileFunctional extends SubTileEntity {
if(linkedPool == null) {
needsNew = true;
if(cachedPoolCoordinates != null) {
needsNew = false;
if(supertile.getWorldObj().blockExists(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ)) {
needsNew = true;
TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ);
if(tileAt != null && tileAt instanceof IManaPool) {
linkedPool = tileAt;
needsNew = false;
}
cachedPoolCoordinates = null;
if(cachedPoolCoordinates != null && supertile.getWorldObj().blockExists(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ)) {
TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ);
if(tileAt != null && tileAt instanceof IManaPool) {
linkedPool = tileAt;
needsNew = false;
}
cachedPoolCoordinates = null;
}
}
@@ -84,17 +84,13 @@ public class SubTileGenerating extends SubTileEntity {
if(linkedCollector == null) {
needsNew = true;
if(cachedCollectorCoordinates != null) {
needsNew = false;
if(supertile.getWorldObj().blockExists(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ)) {
needsNew = true;
TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ);
if(tileAt != null && tileAt instanceof IManaCollector) {
linkedCollector = tileAt;
needsNew = false;
}
cachedCollectorCoordinates = null;
if(cachedCollectorCoordinates != null && supertile.getWorldObj().blockExists(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ)) {
TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ);
if(tileAt != null && tileAt instanceof IManaCollector) {
linkedCollector = tileAt;
needsNew = false;
}
cachedCollectorCoordinates = null;
}
}