summaryrefslogtreecommitdiffstats
path: root/nms-patches/WorldMap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/WorldMap.patch')
-rw-r--r--nms-patches/WorldMap.patch21
1 files changed, 11 insertions, 10 deletions
diff --git a/nms-patches/WorldMap.patch b/nms-patches/WorldMap.patch
index ab9784f5..be793710 100644
--- a/nms-patches/WorldMap.patch
+++ b/nms-patches/WorldMap.patch
@@ -15,8 +15,8 @@
public class WorldMap extends PersistentBase {
public int centerX;
-@@ -17,8 +25,18 @@
- private Map<EntityHuman, WorldMap.WorldMapHumanTracker> i = Maps.newHashMap();
+@@ -18,8 +26,18 @@
+ private Map<EntityHuman, WorldMap.WorldMapHumanTracker> j = Maps.newHashMap();
public Map<String, MapIcon> decorations = Maps.newLinkedHashMap();
+ // CraftBukkit start
@@ -34,7 +34,7 @@
}
public void a(double d0, double d1, int i) {
-@@ -31,7 +49,30 @@
+@@ -32,7 +50,30 @@
}
public void a(NBTTagCompound nbttagcompound) {
@@ -66,7 +66,7 @@
this.centerX = nbttagcompound.getInt("xCenter");
this.centerZ = nbttagcompound.getInt("zCenter");
this.scale = nbttagcompound.getByte("scale");
-@@ -66,6 +107,25 @@
+@@ -73,6 +114,25 @@
}
public void b(NBTTagCompound nbttagcompound) {
@@ -92,10 +92,10 @@
nbttagcompound.setByte("dimension", this.map);
nbttagcompound.setInt("xCenter", this.centerX);
nbttagcompound.setInt("zCenter", this.centerZ);
-@@ -212,12 +272,25 @@
+@@ -220,12 +280,26 @@
}
- public Packet a(ItemStack itemstack) {
+ public Packet<?> a(ItemStack itemstack) {
+ // CraftBukkit start
+ org.bukkit.craftbukkit.map.RenderData render = WorldMap.this.mapView.render((org.bukkit.craftbukkit.entity.CraftPlayer) this.trackee.getBukkitEntity()); // CraftBukkit
+
@@ -110,11 +110,12 @@
+
if (this.d) {
this.d = false;
-- return new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, WorldMap.this.decorations.values(), WorldMap.this.colors, this.e, this.f, this.g + 1 - this.e, this.h + 1 - this.f);
-+ return new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, icons, render.buffer, this.e, this.f, this.g + 1 - this.e, this.h + 1 - this.f);
+- return new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, WorldMap.this.track, WorldMap.this.decorations.values(), WorldMap.this.colors, this.e, this.f, this.g + 1 - this.e, this.h + 1 - this.f);
++ // PAIL: this.e
++ return new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, WorldMap.this.track, icons, render.buffer, this.e, this.f, this.g + 1 - this.e, this.h + 1 - this.f);
} else {
-- return this.i++ % 5 == 0 ? new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, WorldMap.this.decorations.values(), WorldMap.this.colors, 0, 0, 0, 0) : null;
-+ return this.i++ % 5 == 0 ? new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, icons, render.buffer, 0, 0, 0, 0) : null;
+- return this.i++ % 5 == 0 ? new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, WorldMap.this.track, WorldMap.this.decorations.values(), WorldMap.this.colors, 0, 0, 0, 0) : null;
++ return this.i++ % 5 == 0 ? new PacketPlayOutMap(itemstack.getData(), WorldMap.this.scale, WorldMap.this.track, icons, render.buffer, 0, 0, 0, 0) : null;
}
+ // CraftBukkit end
}