[Bleeding] Added getting and setting drops to all appropriate events. Fixes BUKKIT-397 and fixes BUKKIT-1252

- Allows drops in creative mode by adding items to the getDrops() list
- Contents of containers are not reported
- Contents of storage minecarts are not reported
This commit is contained in:
Celtic Minstrel
2012-03-05 14:21:43 -05:00
committed by EvilSeph
parent 8d62de7055
commit 5ba8928041
20 changed files with 344 additions and 60 deletions

View File

@@ -129,14 +129,16 @@ public class BlockBed extends BlockDirectional {
}
} else if (world.getTypeId(i + a[j1][0], j, k + a[j1][1]) != this.id) {
world.setTypeId(i, j, k, 0);
/* CraftBukkit - Move this to on break instead of on physics
if (!world.isStatic) {
this.b(world, i, j, k, i1, 0);
}
// */
}
}
public int getDropType(int i, Random random, int j) {
return d(i) ? 0 : Item.BED.id;
return /* d(i) ? 0 CraftBukkit : */ Item.BED.id;
}
private void s() {
@@ -190,9 +192,9 @@ public class BlockBed extends BlockDirectional {
}
public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) {
if (!d(l)) {
//if (!d(l)) { // CraftBukkit
super.dropNaturally(world, i, j, k, l, f, 0);
}
// } // CraftBukkit
}
public int g() {