aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0945-Add-transient-modifier-API.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-10-22 12:12:00 -0700
committerGitHub <[email protected]>2023-10-22 20:12:00 +0100
commit90fe0d58a5945c31f2c1b138799f64f2fe3475d8 (patch)
tree57e2a8b12dbe8245ce5694dd15af35dc33c3c4c2 /patches/server/0945-Add-transient-modifier-API.patch
parent489bff9bbdc4215bd2cbc54d837463c608e7747e (diff)
downloadPaper-90fe0d58a5945c31f2c1b138799f64f2fe3475d8.tar.gz
Paper-90fe0d58a5945c31f2c1b138799f64f2fe3475d8.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9825)
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
Diffstat (limited to 'patches/server/0945-Add-transient-modifier-API.patch')
-rw-r--r--patches/server/0945-Add-transient-modifier-API.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/server/0945-Add-transient-modifier-API.patch b/patches/server/0945-Add-transient-modifier-API.patch
new file mode 100644
index 0000000000..e3b704e242
--- /dev/null
+++ b/patches/server/0945-Add-transient-modifier-API.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Malfrador <[email protected]>
+Date: Wed, 31 May 2023 23:30:00 +0200
+Subject: [PATCH] Add transient modifier API
+
+
+diff --git a/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeInstance.java b/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeInstance.java
+index 12135ffeacd648f6bc4d7d327059ea1a7e8c79c4..52439f4b959c74027eb191a3af960c70beb978e8 100644
+--- a/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeInstance.java
++++ b/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeInstance.java
+@@ -23,6 +23,11 @@ public class UnmodifiableAttributeInstance extends CraftAttributeInstance {
+ throw new UnsupportedOperationException("Cannot modify default attributes");
+ }
+
++ @Override
++ public void addTransientModifier(AttributeModifier modifier) {
++ throw new UnsupportedOperationException("Cannot modify default attributes");
++ }
++
+ @Override
+ public void removeModifier(AttributeModifier modifier) {
+ throw new UnsupportedOperationException("Cannot modify default attributes");
+diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
+index e828ef7df04de98628e59e93c0431ea0e10199f8..0029412b1242879deb898524001bb4cc7550fa78 100644
+--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
++++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
+@@ -50,6 +50,14 @@ public class CraftAttributeInstance implements AttributeInstance {
+ this.handle.addPermanentModifier(CraftAttributeInstance.convert(modifier));
+ }
+
++ // Paper start - Transient modifier API
++ @Override
++ public void addTransientModifier(AttributeModifier modifier) {
++ Preconditions.checkArgument(modifier != null, "modifier");
++ this.handle.addTransientModifier(CraftAttributeInstance.convert(modifier));
++ }
++ // Paper end
++
+ @Override
+ public void removeModifier(AttributeModifier modifier) {
+ Preconditions.checkArgument(modifier != null, "modifier");