aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0444-Add-PlayerShearBlockEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0444-Add-PlayerShearBlockEvent.patch')
-rw-r--r--patches/server/0444-Add-PlayerShearBlockEvent.patch11
1 files changed, 9 insertions, 2 deletions
diff --git a/patches/server/0444-Add-PlayerShearBlockEvent.patch b/patches/server/0444-Add-PlayerShearBlockEvent.patch
index c56e74d255..c659b655c0 100644
--- a/patches/server/0444-Add-PlayerShearBlockEvent.patch
+++ b/patches/server/0444-Add-PlayerShearBlockEvent.patch
@@ -39,10 +39,10 @@ index c4b9c574bfb034fc78a596367f0f41dbde5eb93d..8d6736003934c5958f600660bdee58b3
flag = true;
world.gameEvent((Entity) player, (Holder) GameEvent.SHEAR, pos);
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 aa8667f0b14dc8944dd3457b431162e59bf54ada..3b94888516e4dd1a8e56c31fd71bb21f84b8cfbd 100644
+index aa8667f0b14dc8944dd3457b431162e59bf54ada..5f5b2dd2bb45a0d3ae7de063b3bc611d01af21c0 100644
--- a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java
-@@ -40,10 +40,18 @@ public class PumpkinBlock extends Block {
+@@ -40,16 +40,24 @@ public class PumpkinBlock extends Block {
} else if (world.isClientSide) {
return ItemInteractionResult.sidedSuccess(world.isClientSide);
} else {
@@ -61,6 +61,13 @@ index aa8667f0b14dc8944dd3457b431162e59bf54ada..3b94888516e4dd1a8e56c31fd71bb21f
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,
@@ -57,6 +65,7 @@ public class PumpkinBlock extends Block {
0.05 * (double)direction2.getStepZ() + world.random.nextDouble() * 0.02
);