Update CraftBukkit to Minecraft 1.7.2

This commit is contained in:
mbax
2013-11-04 07:07:38 -06:00
committed by Wesley Wolfe
parent ff8b70fbb7
commit 2726696652
349 changed files with 14339 additions and 11287 deletions

View File

@@ -4,8 +4,7 @@ public class ItemHoe extends Item {
protected EnumToolMaterial a;
public ItemHoe(int i, EnumToolMaterial enumtoolmaterial) {
super(i);
public ItemHoe(EnumToolMaterial enumtoolmaterial) {
this.a = enumtoolmaterial;
this.maxStackSize = 1;
this.setMaxDurability(enumtoolmaterial.a());
@@ -17,23 +16,21 @@ public class ItemHoe extends Item {
if (!entityhuman.a(i, j, k, l, itemstack)) {
return false;
} else {
int i1 = world.getTypeId(i, j, k);
int j1 = world.getTypeId(i, j + 1, k);
Block block = world.getType(i, j, k);
if (l != 0 && j1 == 0 && (i1 == Block.GRASS.id || i1 == Block.DIRT.id)) {
Block block = Block.SOIL;
if (l != 0 && world.getType(i, j + 1, k).getMaterial() == Material.AIR && (block == Blocks.GRASS || block == Blocks.DIRT)) {
Block block1 = Blocks.SOIL;
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.getStepSound(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F);
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block1.stepSound.getStepSound(), (block1.stepSound.getVolume1() + 1.0F) / 2.0F, block1.stepSound.getVolume2() * 0.8F);
if (world.isStatic) {
return true;
} else {
// CraftBukkit start - Hoes - blockface -1 for 'SELF'
// world.setTypeIdUpdate(i, j, k, block.id);
if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, block.id, 0, clickedX, clickedY, clickedZ)) {
// world.setTypeUpdate(i, j, k, block1);
if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, block1, 0, clickedX, clickedY, clickedZ)) {
return false;
}
// CraftBukkit end
itemstack.damage(1, entityhuman);
return true;
}
@@ -43,7 +40,7 @@ public class ItemHoe extends Item {
}
}
public String g() {
public String i() {
return this.a.toString();
}
}