From 70795b64759a8c7cb6b84c64f19efd4246c4c861 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 22 Jan 2014 05:10:50 -0400 Subject: [PATCH] Minor Change Added a warning on some hacky code for sending dim data. --- .../mod_pocketDim/core/DDTeleporter.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java b/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java index d365453..fda57f6 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java @@ -317,10 +317,13 @@ public class DDTeleporter if(player != null) // Are we working with a player? { // We need to do all this special stuff to move a player between dimensions. - //Give the client the dimensionData for the destination - PocketManager.getDimwatcher().onCreated(new ClientDimData(PocketManager.getDimensionData(destination.getDimension()))); - - + //Give the client the dimensionData for the destination + + // FIXME: This violates the way we assume PocketManager works. DimWatcher should not be exposed + // to prevent us from doing bad things. Moreover, no dimension is being created, so if we ever + // tie code to that, it could cause confusing bugs. + // No hacky for you! ~SenseiKiwi + PocketManager.getDimwatcher().onCreated(new ClientDimData(PocketManager.getDimensionData(destination.getDimension()))); // Set the new dimension and inform the client that it's moving to a new world. player.dimension = destination.getDimension();