mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-20 20:12:16 +00:00
- MazeHandler: Ugly fix
This commit is contained in:
1 parent
b4917cec98
commit
f1371573b6
3 files changed
+7
-2
No files matched your search
@@ -58,6 +58,7 @@ public class EventHandlerWorld {
|
||||
@SubscribeEvent(priority = EventPriority.NORMAL)
|
||||
public void on(WorldEvent.Load e) {
|
||||
if (!e.world.isRemote && e.world.provider.dimensionId == 0) {
|
||||
System.out.println("initWorld");
|
||||
Gadomancy.loadModData();
|
||||
|
||||
GolemEnumHelper.validateSavedMapping();
|
||||
|
||||
@@ -3,6 +3,7 @@ package makeo.gadomancy.common.utils.world;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Vec3;
|
||||
@@ -68,7 +69,7 @@ public class TCMazeSession {
|
||||
}
|
||||
|
||||
final void startSession() {
|
||||
WorldServer ws = DimensionManager.getWorld(ModConfig.dimOuterId);
|
||||
WorldServer ws = MinecraftServer.getServer().worldServerForDimension(ModConfig.dimOuterId);
|
||||
|
||||
for(CellLoc loc : chunksAffected.keySet()) {
|
||||
long k = ChunkCoordIntPair.chunkXZ2Int(loc.x, loc.z);
|
||||
@@ -78,7 +79,7 @@ public class TCMazeSession {
|
||||
}
|
||||
|
||||
if(portalCell == null) {
|
||||
LogManager.getLogger().error("Thaumcraft didn't generate a portal! Stopping instance!", new IllegalStateException());
|
||||
LogManager.getLogger().error("Thaumcraft didn't generate a portal! Stopping instance! PLEASE REPORT THIS ERROR!", new IllegalStateException());
|
||||
closeSession(false);
|
||||
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Thaumcraft didn't generate a portal in the Eldritch dimension. Sorry, we can't teleport you.."));
|
||||
} else {
|
||||
|
||||
@@ -17,6 +17,9 @@ public class WorldUtil {
|
||||
|
||||
public static void teleportToFakeOuter(EntityPlayerMP player) {
|
||||
MinecraftServer mServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if(player.worldObj.provider.dimensionId != 0) {
|
||||
mServer.getConfigurationManager().transferPlayerToDimension(player, 0, new TeleporterNothing(mServer.worldServerForDimension(0)));
|
||||
}
|
||||
mServer.getConfigurationManager().transferPlayerToDimension(player, ModConfig.dimOuterId, new TeleporterNothing(mServer.worldServerForDimension(ModConfig.dimOuterId)));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user