Minor Change to PocketManager
Added a minor check to PocketManager.loadDimension() so that an attempt to load an unregistered dimension won't be passed on to Forge where it would cause an exception - which is then caught by Forge before it can cause problems. This isn't strictly necessary, but it's a nice consideration.
This commit is contained in:
parent
f64768ed16
commit
d3860119e9
1 changed files with 5 additions and 0 deletions
|
@ -483,6 +483,11 @@ public class PocketManager
|
||||||
|
|
||||||
public static WorldServer loadDimension(int id)
|
public static WorldServer loadDimension(int id)
|
||||||
{
|
{
|
||||||
|
if (!DimensionManager.isDimensionRegistered(id))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
WorldServer world = DimensionManager.getWorld(id);
|
WorldServer world = DimensionManager.getWorld(id);
|
||||||
if (world == null)
|
if (world == null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue