summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/ItemStack.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemStack.java')
-rw-r--r--src/main/java/net/minecraft/server/ItemStack.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index f9aaf4ab..c9d74d37 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -169,7 +169,7 @@ public final class ItemStack {
world.notifyAndUpdatePhysics(x, y, z, null, oldBlock, block, updateFlag); // send null chunk as chunk.k() returns false by this point
}
- entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)], 1);
}
}
world.capturedBlockStates.clear();
@@ -191,7 +191,7 @@ public final class ItemStack {
}
public NBTTagCompound save(NBTTagCompound nbttagcompound) {
- nbttagcompound.setShort("id", (short) Item.b(this.item));
+ nbttagcompound.setShort("id", (short) Item.getId(this.item));
nbttagcompound.setByte("Count", (byte) this.count);
nbttagcompound.setShort("Damage", (short) this.damage);
if (this.tag != null) {
@@ -202,7 +202,7 @@ public final class ItemStack {
}
public void c(NBTTagCompound nbttagcompound) {
- this.item = Item.d(nbttagcompound.getShort("id"));
+ this.item = Item.getById(nbttagcompound.getShort("id"));
this.count = nbttagcompound.getByte("Count");
/* CraftBukkit start - Route through setData for filtering
this.damage = nbttagcompound.getShort("Damage");
@@ -307,15 +307,15 @@ public final class ItemStack {
public void damage(int i, EntityLiving entityliving) {
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
if (this.g()) {
- if (this.isDamaged(i, entityliving.aH())) {
+ if (this.isDamaged(i, entityliving.aI())) {
entityliving.a(this);
--this.count;
if (entityliving instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entityliving;
- entityhuman.a(StatisticList.BREAK_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.BREAK_ITEM_COUNT[Item.getId(this.item)], 1);
if (this.count == 0 && this.getItem() instanceof ItemBow) {
- entityhuman.bF();
+ entityhuman.bG();
}
}
@@ -339,7 +339,7 @@ public final class ItemStack {
boolean flag = this.item.a(this, entityliving, (EntityLiving) entityhuman);
if (flag) {
- entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)], 1);
}
}
@@ -347,7 +347,7 @@ public final class ItemStack {
boolean flag = this.item.a(this, world, block, i, j, k, entityhuman);
if (flag) {
- entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.b(this.item)], 1);
+ entityhuman.a(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)], 1);
}
}
@@ -406,7 +406,7 @@ public final class ItemStack {
}
public void a(World world, EntityHuman entityhuman, int i) {
- entityhuman.a(StatisticList.CRAFT_BLOCK_COUNT[Item.b(this.item)], i);
+ entityhuman.a(StatisticList.CRAFT_BLOCK_COUNT[Item.getId(this.item)], i);
this.item.d(this, world, entityhuman);
}