Seriously fix natural drops. Fixes BUKKIT-1297 and fixes BUKKIT-1295

This commit is contained in:
feildmaster
2012-03-23 06:08:54 -05:00
committed by EvilSeph
parent ff22e4e341
commit 40e0962735
11 changed files with 27 additions and 35 deletions

View File

@@ -17,7 +17,7 @@ public class BlockPistonExtension extends Block {
public ArrayList<ItemStack> calculateDrops(World world, EntityHuman entityhuman, int i, int j, int k, int d) {
super.calculateDrops(world, entityhuman, i, j, k, d);
int l = world.getData(i, j, k) & 0x7;
if (l > 5 || l < 0) return super.dropList;
if (l > 5 || l < 0) return this.dropList;
int i1 = Facing.OPPOSITE_FACING[b(l)];
i += Facing.b[i1];
@@ -26,9 +26,9 @@ public class BlockPistonExtension extends Block {
int j1 = world.getTypeId(i, j, k);
if (j1 == Block.PISTON.id || j1 == Block.PISTON_STICKY.id) {
super.dropList.add(new ItemStack(Block.byId[j1], 1));
this.dropList.add(new ItemStack(Block.byId[j1], 1));
}
return super.dropList;
return this.dropList;
}
// CraftBukkit end