aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0577-Add-BellRevealRaiderEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0577-Add-BellRevealRaiderEvent.patch')
-rw-r--r--patches/server/0577-Add-BellRevealRaiderEvent.patch15
1 files changed, 8 insertions, 7 deletions
diff --git a/patches/server/0577-Add-BellRevealRaiderEvent.patch b/patches/server/0577-Add-BellRevealRaiderEvent.patch
index b48704e5f5..58719e8164 100644
--- a/patches/server/0577-Add-BellRevealRaiderEvent.patch
+++ b/patches/server/0577-Add-BellRevealRaiderEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BellRevealRaiderEvent
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
-index d21f7e9712ac2d9088ce19d415e4ba7863d8cebf..aee8401e72228d0bbf89b940715f405353093585 100644
+index d21f7e9712ac2d9088ce19d415e4ba7863d8cebf..cc511deaca0e2c1a5a255f3125f691c851101401 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
@@ -156,7 +156,7 @@ public class BellBlockEntity extends BlockEntity {
@@ -17,15 +17,16 @@ index d21f7e9712ac2d9088ce19d415e4ba7863d8cebf..aee8401e72228d0bbf89b940715f4053
// CraftBukkit end
}
-@@ -191,7 +191,11 @@ public class BellBlockEntity extends BlockEntity {
- return entity.isAlive() && !entity.isRemoved() && pos.closerToCenterThan(entity.position(), 48.0D) && entity.getType().is(EntityTypeTags.RAIDERS);
+@@ -192,6 +192,13 @@ public class BellBlockEntity extends BlockEntity {
}
-- private static void glow(LivingEntity entity) {
-+ // Paper start - Add BellRevealRaiderEvent
-+ private static void glow(LivingEntity entity) { glow(entity, null); }
+ private static void glow(LivingEntity entity) {
++ // Paper start - Add BellRevealRaiderEvent
++ glow(entity, null);
++ }
++
+ private static void glow(LivingEntity entity, @javax.annotation.Nullable BlockPos pos) {
-+ if (pos != null && !new io.papermc.paper.event.block.BellRevealRaiderEvent(entity.level().getWorld().getBlockAt(io.papermc.paper.util.MCUtil.toLocation(entity.level(), pos)), entity.getBukkitEntity()).callEvent()) return;
++ if (pos != null && !new io.papermc.paper.event.block.BellRevealRaiderEvent(org.bukkit.craftbukkit.block.CraftBlock.at(entity.level(), pos), (org.bukkit.entity.Raider) entity.getBukkitEntity()).callEvent()) return;
+ // Paper end - Add BellRevealRaiderEvent
entity.addEffect(new MobEffectInstance(MobEffects.GLOWING, 60));
}