mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +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);
|
+ 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.
|
||||||
|
|
|
@ -1376,8 +1376,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @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..00000000000000000000000000000000
|
||||||
+ 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