diff options
author | Lulu13022002 <[email protected]> | 2024-04-27 21:48:14 +0200 |
---|---|---|
committer | Lulu13022002 <[email protected]> | 2024-04-27 21:48:14 +0200 |
commit | 55b1a8740d93768b3e731ace7b91e10c43bcc444 (patch) | |
tree | fcb61dad951dce505d595c6bfe1449cd066a8e4b /patches | |
parent | f933c35700e933e47cd169e6f44ddc2ba3f64766 (diff) | |
download | Paper-55b1a8740d93768b3e731ace7b91e10c43bcc444.tar.gz Paper-55b1a8740d93768b3e731ace7b91e10c43bcc444.zip |
fix PotionEffectType#getEffectAttributes
Diffstat (limited to 'patches')
-rw-r--r-- | patches/server/0678-More-PotionEffectType-API.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0678-More-PotionEffectType-API.patch b/patches/server/0678-More-PotionEffectType-API.patch index de77572875..07a0ef6777 100644 --- a/patches/server/0678-More-PotionEffectType-API.patch +++ b/patches/server/0678-More-PotionEffectType-API.patch @@ -8,7 +8,7 @@ public net.minecraft.world.effect.MobEffect attributeModifiers public net.minecraft.world.effect.MobEffect$AttributeTemplate diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java -index 8dffef71c8b193c0fc84b65a592c93827e341bf7..335b86e6357cf49eb170a415766f5e9160a7661c 100644 +index 8dffef71c8b193c0fc84b65a592c93827e341bf7..e15d83ac2668ebb0da9e22c15b9fd902689d5522 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java @@ -123,6 +123,48 @@ public class CraftPotionEffectType extends PotionEffectType implements Handleabl @@ -22,7 +22,7 @@ index 8dffef71c8b193c0fc84b65a592c93827e341bf7..335b86e6357cf49eb170a415766f5e91 + final java.util.Map<org.bukkit.attribute.Attribute, org.bukkit.attribute.AttributeModifier> attributeMap = new java.util.HashMap<>(); + this.handle.attributeModifiers.forEach((attribute, attributeModifier) -> { + attributeMap.put( -+ org.bukkit.craftbukkit.attribute.CraftAttribute.stringToBukkit(attribute.toString()), ++ org.bukkit.craftbukkit.attribute.CraftAttribute.minecraftHolderToBukkit(attribute), + // use zero as amplifier to get the base amount, as it is amount = base * (amplifier + 1) + org.bukkit.craftbukkit.attribute.CraftAttributeInstance.convert(attributeModifier.create(this.handle.getDescriptionId(), 0)) + ); |