Archiviert
13
0
Dieser Commit ist enthalten in:
Lulu13022002 2024-12-04 20:01:17 +01:00
Ursprung 2206b9a5f2
Commit e73d39671d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 491C8F0B8ACDEB01
2 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -1188,7 +1188,7 @@ index 0000000000000000000000000000000000000000..a128348247d8845321d3fecebaa09a51
+}
diff --git a/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java b/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java
new file mode 100644
index 0000000000000000000000000000000000000000..f72d412a09c710f30eb219abc25ca4c95d49f4b1
index 0000000000000000000000000000000000000000..d21a1cd4002a972c6e56cdf4c1e5f86414c56c12
--- /dev/null
+++ b/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java
@@ -0,0 +1,169 @@
@ -1307,13 +1307,13 @@ index 0000000000000000000000000000000000000000..f72d412a09c710f30eb219abc25ca4c9
+ Builder equipSound(Key sound);
+
+ /**
+ * Sets the model key for this item.
+ * Sets the asset id for this item.
+ *
+ * @param model the model key, nullable
+ * @param assetId the asset id, nullable
+ * @return the builder for chaining
+ */
+ @Contract(value = "_ -> this", mutates = "this")
+ Builder assetId(@Nullable Key model);
+ Builder assetId(@Nullable Key assetId);
+
+ /**
+ * Sets the camera overlay key for this item.

Datei anzeigen

@ -1255,7 +1255,7 @@ index 0000000000000000000000000000000000000000..422e1a4d606481f0dc68843fbbc8126c
+}
diff --git a/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java b/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java
new file mode 100644
index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567bce172a6
index 0000000000000000000000000000000000000000..6d427d2c62cce557fa824dd347fd5d0c2ae7411e
--- /dev/null
+++ b/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java
@@ -0,0 +1,174 @@
@ -1376,8 +1376,8 @@ index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567
+ }
+
+ @Override
+ public Builder assetId(final @Nullable Key model) {
+ this.assetId = Optional.ofNullable(model)
+ public Builder assetId(final @Nullable Key assetId) {
+ this.assetId = Optional.ofNullable(assetId)
+ .map(key -> PaperAdventure.asVanilla(EquipmentAssets.ROOT_ID, key));
+
+ return this;
@ -1422,7 +1422,7 @@ index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567
+ new net.minecraft.world.item.equipment.Equippable(
+ this.equipmentSlot,
+ this.equipSound,
+ null, // TODO
+ this.assetId,
+ this.cameraOverlay,
+ this.allowedEntities,
+ this.dispensable,