mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 17:52:02 -07:00
Update CraftBukkit to Minecraft 1.3.1
This commit is contained in:
committed by
Travis Watkins
parent
08e2923bd4
commit
a43d621c01
@@ -9,7 +9,7 @@ import org.bukkit.entity.HumanEntity;
|
||||
|
||||
public class TileEntityChest extends TileEntity implements IInventory {
|
||||
|
||||
private ItemStack[] items = new ItemStack[27]; // CraftBukkit
|
||||
private ItemStack[] items = new ItemStack[27]; // CraftBukkit - 36 -> 27
|
||||
public boolean a = false;
|
||||
public TileEntityChest b;
|
||||
public TileEntityChest c;
|
||||
@@ -20,6 +20,8 @@ public class TileEntityChest extends TileEntity implements IInventory {
|
||||
public int h;
|
||||
private int ticks;
|
||||
|
||||
public TileEntityChest() {}
|
||||
|
||||
// CraftBukkit start
|
||||
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||
private int maxStack = MAX_STACK;
|
||||
@@ -45,8 +47,6 @@ public class TileEntityChest extends TileEntity implements IInventory {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public TileEntityChest() {}
|
||||
|
||||
public int getSize() {
|
||||
return 27;
|
||||
}
|
||||
@@ -190,30 +190,12 @@ public class TileEntityChest extends TileEntity implements IInventory {
|
||||
}
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
private TileEntityChest getTileEntity(int x, int y, int z) {
|
||||
if (this.world == null) return null; // CraftBukkit
|
||||
TileEntity entity = this.world.getTileEntity(x, y, z);
|
||||
|
||||
if (entity instanceof TileEntityChest) {
|
||||
return (TileEntityChest) entity;
|
||||
} else {
|
||||
String name = "null";
|
||||
if (entity != null) {
|
||||
name = entity.toString();
|
||||
}
|
||||
world.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is a chest but has a " + name);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public void q_() {
|
||||
super.q_();
|
||||
public void g() {
|
||||
super.g();
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
this.i();
|
||||
if (++this.ticks % (20 * 4) == 0) { // CraftBukkit
|
||||
this.world.playNote(this.x, this.y, this.z, 1, this.h);
|
||||
;
|
||||
}
|
||||
|
||||
this.g = this.f;
|
||||
@@ -277,16 +259,16 @@ public class TileEntityChest extends TileEntity implements IInventory {
|
||||
}
|
||||
}
|
||||
|
||||
public void f() {
|
||||
public void startOpen() {
|
||||
++this.h;
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
this.world.playNote(this.x, this.y, this.z, 1, this.h);
|
||||
this.world.playNote(this.x, this.y, this.z, Block.CHEST.id, 1, this.h);
|
||||
}
|
||||
|
||||
public void g() {
|
||||
public void f() {
|
||||
--this.h;
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
this.world.playNote(this.x, this.y, this.z, 1, this.h);
|
||||
this.world.playNote(this.x, this.y, this.z, Block.CHEST.id, 1, this.h);
|
||||
}
|
||||
|
||||
public void j() {
|
||||
|
Reference in New Issue
Block a user