Updated to use mc-dev rename revision 1
This commit is contained in:
@@ -16,15 +16,15 @@ import org.bukkit.craftbukkit.map.CraftMapView;
|
||||
|
||||
public class WorldMap extends WorldMapBase {
|
||||
|
||||
public int b;
|
||||
public int c;
|
||||
public int centerX;
|
||||
public int centerZ;
|
||||
public byte map;
|
||||
public byte e;
|
||||
public byte[] f = new byte[16384];
|
||||
public byte scale;
|
||||
public byte[] colors = new byte[16384];
|
||||
public int g;
|
||||
public List h = new ArrayList();
|
||||
private Map j = new HashMap();
|
||||
public List i = new ArrayList();
|
||||
public List decorations = new ArrayList();
|
||||
|
||||
// CraftBukkit start
|
||||
public final CraftMapView mapView;
|
||||
@@ -42,7 +42,7 @@ public class WorldMap extends WorldMapBase {
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
// CraftBukkit start
|
||||
byte dimension = nbttagcompound.d("dimension");
|
||||
byte dimension = nbttagcompound.getByte("dimension");
|
||||
|
||||
if (dimension >= 10) {
|
||||
long least = nbttagcompound.getLong("UUIDLeast");
|
||||
@@ -65,26 +65,26 @@ public class WorldMap extends WorldMapBase {
|
||||
|
||||
this.map = dimension;
|
||||
// CraftBukkit end
|
||||
this.b = nbttagcompound.f("xCenter");
|
||||
this.c = nbttagcompound.f("zCenter");
|
||||
this.e = nbttagcompound.d("scale");
|
||||
if (this.e < 0) {
|
||||
this.e = 0;
|
||||
this.centerX = nbttagcompound.getInt("xCenter");
|
||||
this.centerZ = nbttagcompound.getInt("zCenter");
|
||||
this.scale = nbttagcompound.getByte("scale");
|
||||
if (this.scale < 0) {
|
||||
this.scale = 0;
|
||||
}
|
||||
|
||||
if (this.e > 4) {
|
||||
this.e = 4;
|
||||
if (this.scale > 4) {
|
||||
this.scale = 4;
|
||||
}
|
||||
|
||||
short short1 = nbttagcompound.e("width");
|
||||
short short2 = nbttagcompound.e("height");
|
||||
short short1 = nbttagcompound.getShort("width");
|
||||
short short2 = nbttagcompound.getShort("height");
|
||||
|
||||
if (short1 == 128 && short2 == 128) {
|
||||
this.f = nbttagcompound.k("colors");
|
||||
this.colors = nbttagcompound.getByteArray("colors");
|
||||
} else {
|
||||
byte[] abyte = nbttagcompound.k("colors");
|
||||
byte[] abyte = nbttagcompound.getByteArray("colors");
|
||||
|
||||
this.f = new byte[16384];
|
||||
this.colors = new byte[16384];
|
||||
int i = (128 - short1) / 2;
|
||||
int j = (128 - short2) / 2;
|
||||
|
||||
@@ -96,7 +96,7 @@ public class WorldMap extends WorldMapBase {
|
||||
int j1 = i1 + i;
|
||||
|
||||
if (j1 >= 0 || j1 < 128) {
|
||||
this.f[j1 + l * 128] = abyte[i1 + k * short1];
|
||||
this.colors[j1 + l * 128] = abyte[i1 + k * short1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,13 +124,13 @@ public class WorldMap extends WorldMapBase {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
nbttagcompound.a("dimension", this.map);
|
||||
nbttagcompound.a("xCenter", this.b);
|
||||
nbttagcompound.a("zCenter", this.c);
|
||||
nbttagcompound.a("scale", this.e);
|
||||
nbttagcompound.a("width", (short) 128);
|
||||
nbttagcompound.a("height", (short) 128);
|
||||
nbttagcompound.a("colors", this.f);
|
||||
nbttagcompound.setByte("dimension", this.map);
|
||||
nbttagcompound.setInt("xCenter", this.centerX);
|
||||
nbttagcompound.setInt("zCenter", this.centerZ);
|
||||
nbttagcompound.setByte("scale", this.scale);
|
||||
nbttagcompound.setShort("width", (short) 128);
|
||||
nbttagcompound.setShort("height", (short) 128);
|
||||
nbttagcompound.setByteArray("colors", this.colors);
|
||||
}
|
||||
|
||||
public void a(EntityHuman entityhuman, ItemStack itemstack) {
|
||||
@@ -141,14 +141,14 @@ public class WorldMap extends WorldMapBase {
|
||||
this.h.add(worldmaphumantracker);
|
||||
}
|
||||
|
||||
this.i.clear();
|
||||
this.decorations.clear();
|
||||
|
||||
for (int i = 0; i < this.h.size(); ++i) {
|
||||
WorldMapHumanTracker worldmaphumantracker1 = (WorldMapHumanTracker) this.h.get(i);
|
||||
|
||||
if (!worldmaphumantracker1.trackee.dead && worldmaphumantracker1.trackee.inventory.c(itemstack)) {
|
||||
float f = (float) (worldmaphumantracker1.trackee.locX - (double) this.b) / (float) (1 << this.e);
|
||||
float f1 = (float) (worldmaphumantracker1.trackee.locZ - (double) this.c) / (float) (1 << this.e);
|
||||
float f = (float) (worldmaphumantracker1.trackee.locX - (double) this.centerX) / (float) (1 << this.scale);
|
||||
float f1 = (float) (worldmaphumantracker1.trackee.locZ - (double) this.centerZ) / (float) (1 << this.scale);
|
||||
byte b0 = 64;
|
||||
byte b1 = 64;
|
||||
|
||||
@@ -166,7 +166,7 @@ public class WorldMap extends WorldMapBase {
|
||||
}
|
||||
|
||||
if (worldmaphumantracker1.trackee.dimension == this.map) {
|
||||
this.i.add(new WorldMapOrienter(this, b2, b3, b4, b5));
|
||||
this.decorations.add(new WorldMapDecoration(this, b2, b3, b4, b5));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -176,7 +176,7 @@ public class WorldMap extends WorldMapBase {
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] a(ItemStack itemstack, World world, EntityHuman entityhuman) {
|
||||
public byte[] getUpdatePacket(ItemStack itemstack, World world, EntityHuman entityhuman) {
|
||||
WorldMapHumanTracker worldmaphumantracker = (WorldMapHumanTracker) this.j.get(entityhuman);
|
||||
|
||||
if (worldmaphumantracker == null) {
|
||||
@@ -188,7 +188,7 @@ public class WorldMap extends WorldMapBase {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(int i, int j, int k) {
|
||||
public void flagDirty(int i, int j, int k) {
|
||||
super.a();
|
||||
|
||||
for (int l = 0; l < this.h.size(); ++l) {
|
||||
|
||||
Reference in New Issue
Block a user