mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
e1c0033552
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: 2b4b6d14 PR-1023: Convert InventoryView to interface CraftBukkit Changes: 68603b1c1 Use expanded interaction ranges for traced interact events eae9f760c PR-1414: Convert InventoryView to interface ee9eafe67 Fix Implementation for DamageSource#isIndirect for internal custom causing entity
35 lines
1.6 KiB
Diff
35 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
|
Date: Fri, 3 May 2024 22:56:12 +0200
|
|
Subject: [PATCH] Add missing wind charge damage type
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/damage/DamageType.java b/src/main/java/org/bukkit/damage/DamageType.java
|
|
index 69abda41ef3a1d8948982d16b193a9a565fafa38..9ec1abbd741198705d2a7685bbd2e2660679461d 100644
|
|
--- a/src/main/java/org/bukkit/damage/DamageType.java
|
|
+++ b/src/main/java/org/bukkit/damage/DamageType.java
|
|
@@ -66,6 +66,10 @@ public interface DamageType extends Keyed, Translatable {
|
|
public static final DamageType BAD_RESPAWN_POINT = getDamageType("bad_respawn_point");
|
|
public static final DamageType OUTSIDE_BORDER = getDamageType("outside_border");
|
|
public static final DamageType GENERIC_KILL = getDamageType("generic_kill");
|
|
+ // Paper start
|
|
+ @org.jetbrains.annotations.Nullable
|
|
+ DamageType WIND_CHARGE = getExperimentalDamageType("wind_charge");
|
|
+ // Paper end
|
|
|
|
@NotNull
|
|
private static DamageType getDamageType(@NotNull String key) {
|
|
@@ -73,6 +77,12 @@ public interface DamageType extends Keyed, Translatable {
|
|
return Preconditions.checkNotNull(Registry.DAMAGE_TYPE.get(namespacedKey), "No DamageType found for %s. This is a bug.", namespacedKey);
|
|
}
|
|
|
|
+ // Paper start
|
|
+ private static @org.jetbrains.annotations.Nullable DamageType getExperimentalDamageType(@NotNull String key) {
|
|
+ return Registry.DAMAGE_TYPE.get(NamespacedKey.minecraft(key));
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* {@inheritDoc}
|
|
* <p>
|