mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
fix asset id
This commit is contained in:
parent
68e1550ec9
commit
02ae3f591b
2 changed files with 6 additions and 6 deletions
|
@ -1307,13 +1307,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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.
|
||||
|
|
|
@ -1376,8 +1376,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ @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..00000000000000000000000000000000
|
|||
+ new net.minecraft.world.item.equipment.Equippable(
|
||||
+ this.equipmentSlot,
|
||||
+ this.equipSound,
|
||||
+ null, // TODO
|
||||
+ this.assetId,
|
||||
+ this.cameraOverlay,
|
||||
+ this.allowedEntities,
|
||||
+ this.dispensable,
|
||||
|
|
Loading…
Reference in a new issue