mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
90fe0d58a5
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry 255b2aa1 SPIGOT-7080: Add World#locateNearestBiome ff984826 Remove javadoc.io doc links CraftBukkit Changes: 71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler 38c599f9d PR-1272: Only allow one entity in CraftItem instead of two f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld Spigot Changes: e0e223fe Remove javadoc.io doc links
33 lines
2.1 KiB
Diff
33 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
|
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));
|
|
}
|
|
|