From 5e7cb1421998266c642abee6e271eb544728a1aa Mon Sep 17 00:00:00 2001 From: Stephen Baynham Date: Tue, 21 Jul 2015 19:57:29 -0400 Subject: [PATCH] Fixes #22 If the server disconnected you due to a timeout or whatever, the pocket manager would appropriately unload all dimension & pocket data, but it would do so moments before the world unloaded, meaning that entities would sometimes, on update or as part of their renderer, attempt to access the dimensional data. This places a new guard condition that attempts to stop that from crashing the client. --- .../java/StevenDimDoors/mod_pocketDim/core/PocketManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java b/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java index 86df9096..5b3b4048 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/core/PocketManager.java @@ -668,6 +668,9 @@ public class PocketManager public static DimLink getLink(int x, int y, int z, int dimensionID) { + if (!isLoaded()) + return null; + NewDimData dimension = dimensionData.get(dimensionID); if (dimension != null) {