mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Added some sanity checking to the flowers' connection code.
This commit is contained in:
1 parent
49f3a90e20
commit
caa3d45e02
2 files changed
+4
-3
No files matched your search
@@ -97,7 +97,7 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
if(linkedPool == null) {
|
||||
needsNew = true;
|
||||
|
||||
if(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;
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.awt.Color;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -52,7 +53,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
linkCollector();
|
||||
|
||||
if(canGeneratePassively()) {
|
||||
@@ -80,7 +81,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
if(linkedCollector == null) {
|
||||
needsNew = true;
|
||||
|
||||
if(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;
|
||||
|
||||
Reference in new issue
Block a user