aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0560-Add-BellRevealRaiderEvent.patch
diff options
context:
space:
mode:
authorRiley Park <[email protected]>2024-05-15 17:06:59 -0700
committerGitHub <[email protected]>2024-05-15 17:06:59 -0700
commitf17519338bc589c045e0b32bfc37e048b23544d5 (patch)
treee50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0560-Add-BellRevealRaiderEvent.patch
parent3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff)
downloadPaper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz
Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip
Expose server build information (#10729)
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <[email protected]> Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0560-Add-BellRevealRaiderEvent.patch')
-rw-r--r--patches/server/0560-Add-BellRevealRaiderEvent.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/server/0560-Add-BellRevealRaiderEvent.patch b/patches/server/0560-Add-BellRevealRaiderEvent.patch
new file mode 100644
index 0000000000..871aa2a198
--- /dev/null
+++ b/patches/server/0560-Add-BellRevealRaiderEvent.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Owen1212055 <[email protected]>
+Date: Wed, 26 May 2021 17:09:07 -0400
+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 86dac3f82da065bf79d94da9df192f51ce4665e2..946c9dbfabf154db53d811906fd98d17992167d1 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 {
+ return BellBlockEntity.isRaiderWithinRange(pos, entityliving);
+ }).map((entity) -> (org.bukkit.entity.LivingEntity) entity.getBukkitEntity()).collect(java.util.stream.Collectors.toCollection(java.util.ArrayList::new)); // CraftBukkit
+
+- org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(world, pos, entities).forEach(BellBlockEntity::glow);
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(world, pos, entities).forEach(entity -> glow(entity, pos)); // Paper - Add BellRevealRaiderEvent
+ // CraftBukkit end
+ }
+
+@@ -189,6 +189,13 @@ public class BellBlockEntity extends BlockEntity {
+ }
+
+ 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(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));
+ }
+