mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 13:42:25 -07:00
Some fixes, start updating CustomModelData API
This commit is contained in:
@@ -859,12 +859,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@
|
||||
+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..00000000000000000000000000000000
|
||||
+@ApiStatus.NonExtendable
|
||||
+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
|
||||
|
Reference in New Issue
Block a user