diff options
author | Nassim Jahnke <[email protected]> | 2022-07-27 23:19:52 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2022-07-27 23:19:52 +0200 |
commit | c7304035b6a3ca33196d88a5c46f746dbff178fe (patch) | |
tree | 67c8b104ad3c4dd3b049977b38120c8bc1add6c7 /patches/server/0661-Add-BellRevealRaiderEvent.patch | |
parent | aab40382a5d9b01b1c712fa17de9fdf0668ccc28 (diff) | |
download | Paper-c7304035b6a3ca33196d88a5c46f746dbff178fe.tar.gz Paper-c7304035b6a3ca33196d88a5c46f746dbff178fe.zip |
More more more more work
Diffstat (limited to 'patches/server/0661-Add-BellRevealRaiderEvent.patch')
-rw-r--r-- | patches/server/0661-Add-BellRevealRaiderEvent.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/server/0661-Add-BellRevealRaiderEvent.patch b/patches/server/0661-Add-BellRevealRaiderEvent.patch new file mode 100644 index 0000000000..587e0f0400 --- /dev/null +++ b/patches/server/0661-Add-BellRevealRaiderEvent.patch @@ -0,0 +1,32 @@ +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 feaad48e9bbc1e658324ef9e1e7e73aca0b3bf48..b9d2c38e80924f52dcf76ec1042d2d746e77ffc6 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 +@@ -138,7 +138,7 @@ public class BellBlockEntity extends BlockEntity { + private static void makeRaidersGlow(Level world, BlockPos pos, List<LivingEntity> hearingEntities) { + hearingEntities.stream().filter((entity) -> { + return isRaiderWithinRange(pos, entity); +- }).forEach(BellBlockEntity::glow); ++ }).forEach(entity -> glow(entity, pos)); // Paper - pass BlockPos + } + + private static void showBellParticles(Level world, BlockPos pos, List<LivingEntity> hearingEntities) { +@@ -170,7 +170,11 @@ public class BellBlockEntity extends BlockEntity { + return entity.isAlive() && !entity.isRemoved() && pos.closerToCenterThan(entity.position(), 48.0D) && entity.getType().is(EntityTypeTags.RAIDERS); + } + +- private static void glow(LivingEntity entity) { ++ // Paper start ++ private static void glow(LivingEntity entity) { 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(net.minecraft.server.MCUtil.toLocation(entity.level, pos)), entity.getBukkitEntity()).callEvent()) return; ++ // Paper end + entity.addEffect(new MobEffectInstance(MobEffects.GLOWING, 60)); + } + |