3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/api/0413-Add-transient-modifier-API.patch
Jake Potrebic 2f92d4e00e
Updated Upstream (Bukkit/CraftBukkit)
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:
01bb6ba7 PR-936: Add new PersistentDataContainer methods and clean up docs
bc145b90 PR-940: Create registry for banner pattern and cat type

CraftBukkit Changes:
cb2ea54de SPIGOT-7440, PR-1292: Fire EntityTeleportEvent for end gateways
4fea66e44 PR-1299: Add new PersistentDataContainer methods and clean up docs
b483a20db PR-1303: Create registry for banner pattern and cat type
4642dd526 SPIGOT-7535: Fix maps not having an ID and also call MapInitializeEvent in more places
2023-12-08 11:00:39 -08:00

28 Zeilen
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Malfrador <malfrador@gmail.com>
Date: Wed, 31 May 2023 21:25:01 +0200
Subject: [PATCH] Add transient modifier API
diff --git a/src/main/java/org/bukkit/attribute/AttributeInstance.java b/src/main/java/org/bukkit/attribute/AttributeInstance.java
index f08ee26cc4d479e1bfc5264b8cbe721315de91f2..5513174ea545bb5b4fdc028cbaa4c1bb763e2c6d 100644
--- a/src/main/java/org/bukkit/attribute/AttributeInstance.java
+++ b/src/main/java/org/bukkit/attribute/AttributeInstance.java
@@ -46,6 +46,16 @@ public interface AttributeInstance {
*/
void addModifier(@NotNull AttributeModifier modifier);
+ // Paper start - Transient modifier API
+ /**
+ * Add a transient modifier to this instance.
+ * Transient modifiers are not persisted (saved with the NBT data)
+ *
+ * @param modifier to add
+ */
+ void addTransientModifier(@NotNull AttributeModifier modifier);
+ // Paper end
+
/**
* Remove a modifier from this instance.
*