Fix frame mods moving Teleporters with fake worlds

If there is no ChunkProvider, the block can't be unloaded.
This commit is contained in:
Ben Spiers 2015-07-19 13:36:36 +01:00
parent 2c88357477
commit 74939083c8

View file

@ -216,7 +216,7 @@ public class Coord4D
/** /**
* Returns a new Coord4D from a tag compound. * Returns a new Coord4D from a tag compound.
* @param data - tag compound to read from * @param tag - tag compound to read from
* @return the Coord4D from the tag compound * @return the Coord4D from the tag compound
*/ */
public static Coord4D read(NBTTagCompound tag) public static Coord4D read(NBTTagCompound tag)
@ -316,7 +316,7 @@ public class Coord4D
*/ */
public boolean exists(World world) public boolean exists(World world)
{ {
return world.getChunkProvider().chunkExists(xCoord >> 4, zCoord >> 4); return world.getChunkProvider() == null || world.getChunkProvider().chunkExists(xCoord >> 4, zCoord >> 4);
} }
/** /**