mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Reverting the Drop API for now, we need to re-evalute this as it is causing too many issues and blocking releases.
This reverts commits: - d2d03afc8854394aeefb40ea5ebf224c8032b19f - 6245746e91123dd8ef70e5f15b7cdfc7e36d8e8c - 41fae5c613e9e69a8f6bdf33b23bb09d7f407433 - c34bdecab42cf4098054a5ea43e1c2958d44ae92 - d7445084ac9a90fa0b66d8b050b8d0d2a062eaf3 - 6a6ed2e6ae2328a8a791bcc6857c44dc6c6a7030 - a783bc4dc95da8e26c673abe48fad96b550aba28 - cb50fd68766df8e07631ba5be85759f8257e8068 - 34dfff2ad5c407c712b2783f02960aac5e8649f2 - f33b513820de987b49a4338e85df80968217a601 - 5fd9fdfde055e6eb6a83db246d009b69377b7c94 - 2795b116f40d06551fbb7b96d1963c0ddbeac384
This commit is contained in:
@@ -13,28 +13,9 @@ public class BlockPistonExtension extends Block {
|
||||
this.c(0.5F);
|
||||
}
|
||||
|
||||
// CraftBukkit start - Support getDrops() in BlockBreakEvent
|
||||
public java.util.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 this.dropList;
|
||||
int i1 = Facing.OPPOSITE_FACING[b(l)];
|
||||
|
||||
i += Facing.b[i1];
|
||||
j += Facing.c[i1];
|
||||
k += Facing.d[i1];
|
||||
int j1 = world.getTypeId(i, j, k);
|
||||
|
||||
if (j1 == Block.PISTON.id || j1 == Block.PISTON_STICKY.id) {
|
||||
this.dropList.add(new ItemStack(Block.byId[j1], 1));
|
||||
}
|
||||
return this.dropList;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public void remove(World world, int i, int j, int k) {
|
||||
super.remove(world, i, j, k);
|
||||
int l = world.getData(i, j, k) & 0x7;
|
||||
int l = world.getData(i, j, k);
|
||||
if (l > 5 || l < 0) return; // CraftBukkit - fixed a piston AIOOBE issue.
|
||||
int i1 = Facing.OPPOSITE_FACING[b(l)];
|
||||
|
||||
@@ -46,7 +27,7 @@ public class BlockPistonExtension extends Block {
|
||||
if (j1 == Block.PISTON.id || j1 == Block.PISTON_STICKY.id) {
|
||||
l = world.getData(i, j, k);
|
||||
if (BlockPiston.e(l)) {
|
||||
//Block.byId[j1].b(world, i, j, k, l, 0); // CraftBukkit - drop moved into drop list
|
||||
Block.byId[j1].b(world, i, j, k, l, 0);
|
||||
world.setTypeId(i, j, k, 0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user