aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-12-03 20:58:25 +0100
committerNassim Jahnke <[email protected]>2024-12-03 20:58:25 +0100
commit4601dc901b5fd1e62a830aeb2ba4442d7307a496 (patch)
tree50f4f75f5ee138d85ebcad878517577c987879e9 /patches/api
parent5265287323b5c8c4148659b3630a22db92bb9dc4 (diff)
downloadPaper-4601dc901b5fd1e62a830aeb2ba4442d7307a496.tar.gz
Paper-4601dc901b5fd1e62a830aeb2ba4442d7307a496.zip
Some fixes, start updating CustomModelData API
Diffstat (limited to 'patches/api')
-rw-r--r--patches/api/0495-DataComponent-API.patch41
1 files changed, 32 insertions, 9 deletions
diff --git a/patches/api/0495-DataComponent-API.patch b/patches/api/0495-DataComponent-API.patch
index 188e6f30ae..daf693effa 100644
--- a/patches/api/0495-DataComponent-API.patch
+++ b/patches/api/0495-DataComponent-API.patch
@@ -853,18 +853,20 @@ index 0000000000000000000000000000000000000000..8c88bbbeef179e6c6666d07c8b28157e
+}
diff --git a/src/main/java/io/papermc/paper/datacomponent/item/CustomModelData.java b/src/main/java/io/papermc/paper/datacomponent/item/CustomModelData.java
new file mode 100644
-index 0000000000000000000000000000000000000000..d416c9d25b3ab88bf1e208c6faf92a8e2378c376
+index 0000000000000000000000000000000000000000..31921e8d94ea117dce298fd97e95ad9608158a1d
--- /dev/null
+++ b/src/main/java/io/papermc/paper/datacomponent/item/CustomModelData.java
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,51 @@
+package io.papermc.paper.datacomponent.item;
+
++import java.util.List;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.Contract;
+import org.jspecify.annotations.NullMarked;
+
+/**
+ * Holds the custom model data.
++ *
+ * @see io.papermc.paper.datacomponent.DataComponentTypes#CUSTOM_MODEL_DATA
+ */
+@NullMarked
@@ -872,18 +874,39 @@ index 0000000000000000000000000000000000000000..d416c9d25b3ab88bf1e208c6faf92a8e
+public interface CustomModelData {
+
-+ @Contract(value = "_ -> new", pure = true)
-+ static CustomModelData customModelData(final int id) {
-+ return ItemComponentTypesBridge.bridge().customModelData(id);
-+ }
++ // TODO
+
+ /**
-+ * Gets the custom model data id.
++ * Gets the custom model data float values.
+ *
-+ * @return the id
++ * @return the float values
+ */
+ @Contract(pure = true)
-+ int id();
++ List<Float> floats();
++
++ /**
++ * Gets the custom model data boolean values.
++ *
++ * @return the boolean values
++ */
++ @Contract(pure = true)
++ List<Boolean> flags();
++
++ /**
++ * Gets the custom model data string values.
++ *
++ * @return the string values
++ */
++ @Contract(pure = true)
++ List<String> strings();
++
++ /**
++ * Gets the custom model data color values.
++ *
++ * @return the color values
++ */
++ @Contract(pure = true)
++ List<Integer> colors();
+}
diff --git a/src/main/java/io/papermc/paper/datacomponent/item/DamageResistant.java b/src/main/java/io/papermc/paper/datacomponent/item/DamageResistant.java
new file mode 100644