diff options
author | EvilSeph <evilseph@gmail.com> | 2011-12-10 12:36:19 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-12-10 15:15:26 -0500 |
commit | 84a19565d4893165d8d226c3d8dda1a296cbcc61 (patch) | |
tree | 90d22f17a4608fab9296437b4091d175ef454f85 | |
parent | 32a913a2223ddc37fc35c96e62247683901c640f (diff) | |
download | craftbukkit-84a19565d4893165d8d226c3d8dda1a296cbcc61.tar craftbukkit-84a19565d4893165d8d226c3d8dda1a296cbcc61.tar.gz craftbukkit-84a19565d4893165d8d226c3d8dda1a296cbcc61.tar.lz craftbukkit-84a19565d4893165d8d226c3d8dda1a296cbcc61.tar.xz craftbukkit-84a19565d4893165d8d226c3d8dda1a296cbcc61.zip |
Fixed (Bukkit multiworld) maps as described in BUKKIT-142.
-rw-r--r-- | src/main/java/net/minecraft/server/ItemWorldMap.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java index 5cc8ceb7..c93ab32c 100644 --- a/src/main/java/net/minecraft/server/ItemWorldMap.java +++ b/src/main/java/net/minecraft/server/ItemWorldMap.java @@ -24,7 +24,7 @@ public class ItemWorldMap extends ItemWorldMapBase { worldmap.centerX = world.getWorldData().c(); worldmap.centerZ = world.getWorldData().e(); worldmap.scale = 3; - worldmap.map = (byte) world.worldProvider.dimension; + worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - fixes Bukkit multiworld maps. worldmap.a(); world.a(s, (WorldMapBase) worldmap); @@ -72,6 +72,7 @@ public class ItemWorldMap extends ItemWorldMapBase { byte b2 = 0; int[] aint = new int[256]; Chunk chunk = world.getChunkAtWorldCoords(i3, j3); + if (chunk.isEmpty()) continue; // CraftBukkit - fixes maps erasing themselves on low chunk visibility. int k3 = i3 & 15; int l3 = j3 & 15; int i4 = 0; @@ -232,7 +233,7 @@ public class ItemWorldMap extends ItemWorldMapBase { worldmap.centerX = MathHelper.floor(entityhuman.locX); worldmap.centerZ = MathHelper.floor(entityhuman.locZ); worldmap.scale = 3; - worldmap.map = (byte) world.worldProvider.dimension; + worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - fixes Bukkit multiworld maps. worldmap.a(); } |