Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
2873869bb1
Signs no longer have a specific isEdiable state, the entire API in this regard needs updating/deprecation. The boolean field is completely gone, replaced by a uuid (which will need a new setEditingPlayer(UUID) method on the Sign interface), and the current upstream implementation of setEdiable simply flips the is_waxed state. This patch is hence not needed as it neither allows editing (which will be redone in a later patch) nor is required to copy the is_waxed boolean flag as it lives in the signs compound tag and is covered by applyTo.
23 Zeilen
1.3 KiB
Diff
23 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Doc <nachito94@msn.com>
|
|
Date: Mon, 1 May 2023 13:34:57 -0400
|
|
Subject: [PATCH] Fix DamageCause for Falling Blocks
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
index 86b0fe7b6feeef0e085e577954f869e020cc0f04..cc1a7ac6e2123758a8d74b14363265a9040b5ad4 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -1030,6 +1030,11 @@ public class CraftEventFactory {
|
|
} else if (source.is(DamageTypes.SONIC_BOOM)) {
|
|
cause = DamageCause.SONIC_BOOM;
|
|
}
|
|
+ // Paper start - fix handle of Falling Blocks
|
|
+ else if (source.is(DamageTypes.FALLING_STALACTITE) || source.is(DamageTypes.FALLING_BLOCK) || source.is(DamageTypes.FALLING_ANVIL)) {
|
|
+ cause = DamageCause.FALLING_BLOCK;
|
|
+ }
|
|
+ // Paper end
|
|
|
|
return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API
|
|
} else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) {
|