diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 9f55a87a..813d1ed9 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -205,9 +205,9 @@ public class GregTech_API { sItemStackMappings.add(sCovers); sItemStackMappings.add(sCoverBehaviors); - sDimensionalList.add(-1); - sDimensionalList.add(0); - sDimensionalList.add(1); + //sDimensionalList.add(-1); + //sDimensionalList.add(0); + //sDimensionalList.add(1); sSoundList.put(0, "random.break"); sSoundList.put(1, "random.anvil_use"); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index c9d1e6db..bb04b6ec 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -51,6 +51,7 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.world.ChunkPosition; +import net.minecraft.world.Teleporter; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.DimensionManager; @@ -1455,19 +1456,13 @@ public class GT_Utility { * Used for my Teleporter. //I have a different opinion... Planets are fine :P */ public static boolean isRealDimension(int aDimensionID) { - try { - if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("com.xcompwiz.mystcraft")) - return true; - } catch (Throwable e) {/*Do nothing*/} - try { - if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("TwilightForest")) return true; - } catch (Throwable e) {/*Do nothing*/} + if(aDimensionID<=1 && aDimensionID>=-1 && !GregTech_API.sDimensionalList.contains(aDimensionID)) return true; return !GregTech_API.sDimensionalList.contains(aDimensionID) && DimensionManager.isDimensionRegistered(aDimensionID); } public static boolean moveEntityToDimensionAtCoords(Entity aEntity, int aDimension, double aX, double aY, double aZ) { WorldServer tTargetWorld = DimensionManager.getWorld(aDimension), tOriginalWorld = DimensionManager.getWorld(aEntity.worldObj.provider.dimensionId); - if (tTargetWorld != null && tOriginalWorld != null && tTargetWorld != tOriginalWorld) { + if (tTargetWorld != null && tOriginalWorld != null && aEntity.worldObj.provider.dimensionId != aDimension) { if (aEntity.ridingEntity != null) aEntity.mountEntity(null); if (aEntity.riddenByEntity != null) aEntity.riddenByEntity.mountEntity(null); @@ -1489,9 +1484,14 @@ public class GT_Utility { // aPlayer.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(aPlayer.getEntityId(), potioneffect)); // } // FMLCommonHandler.instance().firePlayerChangedDimensionEvent(aPlayer, tOriginalWorld.provider.dimensionId, aDimension); - aPlayer.travelToDimension(aDimension); + System.out.println("GT teleporting: "+aPlayer.getDisplayName()+" to dimension: "+aDimension); + tTargetWorld.theChunkProviderServer.loadChunk((int)aX >> 4, (int)aY >> 4); + aPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(aPlayer,aDimension, new Teleporter(aPlayer.mcServer.worldServerForDimension(aDimension))); + aPlayer.mcServer.getConfigurationManager().func_72375_a(aPlayer,tTargetWorld); aPlayer.playerNetServerHandler.setPlayerLocation(aX + 0.5, aY + 0.5, aZ + 0.5, aPlayer.rotationYaw, aPlayer.rotationPitch); - + //aPlayer.theItemInWorldManager.setWorld(tTargetWorld); + //aPlayer.mcServer.getConfigurationManager().updateTimeAndWeatherForPlayer(aPlayer, tTargetWorld); + //aPlayer.mcServer.getConfigurationManager().syncPlayerInventory(aPlayer); } else { aEntity.setPosition(aX + 0.5, aY + 0.5, aZ + 0.5); aEntity.worldObj.removeEntity(aEntity); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png index e69de29b..62895be7 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png.mcmeta index e69de29b..4db606ae 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png.mcmeta +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_AUTOMAINTENANCE_IDLE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":10 + } +} \ No newline at end of file