diff options
Diffstat (limited to 'patches/server/0462-Add-PlayerShearBlockEvent.patch')
-rw-r--r-- | patches/server/0462-Add-PlayerShearBlockEvent.patch | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/patches/server/0462-Add-PlayerShearBlockEvent.patch b/patches/server/0462-Add-PlayerShearBlockEvent.patch index a38cf5e637..e8a864c69f 100644 --- a/patches/server/0462-Add-PlayerShearBlockEvent.patch +++ b/patches/server/0462-Add-PlayerShearBlockEvent.patch @@ -39,10 +39,10 @@ index 44e72176a0da08a77fa192ee31c0fcd53f0dc22d..27f1c1ac12251f1438ee8bf14f4afb5f entityhuman1.broadcastBreakEvent(hand); }); diff --git a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java -index c0098fe96201bfc448e7d2e3d672c310c9c9e75a..966783c646dae5a79259c1a322a9cfc8dd83d997 100644 +index d9c4e0cf178b9a1eed230dc7b8cfbd8f3f49c7bb..c67ee44d49693bfcb92cbbf0ed44929bf0034f13 100644 --- a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java -@@ -35,16 +35,24 @@ public class PumpkinBlock extends Block { +@@ -35,21 +35,30 @@ public class PumpkinBlock extends Block { ItemStack itemStack = player.getItemInHand(hand); if (itemStack.is(Items.SHEARS)) { if (!world.isClientSide) { @@ -60,16 +60,14 @@ index c0098fe96201bfc448e7d2e3d672c310c9c9e75a..966783c646dae5a79259c1a322a9cfc8 + for (org.bukkit.inventory.ItemStack item : event.getDrops()) { // Paper - Add PlayerShearBlockEvent 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, + pos.getX() + 0.5 + direction2.getStepX() * 0.65, + pos.getY() + 0.1, + pos.getZ() + 0.5 + 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, -@@ -52,6 +60,7 @@ public class PumpkinBlock extends Block { - 0.05 * (double)direction2.getStepZ() + world.random.nextDouble() * 0.02 + 0.05 * direction2.getStepX() + world.random.nextDouble() * 0.02, 0.05, 0.05 * direction2.getStepZ() + world.random.nextDouble() * 0.02 ); world.addFreshEntity(itemEntity); + } // Paper - Add PlayerShearBlockEvent |