Update CraftBukkit to Minecraft 1.4.6

This commit is contained in:
feildmaster
2012-12-19 22:03:52 -06:00
parent 9f1bf124ee
commit 23b6764374
115 changed files with 1930 additions and 1426 deletions

View File

@@ -149,9 +149,17 @@ public final class ItemStack {
public void damage(int i, EntityLiving entityliving) {
if (this.f()) {
if (i > 0 && entityliving instanceof EntityHuman) {
int j = EnchantmentManager.getDurabilityEnchantmentLevel(entityliving);
int j = EnchantmentManager.getEnchantmentLevel(Enchantment.DURABILITY.id, this);
int k = 0;
if (j > 0 && entityliving.world.random.nextInt(j + 1) > 0) {
for (int l = 0; j > 0 && l < i; ++l) {
if (EnchantmentDurability.a(this, j, entityliving.world.random)) {
++k;
}
}
i -= k;
if (i <= 0) {
return;
}
}
@@ -237,7 +245,7 @@ public final class ItemStack {
}
public String a() {
return Item.byId[this.id].c_(this);
return Item.byId[this.id].d(this);
}
public static ItemStack b(ItemStack itemstack) {
@@ -262,11 +270,11 @@ public final class ItemStack {
}
public int m() {
return this.getItem().a(this);
return this.getItem().c_(this);
}
public EnumAnimation n() {
return this.getItem().d_(this);
return this.getItem().b_(this);
}
public void b(World world, EntityHuman entityhuman, int i) {
@@ -290,7 +298,7 @@ public final class ItemStack {
}
public String r() {
String s = this.getItem().j(this);
String s = this.getItem().l(this);
if (this.tag != null && this.tag.hasKey("display")) {
NBTTagCompound nbttagcompound = this.tag.getCompound("display");
@@ -320,7 +328,7 @@ public final class ItemStack {
}
public boolean v() {
return !this.getItem().k(this) ? false : !this.hasEnchantments();
return !this.getItem().d_(this) ? false : !this.hasEnchantments();
}
public void addEnchantment(Enchantment enchantment, int i) {