mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fixed broken logic in collector/pool position caching that caused flowers to bind to the wrong collector or pool thanks to chunkloading,
This commit is contained in:
1 parent
4a7e09ff3a
commit
d063941167
3 files changed
+115
-107
No files matched your search
@@ -84,13 +84,17 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
if(linkedCollector == null) {
|
||||
needsNew = true;
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
cachedCollectorCoordinates = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user