Update CraftBukkit to Minecraft 1.3.1

This commit is contained in:
feildmaster
2012-07-29 02:33:13 -05:00
committed by Travis Watkins
parent 08e2923bd4
commit a43d621c01
240 changed files with 10763 additions and 9150 deletions

View File

@@ -3,15 +3,13 @@ package net.minecraft.server;
import java.util.HashMap;
import java.util.Map;
// CraftBukkit start
import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
public class TileEntity {
private static Map a = new HashMap();
private static Map b = new HashMap();
public World world;
protected World world;
public int x;
public int y;
public int z;
@@ -22,7 +20,7 @@ public class TileEntity {
public TileEntity() {}
private static void a(Class oclass, String s) {
if (b.containsKey(s)) {
if (a.containsKey(s)) {
throw new IllegalArgumentException("Duplicate id: " + s);
} else {
a.put(s, oclass);
@@ -30,6 +28,14 @@ public class TileEntity {
}
}
public void a(World world) {
this.world = world;
}
public boolean m() {
return this.world != null;
}
public void a(NBTTagCompound nbttagcompound) {
this.x = nbttagcompound.getInt("x");
this.y = nbttagcompound.getInt("y");
@@ -49,7 +55,7 @@ public class TileEntity {
}
}
public void q_() {}
public void g() {}
public static TileEntity c(NBTTagCompound nbttagcompound) {
TileEntity tileentity = null;
@@ -73,7 +79,7 @@ public class TileEntity {
return tileentity;
}
public int k() {
public int n() {
if (this.p == -1) {
this.p = this.world.getData(this.x, this.y, this.z);
}
@@ -88,11 +94,11 @@ public class TileEntity {
}
}
public Packet d() {
public Packet e() {
return null;
}
public boolean l() {
public boolean p() {
return this.o;
}
@@ -100,7 +106,7 @@ public class TileEntity {
this.o = true;
}
public void m() {
public void q() {
this.o = false;
}
@@ -114,6 +120,7 @@ public class TileEntity {
static {
a(TileEntityFurnace.class, "Furnace");
a(TileEntityChest.class, "Chest");
a(TileEntityEnderChest.class, "EnderChest");
a(TileEntityRecordPlayer.class, "RecordPlayer");
a(TileEntityDispenser.class, "Trap");
a(TileEntitySign.class, "Sign");
@@ -128,7 +135,7 @@ public class TileEntity {
// CraftBukkit start
public InventoryHolder getOwner() {
org.bukkit.block.BlockState state = world.getWorld().getBlockAt(x, y, z).getState();
if(state instanceof InventoryHolder) return (InventoryHolder) state;
if (state instanceof InventoryHolder) return (InventoryHolder) state;
return null;
}
// CraftBukkit end