Skip to content

Commit e73d396

Browse files
committed
fix asset id
1 parent 2206b9a commit e73d396

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

patches/api/0495-DataComponent-API.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ index 0000000000000000000000000000000000000000..a128348247d8845321d3fecebaa09a51
11881188
+}
11891189
diff --git a/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java b/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java
11901190
new file mode 100644
1191-
index 0000000000000000000000000000000000000000..f72d412a09c710f30eb219abc25ca4c95d49f4b1
1191+
index 0000000000000000000000000000000000000000..d21a1cd4002a972c6e56cdf4c1e5f86414c56c12
11921192
--- /dev/null
11931193
+++ b/src/main/java/io/papermc/paper/datacomponent/item/Equippable.java
11941194
@@ -0,0 +1,169 @@
@@ -1307,13 +1307,13 @@ index 0000000000000000000000000000000000000000..f72d412a09c710f30eb219abc25ca4c9
13071307
+ Builder equipSound(Key sound);
13081308
+
13091309
+ /**
1310-
+ * Sets the model key for this item.
1310+
+ * Sets the asset id for this item.
13111311
+ *
1312-
+ * @param model the model key, nullable
1312+
+ * @param assetId the asset id, nullable
13131313
+ * @return the builder for chaining
13141314
+ */
13151315
+ @Contract(value = "_ -> this", mutates = "this")
1316-
+ Builder assetId(@Nullable Key model);
1316+
+ Builder assetId(@Nullable Key assetId);
13171317
+
13181318
+ /**
13191319
+ * Sets the camera overlay key for this item.

patches/server/1031-DataComponent-API.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ index 0000000000000000000000000000000000000000..422e1a4d606481f0dc68843fbbc8126c
12551255
+}
12561256
diff --git a/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java b/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java
12571257
new file mode 100644
1258-
index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567bce172a6
1258+
index 0000000000000000000000000000000000000000..6d427d2c62cce557fa824dd347fd5d0c2ae7411e
12591259
--- /dev/null
12601260
+++ b/src/main/java/io/papermc/paper/datacomponent/item/PaperEquippable.java
12611261
@@ -0,0 +1,174 @@
@@ -1376,8 +1376,8 @@ index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567
13761376
+ }
13771377
+
13781378
+ @Override
1379-
+ public Builder assetId(final @Nullable Key model) {
1380-
+ this.assetId = Optional.ofNullable(model)
1379+
+ public Builder assetId(final @Nullable Key assetId) {
1380+
+ this.assetId = Optional.ofNullable(assetId)
13811381
+ .map(key -> PaperAdventure.asVanilla(EquipmentAssets.ROOT_ID, key));
13821382
+
13831383
+ return this;
@@ -1422,7 +1422,7 @@ index 0000000000000000000000000000000000000000..f0c2b30069b2df060a39683636296567
14221422
+ new net.minecraft.world.item.equipment.Equippable(
14231423
+ this.equipmentSlot,
14241424
+ this.equipSound,
1425-
+ null, // TODO
1425+
+ this.assetId,
14261426
+ this.cameraOverlay,
14271427
+ this.allowedEntities,
14281428
+ this.dispensable,

0 commit comments

Comments
 (0)