Update CraftBukkit to Minecraft 1.4(.2).

This commit is contained in:
Travis Watkins
2012-10-24 22:53:23 -05:00
committed by EvilSeph
parent b9a72531b6
commit 60819c6693
237 changed files with 10104 additions and 4863 deletions

View File

@@ -107,6 +107,31 @@ public class PlayerInventory implements IInventory {
return -1;
}
public int b(int i, int j) {
int k = 0;
int l;
ItemStack itemstack;
for (l = 0; l < this.items.length; ++l) {
itemstack = this.items[l];
if (itemstack != null && (i <= -1 || itemstack.id == i) && (j <= -1 || itemstack.getData() == j)) {
k += itemstack.count;
this.items[l] = null;
}
}
for (l = 0; l < this.armor.length; ++l) {
itemstack = this.armor[l];
if (itemstack != null && (i <= -1 || itemstack.id == i) && (j <= -1 || itemstack.getData() == j)) {
k += itemstack.count;
this.armor[l] = null;
}
}
return k;
}
private int e(ItemStack itemstack) {
int i = itemstack.id;
int j = itemstack.count;
@@ -161,7 +186,7 @@ public class PlayerInventory implements IInventory {
}
}
public void k() {
public void j() {
for (int i = 0; i < this.items.length; ++i) {
if (this.items[i] != null) {
this.items[i].a(this.player.world, this.player, i, this.itemInHandIndex == i);
@@ -372,7 +397,11 @@ public class PlayerInventory implements IInventory {
}
}
public int l() {
public ItemStack f(int i) {
return this.armor[i];
}
public int k() {
int i = 0;
ItemStack[] aitemstack = this.armor;
int j = aitemstack.length;
@@ -406,7 +435,7 @@ public class PlayerInventory implements IInventory {
}
}
public void m() {
public void l() {
int i;
for (i = 0; i < this.items.length; ++i) {
@@ -454,7 +483,7 @@ public class PlayerInventory implements IInventory {
for (j = 0; j < i; ++j) {
itemstack1 = aitemstack[j];
if (itemstack1 != null && itemstack1.c(itemstack)) {
if (itemstack1 != null && itemstack1.doMaterialsMatch(itemstack)) {
return true;
}
}
@@ -464,7 +493,7 @@ public class PlayerInventory implements IInventory {
for (j = 0; j < i; ++j) {
itemstack1 = aitemstack[j];
if (itemstack1 != null && itemstack1.c(itemstack)) {
if (itemstack1 != null && itemstack1.doMaterialsMatch(itemstack)) {
return true;
}
}