diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index f32c39aa..e2aaf30e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -1,8 +1,5 @@ package gregtech.api.metatileentity.implementations; -import java.util.ArrayList; -import java.util.List; - import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -28,6 +25,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import scala.actors.threadpool.Arrays; +import java.util.List; + public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; public GT_MetaTileEntity_MultiBlockBase mController = null; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index eae5fdbb..c9d1e6db 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1452,7 +1452,7 @@ public class GT_Utility { /** * This checks if the Dimension is really a Dimension and not another Planet or something. - * Used for my Teleporter. + * Used for my Teleporter. //I have a different opinion... Planets are fine :P */ public static boolean isRealDimension(int aDimensionID) { try { @@ -1462,7 +1462,7 @@ public class GT_Utility { try { if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("TwilightForest")) return true; } catch (Throwable e) {/*Do nothing*/} - return GregTech_API.sDimensionalList.contains(aDimensionID); + return !GregTech_API.sDimensionalList.contains(aDimensionID) && DimensionManager.isDimensionRegistered(aDimensionID); } public static boolean moveEntityToDimensionAtCoords(Entity aEntity, int aDimension, double aX, double aY, double aZ) { diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java index 0d03b12a..756c8c45 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java @@ -4,6 +4,7 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.common.DimensionManager; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; @@ -21,6 +22,7 @@ public class GT_GUIContainer_MicrowaveEnergyTransmitter this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetZ), 46, 32, 16448255); if (((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mEgg > 0) { this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD), 46, 40, 16448255); + this.fontRendererObj.drawString("Dim Valid: " + (DimensionManager.isDimensionRegistered(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD) ? "Yes":"No"), 46, 48, 16448255); } } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java index 6f7e2808..74973876 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Teleporter.java @@ -4,6 +4,7 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.common.DimensionManager; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; @@ -21,6 +22,7 @@ public class GT_GUIContainer_Teleporter this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetZ), 46, 32, 16448255); if (((GT_Container_Teleporter) this.mContainer).mEgg > 0) { this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_Teleporter) this.mContainer).mTargetD), 46, 40, 16448255); + this.fontRendererObj.drawString("Dim Valid: " + (DimensionManager.isDimensionRegistered(((GT_Container_Teleporter) this.mContainer).mTargetD) ? "Yes":"No"), 46, 48, 16448255); } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java index 43b88537..8b9b64d3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java @@ -80,7 +80,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt "X: "+EnumChatFormatting.GREEN+ this.mTargetX+EnumChatFormatting.RESET, "Y: "+EnumChatFormatting.GREEN+ this.mTargetY+EnumChatFormatting.RESET, "Z: "+EnumChatFormatting.GREEN+ this.mTargetZ+EnumChatFormatting.RESET, - "Dimension: " + EnumChatFormatting.YELLOW+this.mTargetD+EnumChatFormatting.RESET + "Dimension: " + EnumChatFormatting.YELLOW+this.mTargetD+EnumChatFormatting.RESET, + "Dimension Valid: " + (DimensionManager.isDimensionRegistered(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET) }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 3016a277..91293513 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -174,7 +174,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { "X: "+ EnumChatFormatting.GREEN+ this.mTargetX+EnumChatFormatting.RESET, "Y: "+EnumChatFormatting.GREEN+ this.mTargetY+EnumChatFormatting.RESET, "Z: "+EnumChatFormatting.GREEN+ this.mTargetZ+EnumChatFormatting.RESET, - "Dimension: " + EnumChatFormatting.YELLOW+this.mTargetD+EnumChatFormatting.RESET + "Dimension: " + EnumChatFormatting.YELLOW+this.mTargetD+EnumChatFormatting.RESET, + "Dimension Valid: " + (DimensionManager.isDimensionRegistered(this.mTargetD) ? EnumChatFormatting.GREEN+"Yes"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"No"+EnumChatFormatting.RESET) }; }