From c6954528130e4679fee699d7a2900f3110b49dd3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 14 Jan 2011 13:31:10 +0000 Subject: [PATCH] Update to Minecraft Server 1.2 By: Dinnerbone --- paper-server/pom.xml | 2 +- .../main/java/org/bukkit/craftbukkit/CraftBlock.java | 10 +++++----- .../java/org/bukkit/craftbukkit/CraftInventory.java | 6 +++--- .../java/org/bukkit/craftbukkit/CraftItemStack.java | 2 +- .../main/java/org/bukkit/craftbukkit/CraftWorld.java | 2 +- .../org/bukkit/craftbukkit/block/CraftBlockState.java | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/paper-server/pom.xml b/paper-server/pom.xml index 229ed354fa..d704fc54f9 100644 --- a/paper-server/pom.xml +++ b/paper-server/pom.xml @@ -23,7 +23,7 @@ org.bukkit minecraft-server - 1.1_02 + 1.2 jar compile diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftBlock.java index 64b13a4fe3..18ea916a60 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftBlock.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftBlock.java @@ -24,7 +24,7 @@ public class CraftBlock implements Block { this.z = z; this.type = type; this.data = data; - this.light = (byte)world.getHandle().i(x, y, z); + this.light = (byte)world.getHandle().j(x, y, z); this.chunk = (CraftChunk)world.getChunkAt(x << 4, z << 4); } @@ -121,7 +121,7 @@ public class CraftBlock implements Block { */ public boolean setTypeID(final int type) { this.type = type; - return world.getHandle().d(x, y, z, type); + return world.getHandle().e(x, y, z, type); } /** @@ -259,9 +259,9 @@ public class CraftBlock implements Block { Material material = getType(); switch (material) { - case Sign: - case SignPost: - case WallSign: + case SIGN: + case SIGN_POST: + case WALL_SIGN: return new CraftSign(this); default: return new CraftBlockState(this); diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventory.java index b79413d689..b0461d8059 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInventory.java @@ -19,7 +19,7 @@ public class CraftInventory implements org.bukkit.Inventory { } public int getSize() { - return getInventory().a(); + return getInventory().h_(); } public String getName() { @@ -42,7 +42,7 @@ public class CraftInventory implements org.bukkit.Inventory { } public void setItem(int index, ItemStack item) { - getInventory().a( index, new net.minecraft.server.ItemStack( item.getTypeID(), item.getAmount())); + getInventory().a( index, new net.minecraft.server.ItemStack( item.getTypeID(), item.getAmount(), 0)); } public boolean contains(int materialId) { @@ -121,7 +121,7 @@ public class CraftInventory implements org.bukkit.Inventory { } public int firstEmpty() { - return first(Material.Air); + return first(Material.AIR); } public int firstPartial(int materialId) { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java index 710bad4f53..495d46bd3b 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftItemStack.java @@ -36,7 +36,7 @@ public class CraftItemStack extends ItemStack { item = null; } else { if (item == null) { - item = new net.minecraft.server.ItemStack(type); + item = new net.minecraft.server.ItemStack(type, 1, 0); super.setAmount(1); } else { item.c = type; diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 66f28647d0..993ab7a95d 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -213,7 +213,7 @@ public class CraftWorld implements World { } public TileEntity getTileEntityAt(final int x, final int y, final int z) { - return world.l(x, y, z); + return world.m(x, y, z); } public String getName() { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index f2a0c2756d..d9ba4deba4 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -110,7 +110,7 @@ public class CraftBlockState implements BlockState { */ public void setTypeID(final int type) { this.type = type; - world.getHandle().d(x, y, z, type); + world.getHandle().e(x, y, z, type); } /**