From 913720b65cda89f10979e8b85175cb0a54f35226 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 8 Jun 2023 17:34:35 -0700 Subject: [PATCH] add missing call to EntityInsideBlockEvent --- patches/api/Add-EntityInsideBlockEvent.patch | 1 + patches/server/Add-EntityInsideBlockEvent.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/patches/api/Add-EntityInsideBlockEvent.patch b/patches/api/Add-EntityInsideBlockEvent.patch index 76b4ebcdc1..51dc10d001 100644 --- a/patches/api/Add-EntityInsideBlockEvent.patch +++ b/patches/api/Add-EntityInsideBlockEvent.patch @@ -41,6 +41,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + *
  • Hopper
  • + *
  • Detector rails
  • + *
  • Nether portals
  • ++ *
  • Pitcher crop
  • + *
  • Powdered snow
  • + *
  • Pressure plates
  • + *
  • Sweet berry bush
  • diff --git a/patches/server/Add-EntityInsideBlockEvent.patch b/patches/server/Add-EntityInsideBlockEvent.patch index 972cd7bec8..11ec92768c 100644 --- a/patches/server/Add-EntityInsideBlockEvent.patch +++ b/patches/server/Add-EntityInsideBlockEvent.patch @@ -196,6 +196,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (entity.canChangeDimensions()) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ())); +diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +@@ -0,0 +0,0 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl + + @Override + public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { ++ if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper + if (entity instanceof Ravager && world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { + world.destroyBlock(pos, true, entity); + } diff --git a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java