mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Do a bunch of checks for isInvalid().
This commit is contained in:
1 parent
6211bb967f
commit
54cfa17511
6 files changed
+11
-9
No files matched your search
@@ -89,7 +89,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
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) {
|
||||
if(tileAt != null && tileAt instanceof IManaCollector && !tileAt.isInvalid()) {
|
||||
linkedCollector = tileAt;
|
||||
needsNew = false;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
if(!needsNew && linkedCollector != null) {
|
||||
TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord);
|
||||
if(!(tileAt instanceof IManaCollector)) {
|
||||
if(!(tileAt instanceof IManaCollector) || !tileAt.isInvalid()) {
|
||||
linkedCollector = null;
|
||||
needsNew = true;
|
||||
} else linkedCollector = tileAt;
|
||||
|
||||
Reference in new issue
Block a user