mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-18 12:48:53 +01:00
fix asset id
This commit is contained in:
parent
2206b9a5f2
commit
e73d39671d
2 changed files with 8 additions and 8 deletions
|
@ -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
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..f72d412a09c710f30eb219abc25ca4c95d49f4b1
|
index 0000000000000000000000000000000000000000..d21a1cd4002a972c6e56cdf4c1e5f86414c56c12
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java
|
+++ b/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java
|
||||||
@@ -0,0 +1,169 @@
|
@@ -0,0 +1,169 @@
|
||||||
|
@ -1307,13 +1307,13 @@ index 0000000000000000000000000000000000000000..f72d412a09c710f30eb219abc25ca4c9
|
||||||
+ Builder equipSound(Key sound);
|
+ 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
|
+ * @return the builder for chaining
|
||||||
+ */
|
+ */
|
||||||
+ @Contract(value = "_ -> this", mutates = "this")
|
+ @Contract(value = "_ -> this", mutates = "this")
|
||||||
+ Builder assetId(@Nullable Key model);
|
+ Builder assetId(@Nullable Key assetId);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Sets the camera overlay key for this item.
|
+ * Sets the camera overlay key for this item.
|
||||||
|
|
|
@ -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
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567bce172a6
|
index 0000000000000000000000000000000000000000..6d427d2c62cce557fa824dd347fd5d0c2ae7411e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java
|
+++ b/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java
|
||||||
@@ -0,0 +1,174 @@
|
@@ -0,0 +1,174 @@
|
||||||
|
@ -1376,8 +1376,8 @@ index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Builder assetId(final @Nullable Key model) {
|
+ public Builder assetId(final @Nullable Key assetId) {
|
||||||
+ this.assetId = Optional.ofNullable(model)
|
+ this.assetId = Optional.ofNullable(assetId)
|
||||||
+ .map(key -> PaperAdventure.asVanilla(EquipmentAssets.ROOT_ID, key));
|
+ .map(key -> PaperAdventure.asVanilla(EquipmentAssets.ROOT_ID, key));
|
||||||
+
|
+
|
||||||
+ return this;
|
+ return this;
|
||||||
|
@ -1422,7 +1422,7 @@ index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567
|
||||||
+ new net.minecraft.world.item.equipment.Equippable(
|
+ new net.minecraft.world.item.equipment.Equippable(
|
||||||
+ this.equipmentSlot,
|
+ this.equipmentSlot,
|
||||||
+ this.equipSound,
|
+ this.equipSound,
|
||||||
+ null, // TODO
|
+ this.assetId,
|
||||||
+ this.cameraOverlay,
|
+ this.cameraOverlay,
|
||||||
+ this.allowedEntities,
|
+ this.allowedEntities,
|
||||||
+ this.dispensable,
|
+ this.dispensable,
|
||||||
|
|
Loading…
Reference in a new issue