summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java4
-rw-r--r--src/main/java/net/minecraft/server/Slot.java100
-rw-r--r--src/main/java/net/minecraft/server/TileEntityChest.java200
-rw-r--r--src/main/java/net/minecraft/server/TileEntityFurnace.java416
4 files changed, 360 insertions, 360 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 269ba319..042164f0 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -87,8 +87,8 @@ public class ItemBlock extends Item {
if (this.a == 79) {
world.a(i, j, k, 20);
}
- world.a(i, j, k, oldMaterial);
- world.c(i, j, k, oldData);
+ world.b(i, j, k, oldMaterial);
+ world.d(i, j, k, oldData);
} else {
world.g(i, j, k);
world.h(i, j, k, this.a);
diff --git a/src/main/java/net/minecraft/server/Slot.java b/src/main/java/net/minecraft/server/Slot.java
index 6827e9fd..738402e6 100644
--- a/src/main/java/net/minecraft/server/Slot.java
+++ b/src/main/java/net/minecraft/server/Slot.java
@@ -1,50 +1,50 @@
-package net.minecraft.server;
-
-public class Slot {
-
- public final int a; // CraftBukkit: private -> public
- public final IInventory b; // CraftBukkit: private -> public
- public int c;
- public int d;
- public int e;
-
- public Slot(IInventory iinventory, int i, int j, int k) {
- b = iinventory;
- a = i;
- d = j;
- e = k;
- }
-
- public void b() {
- d();
- }
-
- public boolean a(ItemStack itemstack) {
- return true;
- }
-
- public ItemStack c() {
- return b.a(a);
- }
-
- public void b(ItemStack itemstack) {
- b.a(a, itemstack);
- d();
- }
-
- public void d() {
- b.d();
- }
-
- public int a() {
- return b.c();
- }
-
- public ItemStack a(int i) {
- return b.b(a, i);
- }
-
- public boolean a(IInventory iinventory, int i) {
- return iinventory == b && i == a;
- }
-}
+package net.minecraft.server;
+
+public class Slot {
+
+ public final int a; // CraftBukkit: private -> public
+ public final IInventory b; // CraftBukkit: private -> public
+ public int c;
+ public int d;
+ public int e;
+
+ public Slot(IInventory iinventory, int i, int j, int k) {
+ b = iinventory;
+ a = i;
+ d = j;
+ e = k;
+ }
+
+ public void b() {
+ d();
+ }
+
+ public boolean a(ItemStack itemstack) {
+ return true;
+ }
+
+ public ItemStack c() {
+ return b.a(a);
+ }
+
+ public void b(ItemStack itemstack) {
+ b.a(a, itemstack);
+ d();
+ }
+
+ public void d() {
+ b.d();
+ }
+
+ public int a() {
+ return b.c();
+ }
+
+ public ItemStack a(int i) {
+ return b.b(a, i);
+ }
+
+ public boolean a(IInventory iinventory, int i) {
+ return iinventory == b && i == a;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 6e057db9..098631e5 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -1,100 +1,100 @@
-package net.minecraft.server;
-
-public class TileEntityChest extends TileEntity implements IInventory {
-
- private ItemStack e[];
-
- // CraftBukkit start
- public ItemStack[] getContents() {
- return e;
- }
- // CraftBukkit end
-
- public TileEntityChest() {
- e = new ItemStack[36];
- }
-
- public int h_() {
- return 27;
- }
-
- public ItemStack a(int i) {
- return e[i];
- }
-
- public ItemStack b(int i, int j) {
- if (e[i] != null) {
- if (e[i].a <= j) {
- ItemStack itemstack = e[i];
-
- e[i] = null;
- d();
- return itemstack;
- }
- ItemStack itemstack1 = e[i].a(j);
-
- if (e[i].a == 0) {
- e[i] = null;
- }
- d();
- return itemstack1;
- } else {
- return null;
- }
- }
-
- public void a(int i, ItemStack itemstack) {
- e[i] = itemstack;
- if (itemstack != null && itemstack.a > c()) {
- itemstack.a = c();
- }
- d();
- }
-
- public String b() {
- return "Chest";
- }
-
- public void a(NBTTagCompound nbttagcompound) {
- super.a(nbttagcompound);
- NBTTagList nbttaglist = nbttagcompound.k("Items");
-
- e = new ItemStack[h_()];
- for (int i = 0; i < nbttaglist.b(); i++) {
- NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.a(i);
- int j = nbttagcompound1.b("Slot") & 0xff;
-
- if (j >= 0 && j < e.length) {
- e[j] = new ItemStack(nbttagcompound1);
- }
- }
- }
-
- public void b(NBTTagCompound nbttagcompound) {
- super.b(nbttagcompound);
- NBTTagList nbttaglist = new NBTTagList();
-
- for (int i = 0; i < e.length; i++) {
- if (e[i] != null) {
- NBTTagCompound nbttagcompound1 = new NBTTagCompound();
-
- nbttagcompound1.a("Slot", (byte) i);
- e[i].a(nbttagcompound1);
- nbttaglist.a(((NBTBase) (nbttagcompound1)));
- }
- }
-
- nbttagcompound.a("Items", ((NBTBase) (nbttaglist)));
- }
-
- public int c() {
- return 64;
- }
-
- public boolean a_(EntityPlayer entityplayer) {
- if (a.m(b, c, d) != this) {
- return false;
- }
- return entityplayer.d((double) b + 0.5D, (double) c + 0.5D, (double) d + 0.5D) <= 64D;
- }
-}
+package net.minecraft.server;
+
+public class TileEntityChest extends TileEntity implements IInventory {
+
+ private ItemStack e[];
+
+ // CraftBukkit start
+ public ItemStack[] getContents() {
+ return e;
+ }
+ // CraftBukkit end
+
+ public TileEntityChest() {
+ e = new ItemStack[36];
+ }
+
+ public int h_() {
+ return 27;
+ }
+
+ public ItemStack a(int i) {
+ return e[i];
+ }
+
+ public ItemStack b(int i, int j) {
+ if (e[i] != null) {
+ if (e[i].a <= j) {
+ ItemStack itemstack = e[i];
+
+ e[i] = null;
+ d();
+ return itemstack;
+ }
+ ItemStack itemstack1 = e[i].a(j);
+
+ if (e[i].a == 0) {
+ e[i] = null;
+ }
+ d();
+ return itemstack1;
+ } else {
+ return null;
+ }
+ }
+
+ public void a(int i, ItemStack itemstack) {
+ e[i] = itemstack;
+ if (itemstack != null && itemstack.a > c()) {
+ itemstack.a = c();
+ }
+ d();
+ }
+
+ public String b() {
+ return "Chest";
+ }
+
+ public void a(NBTTagCompound nbttagcompound) {
+ super.a(nbttagcompound);
+ NBTTagList nbttaglist = nbttagcompound.k("Items");
+
+ e = new ItemStack[h_()];
+ for (int i = 0; i < nbttaglist.b(); i++) {
+ NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.a(i);
+ int j = nbttagcompound1.b("Slot") & 0xff;
+
+ if (j >= 0 && j < e.length) {
+ e[j] = new ItemStack(nbttagcompound1);
+ }
+ }
+ }
+
+ public void b(NBTTagCompound nbttagcompound) {
+ super.b(nbttagcompound);
+ NBTTagList nbttaglist = new NBTTagList();
+
+ for (int i = 0; i < e.length; i++) {
+ if (e[i] != null) {
+ NBTTagCompound nbttagcompound1 = new NBTTagCompound();
+
+ nbttagcompound1.a("Slot", (byte) i);
+ e[i].a(nbttagcompound1);
+ nbttaglist.a(((NBTBase) (nbttagcompound1)));
+ }
+ }
+
+ nbttagcompound.a("Items", ((NBTBase) (nbttaglist)));
+ }
+
+ public int c() {
+ return 64;
+ }
+
+ public boolean a_(EntityPlayer entityplayer) {
+ if (a.m(b, c, d) != this) {
+ return false;
+ }
+ return entityplayer.d((double) b + 0.5D, (double) c + 0.5D, (double) d + 0.5D) <= 64D;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index e7122765..62e51c13 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -1,209 +1,209 @@
-package net.minecraft.server;
-
-public class TileEntityFurnace extends TileEntity implements IInventory {
-
- private ItemStack h[];
- public int e;
- public int f;
- public int g;
-
- // CraftBukkit start
- public ItemStack[] getContents() {
- return h;
- }
- // CraftBukkit end
-
- public TileEntityFurnace() {
- h = new ItemStack[3];
- e = 0;
- f = 0;
- g = 0;
- }
-
- public int h_() {
- return h.length;
- }
-
- public ItemStack a(int j) {
- return h[j];
- }
-
- public ItemStack b(int j, int k) {
- if (h[j] != null) {
- if (h[j].a <= k) {
- ItemStack itemstack = h[j];
-
- h[j] = null;
- return itemstack;
- }
- ItemStack itemstack1 = h[j].a(k);
-
- if (h[j].a == 0) {
- h[j] = null;
- }
- return itemstack1;
- } else {
- return null;
- }
- }
-
- public void a(int j, ItemStack itemstack) {
- h[j] = itemstack;
- if (itemstack != null && itemstack.a > c()) {
- itemstack.a = c();
- }
- }
-
- public String b() {
- return "Furnace";
- }
-
- public void a(NBTTagCompound nbttagcompound) {
- super.a(nbttagcompound);
- NBTTagList nbttaglist = nbttagcompound.k("Items");
-
- h = new ItemStack[h_()];
- for (int j = 0; j < nbttaglist.b(); j++) {
- NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.a(j);
- byte byte0 = nbttagcompound1.b("Slot");
-
- if (byte0 >= 0 && byte0 < h.length) {
- h[byte0] = new ItemStack(nbttagcompound1);
- }
- }
-
- e = ((int) (nbttagcompound.c("BurnTime")));
- g = ((int) (nbttagcompound.c("CookTime")));
- f = a(h[1]);
- }
-
- public void b(NBTTagCompound nbttagcompound) {
- super.b(nbttagcompound);
- nbttagcompound.a("BurnTime", (short) e);
- nbttagcompound.a("CookTime", (short) g);
- NBTTagList nbttaglist = new NBTTagList();
-
- for (int j = 0; j < h.length; j++) {
- if (h[j] != null) {
- NBTTagCompound nbttagcompound1 = new NBTTagCompound();
-
- nbttagcompound1.a("Slot", (byte) j);
- h[j].a(nbttagcompound1);
- nbttaglist.a(((NBTBase) (nbttagcompound1)));
- }
- }
-
- nbttagcompound.a("Items", ((NBTBase) (nbttaglist)));
- }
-
- public int c() {
- return 64;
- }
-
- public boolean e() {
- return e > 0;
- }
-
- public void f() {
- boolean flag = e > 0;
- boolean flag1 = false;
-
- if (e > 0) {
- e--;
- }
- if (!a.z) {
- if (e == 0 && i()) {
- f = e = a(h[1]);
- if (e > 0) {
- flag1 = true;
- if (h[1] != null) {
- h[1].a--;
- if (h[1].a == 0) {
- h[1] = null;
- }
- }
- }
- }
- if (e() && i()) {
- g++;
- if (g == 200) {
- g = 0;
- h();
- flag1 = true;
- }
- } else {
- g = 0;
- }
- if (flag != (e > 0)) {
- flag1 = true;
- BlockFurnace.a(e > 0, a, b, c, d);
- }
- }
- if (flag1) {
- d();
- }
- }
-
- private boolean i() {
- if (h[0] == null) {
- return false;
- }
- ItemStack itemstack = FurnaceRecipes.a().a(h[0].a().ba);
-
- if (itemstack == null) {
- return false;
- }
- if (h[2] == null) {
- return true;
- }
- if (!h[2].a(itemstack)) {
- return false;
- }
- if (h[2].a < c() && h[2].a < h[2].b()) {
- return true;
- }
- return h[2].a < itemstack.b();
- }
-
- public void h() {
- if (!i()) {
- return;
- }
- ItemStack itemstack = FurnaceRecipes.a().a(h[0].a().ba);
-
- if (h[2] == null) {
- h[2] = itemstack.j();
- } else if (h[2].c == itemstack.c) {
- h[2].a++;
- }
- h[0].a--;
- if (h[0].a <= 0) {
- h[0] = null;
- }
- }
-
- private int a(ItemStack itemstack) {
- if (itemstack == null) {
- return 0;
- }
- int j = itemstack.a().ba;
-
- if (j < 256 && Block.m[j].bt == Material.c) {
- return 300;
- }
- if (j == Item.B.ba) {
- return 100;
- }
- if (j == Item.k.ba) {
- return 1600;
- }
- return j != Item.aw.ba ? 0 : 20000;
- }
-
- public boolean a_(EntityPlayer entityplayer) {
- if (a.m(b, c, d) != this) {
- return false;
- }
- return entityplayer.d((double) b + 0.5D, (double) c + 0.5D, (double) d + 0.5D) <= 64D;
- }
+package net.minecraft.server;
+
+public class TileEntityFurnace extends TileEntity implements IInventory {
+
+ private ItemStack h[];
+ public int e;
+ public int f;
+ public int g;
+
+ // CraftBukkit start
+ public ItemStack[] getContents() {
+ return h;
+ }
+ // CraftBukkit end
+
+ public TileEntityFurnace() {
+ h = new ItemStack[3];
+ e = 0;
+ f = 0;
+ g = 0;
+ }
+
+ public int h_() {
+ return h.length;
+ }
+
+ public ItemStack a(int j) {
+ return h[j];
+ }
+
+ public ItemStack b(int j, int k) {
+ if (h[j] != null) {
+ if (h[j].a <= k) {
+ ItemStack itemstack = h[j];
+
+ h[j] = null;
+ return itemstack;
+ }
+ ItemStack itemstack1 = h[j].a(k);
+
+ if (h[j].a == 0) {
+ h[j] = null;
+ }
+ return itemstack1;
+ } else {
+ return null;
+ }
+ }
+
+ public void a(int j, ItemStack itemstack) {
+ h[j] = itemstack;
+ if (itemstack != null && itemstack.a > c()) {
+ itemstack.a = c();
+ }
+ }
+
+ public String b() {
+ return "Furnace";
+ }
+
+ public void a(NBTTagCompound nbttagcompound) {
+ super.a(nbttagcompound);
+ NBTTagList nbttaglist = nbttagcompound.k("Items");
+
+ h = new ItemStack[h_()];
+ for (int j = 0; j < nbttaglist.b(); j++) {
+ NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.a(j);
+ byte byte0 = nbttagcompound1.b("Slot");
+
+ if (byte0 >= 0 && byte0 < h.length) {
+ h[byte0] = new ItemStack(nbttagcompound1);
+ }
+ }
+
+ e = ((int) (nbttagcompound.c("BurnTime")));
+ g = ((int) (nbttagcompound.c("CookTime")));
+ f = a(h[1]);
+ }
+
+ public void b(NBTTagCompound nbttagcompound) {
+ super.b(nbttagcompound);
+ nbttagcompound.a("BurnTime", (short) e);
+ nbttagcompound.a("CookTime", (short) g);
+ NBTTagList nbttaglist = new NBTTagList();
+
+ for (int j = 0; j < h.length; j++) {
+ if (h[j] != null) {
+ NBTTagCompound nbttagcompound1 = new NBTTagCompound();
+
+ nbttagcompound1.a("Slot", (byte) j);
+ h[j].a(nbttagcompound1);
+ nbttaglist.a(((NBTBase) (nbttagcompound1)));
+ }
+ }
+
+ nbttagcompound.a("Items", ((NBTBase) (nbttaglist)));
+ }
+
+ public int c() {
+ return 64;
+ }
+
+ public boolean e() {
+ return e > 0;
+ }
+
+ public void f() {
+ boolean flag = e > 0;
+ boolean flag1 = false;
+
+ if (e > 0) {
+ e--;
+ }
+ if (!a.z) {
+ if (e == 0 && i()) {
+ f = e = a(h[1]);
+ if (e > 0) {
+ flag1 = true;
+ if (h[1] != null) {
+ h[1].a--;
+ if (h[1].a == 0) {
+ h[1] = null;
+ }
+ }
+ }
+ }
+ if (e() && i()) {
+ g++;
+ if (g == 200) {
+ g = 0;
+ h();
+ flag1 = true;
+ }
+ } else {
+ g = 0;
+ }
+ if (flag != (e > 0)) {
+ flag1 = true;
+ BlockFurnace.a(e > 0, a, b, c, d);
+ }
+ }
+ if (flag1) {
+ d();
+ }
+ }
+
+ private boolean i() {
+ if (h[0] == null) {
+ return false;
+ }
+ ItemStack itemstack = FurnaceRecipes.a().a(h[0].a().ba);
+
+ if (itemstack == null) {
+ return false;
+ }
+ if (h[2] == null) {
+ return true;
+ }
+ if (!h[2].a(itemstack)) {
+ return false;
+ }
+ if (h[2].a < c() && h[2].a < h[2].b()) {
+ return true;
+ }
+ return h[2].a < itemstack.b();
+ }
+
+ public void h() {
+ if (!i()) {
+ return;
+ }
+ ItemStack itemstack = FurnaceRecipes.a().a(h[0].a().ba);
+
+ if (h[2] == null) {
+ h[2] = itemstack.j();
+ } else if (h[2].c == itemstack.c) {
+ h[2].a++;
+ }
+ h[0].a--;
+ if (h[0].a <= 0) {
+ h[0] = null;
+ }
+ }
+
+ private int a(ItemStack itemstack) {
+ if (itemstack == null) {
+ return 0;
+ }
+ int j = itemstack.a().ba;
+
+ if (j < 256 && Block.m[j].bt == Material.c) {
+ return 300;
+ }
+ if (j == Item.B.ba) {
+ return 100;
+ }
+ if (j == Item.k.ba) {
+ return 1600;
+ }
+ return j != Item.aw.ba ? 0 : 20000;
+ }
+
+ public boolean a_(EntityPlayer entityplayer) {
+ if (a.m(b, c, d) != this) {
+ return false;
+ }
+ return entityplayer.d((double) b + 0.5D, (double) c + 0.5D, (double) d + 0.5D) <= 64D;
+ }
} \ No newline at end of file