Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 19:40:07 +01:00
1358d1e914
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: 881e06e5 PR-725: Add Item Unlimited Lifetime APIs CraftBukkit Changes: 74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall 64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn 2d760831 Increase outdated build delay 9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent 59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta Spigot Changes: ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue e19ddabd PR-1011: Add Item Unlimited Lifetime APIs 34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
33 Zeilen
1.9 KiB
Diff
33 Zeilen
1.9 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 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));
|
|
}
|
|
|