aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0606-Get-entity-default-attributes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0606-Get-entity-default-attributes.patch')
-rw-r--r--patches/server/0606-Get-entity-default-attributes.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0606-Get-entity-default-attributes.patch b/patches/server/0606-Get-entity-default-attributes.patch
index 794f7cfaf2..ae103104ed 100644
--- a/patches/server/0606-Get-entity-default-attributes.patch
+++ b/patches/server/0606-Get-entity-default-attributes.patch
@@ -4,7 +4,7 @@ Date: Fri, 20 Aug 2021 13:03:21 -0700
Subject: [PATCH] Get entity default attributes
== AT ==
-public net.minecraft.world.entity.ai.attributes.AttributeSupplier getAttributeInstance(Lnet/minecraft/world/entity/ai/attributes/Attribute;)Lnet/minecraft/world/entity/ai/attributes/AttributeInstance;
+public net.minecraft.world.entity.ai.attributes.AttributeSupplier getAttributeInstance(Lnet/minecraft/core/Holder;)Lnet/minecraft/world/entity/ai/attributes/AttributeInstance;
diff --git a/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeInstance.java b/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeInstance.java
new file mode 100644
@@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..12135ffeacd648f6bc4d7d327059ea1a
+}
diff --git a/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeMap.java b/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeMap.java
new file mode 100644
-index 0000000000000000000000000000000000000000..68044b8439c302114240d0ae4da93ab3e0789cd2
+index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b066d7e43
--- /dev/null
+++ b/src/main/java/io/papermc/paper/attribute/UnmodifiableAttributeMap.java
@@ -0,0 +1,32 @@
@@ -68,7 +68,7 @@ index 0000000000000000000000000000000000000000..68044b8439c302114240d0ae4da93ab3
+
+ @Override
+ public @Nullable AttributeInstance getAttribute(@NotNull Attribute attribute) {
-+ net.minecraft.world.entity.ai.attributes.Attribute nmsAttribute = CraftAttribute.bukkitToMinecraft(attribute);
++ net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> nmsAttribute = CraftAttribute.bukkitToMinecraftHolder(attribute);
+ if (!this.handle.hasAttribute(nmsAttribute)) {
+ return null;
+ }