Update for Minecraft 1.8

This commit is contained in:
Dinnerbone
2011-09-15 01:23:52 +01:00
parent 54bcd1c1f3
commit 5b2c774edc
107 changed files with 4415 additions and 3504 deletions

View File

@@ -21,13 +21,13 @@ public class ItemWorldMap extends ItemWorldMapBase {
String s = "map_" + itemstack.getData();
worldmap = new WorldMap(s);
worldmap.b = world.q().c();
worldmap.c = world.q().e();
worldmap.b = world.p().c();
worldmap.c = world.p().e();
worldmap.e = 3;
worldmap.map = (byte) world.worldProvider.dimension;
worldmap.a();
world.a(s, (WorldMapBase) worldmap);
// CraftBukkit start
MapInitializeEvent event = new MapInitializeEvent(worldmap.mapView);
Bukkit.getServer().getPluginManager().callEvent(event);
@@ -72,7 +72,6 @@ public class ItemWorldMap extends ItemWorldMapBase {
byte b2 = 0;
int[] aint = new int[256];
Chunk chunk = world.getChunkAtWorldCoords(i3, j3);
if (chunk.isEmpty()) continue; // CraftBukkit
int k3 = i3 & 15;
int l3 = j3 & 15;
int i4 = 0;
@@ -106,7 +105,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
j5 = chunk.getTypeId(l4 + k3, k4 - 1, j4 + l3);
if (j5 == 0) {
flag1 = false;
} else if (k4 > 0 && j5 > 0 && Block.byId[j5].material.C == MaterialMapColor.b) {
} else if (k4 > 0 && j5 > 0 && Block.byId[j5].material.D == MaterialMapColor.b) {
flag1 = false;
}
@@ -164,7 +163,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
i5 = 0;
if (j4 > 0) {
MaterialMapColor materialmapcolor = Block.byId[j4].material.C;
MaterialMapColor materialmapcolor = Block.byId[j4].material.D;
if (materialmapcolor == MaterialMapColor.n) {
d2 = (double) i4 * 0.1D + (double) (k1 + j2 & 1) * 0.2D;
@@ -225,7 +224,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
}
}
public void c(ItemStack itemstack, World world, EntityHuman entityhuman) {
public void d(ItemStack itemstack, World world, EntityHuman entityhuman) {
itemstack.b(world.b("map"));
String s = "map_" + itemstack.getData();
WorldMap worldmap = new WorldMap(s);
@@ -234,11 +233,11 @@ public class ItemWorldMap extends ItemWorldMapBase {
worldmap.b = MathHelper.floor(entityhuman.locX);
worldmap.c = MathHelper.floor(entityhuman.locZ);
worldmap.e = 3;
worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit
worldmap.map = (byte) world.worldProvider.dimension;
worldmap.a();
}
public Packet b(ItemStack itemstack, World world, EntityHuman entityhuman) {
public Packet c(ItemStack itemstack, World world, EntityHuman entityhuman) {
byte[] abyte = this.a(itemstack, world).a(itemstack, world, entityhuman);
return abyte == null ? null : new Packet131((short) Item.MAP.id, (short) itemstack.getData(), abyte);