Fix PlayerShearBlockEvent drops ignored for Pumpkin (#10956)

This commit is contained in:
Pedro 2024-06-22 09:50:47 -04:00
parent 89961bad94
commit f5e0f69e72

View file

@ -61,6 +61,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
ItemEntity itemEntity = new ItemEntity(
world,
(double)pos.getX() + 0.5 + (double)direction2.getStepX() * 0.65,
(double)pos.getY() + 0.1,
(double)pos.getZ() + 0.5 + (double)direction2.getStepZ() * 0.65,
- new ItemStack(Items.PUMPKIN_SEEDS, 4)
+ org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(item) // Paper - Add PlayerShearBlockEvent
);
itemEntity.setDeltaMovement(
0.05 * (double)direction2.getStepX() + world.random.nextDouble() * 0.02,
@@ -0,0 +0,0 @@ public class PumpkinBlock extends Block {
0.05 * (double)direction2.getStepZ() + world.random.nextDouble() * 0.02
);