diff options
author | Lulu13022002 <[email protected]> | 2024-12-04 20:01:17 +0100 |
---|---|---|
committer | Lulu13022002 <[email protected]> | 2024-12-04 20:01:17 +0100 |
commit | e73d39671d51dac0c376ce04936a3305459a8b9d (patch) | |
tree | 4b9a2e5636b8e162ebe2344d6f001997be5abcbb | |
parent | 2206b9a5f21fba761463a0d82b357c16f468f03a (diff) | |
download | Paper-e73d39671d51dac0c376ce04936a3305459a8b9d.tar.gz Paper-e73d39671d51dac0c376ce04936a3305459a8b9d.zip |
fix asset id
-rw-r--r-- | patches/api/0495-DataComponent-API.patch | 8 | ||||
-rw-r--r-- | patches/server/1031-DataComponent-API.patch | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/patches/api/0495-DataComponent-API.patch b/patches/api/0495-DataComponent-API.patch index 3d5489d46e..f4901c2954 100644 --- a/patches/api/0495-DataComponent-API.patch +++ b/patches/api/0495-DataComponent-API.patch @@ -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. diff --git a/patches/server/1031-DataComponent-API.patch b/patches/server/1031-DataComponent-API.patch index f4f5492eb9..2493615d74 100644 --- a/patches/server/1031-DataComponent-API.patch +++ b/patches/server/1031-DataComponent-API.patch @@ -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, |