diff options
author | Jake Potrebic <[email protected]> | 2023-11-04 14:11:55 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-04 14:11:55 -0700 |
commit | 0cdce89d595a2c1c097c9e2a5ff96687977b3b25 (patch) | |
tree | de63d6aa8112811f93b5d6afebbb069b9980870f /patches/server/0614-Add-BellRevealRaiderEvent.patch | |
parent | 15a0de2eefb70ea8162cbb31056920adf80265fa (diff) | |
download | Paper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.tar.gz Paper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.zip |
Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset
to the main world spawn point
Diffstat (limited to 'patches/server/0614-Add-BellRevealRaiderEvent.patch')
-rw-r--r-- | patches/server/0614-Add-BellRevealRaiderEvent.patch | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/patches/server/0614-Add-BellRevealRaiderEvent.patch b/patches/server/0614-Add-BellRevealRaiderEvent.patch deleted file mode 100644 index ed8e81f6a2..0000000000 --- a/patches/server/0614-Add-BellRevealRaiderEvent.patch +++ /dev/null @@ -1,32 +0,0 @@ -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 b446d6549922f3dabaaa05793d8ee3eb45566ac3..f07222c8c9c82478d492b0916cd394be1ab0c804 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 - pass BlockPos - // 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); - } - -- 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(io.papermc.paper.util.MCUtil.toLocation(entity.level(), pos)), entity.getBukkitEntity()).callEvent()) return; -+ // Paper end - entity.addEffect(new MobEffectInstance(MobEffects.GLOWING, 60)); - } - |