mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 11:38:29 +01:00
Fixed (Bukkit multiworld) maps as described in BUKKIT-142.
This commit is contained in:
parent
32a913a222
commit
84a19565d4
@ -24,7 +24,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
|
|||||||
worldmap.centerX = world.getWorldData().c();
|
worldmap.centerX = world.getWorldData().c();
|
||||||
worldmap.centerZ = world.getWorldData().e();
|
worldmap.centerZ = world.getWorldData().e();
|
||||||
worldmap.scale = 3;
|
worldmap.scale = 3;
|
||||||
worldmap.map = (byte) world.worldProvider.dimension;
|
worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - fixes Bukkit multiworld maps.
|
||||||
worldmap.a();
|
worldmap.a();
|
||||||
world.a(s, (WorldMapBase) worldmap);
|
world.a(s, (WorldMapBase) worldmap);
|
||||||
|
|
||||||
@ -72,6 +72,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
|
|||||||
byte b2 = 0;
|
byte b2 = 0;
|
||||||
int[] aint = new int[256];
|
int[] aint = new int[256];
|
||||||
Chunk chunk = world.getChunkAtWorldCoords(i3, j3);
|
Chunk chunk = world.getChunkAtWorldCoords(i3, j3);
|
||||||
|
if (chunk.isEmpty()) continue; // CraftBukkit - fixes maps erasing themselves on low chunk visibility.
|
||||||
int k3 = i3 & 15;
|
int k3 = i3 & 15;
|
||||||
int l3 = j3 & 15;
|
int l3 = j3 & 15;
|
||||||
int i4 = 0;
|
int i4 = 0;
|
||||||
@ -232,7 +233,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
|
|||||||
worldmap.centerX = MathHelper.floor(entityhuman.locX);
|
worldmap.centerX = MathHelper.floor(entityhuman.locX);
|
||||||
worldmap.centerZ = MathHelper.floor(entityhuman.locZ);
|
worldmap.centerZ = MathHelper.floor(entityhuman.locZ);
|
||||||
worldmap.scale = 3;
|
worldmap.scale = 3;
|
||||||
worldmap.map = (byte) world.worldProvider.dimension;
|
worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - fixes Bukkit multiworld maps.
|
||||||
worldmap.a();
|
worldmap.a();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user