Compilation fixes

This commit is contained in:
Nassim Jahnke
2024-12-03 22:06:05 +01:00
parent 5e0c01db49
commit b4c75aa92c
13 changed files with 40 additions and 39 deletions

View File

@@ -578,7 +578,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ @Override
+ public CustomModelData customModelData(final int id) {
+ return new PaperCustomModelData(new net.minecraft.world.item.component.CustomModelData(id));
+ throw new UnsupportedOperationException("Not implemented yet");
+ //return new PaperCustomModelData(new net.minecraft.world.item.component.CustomModelData(id));
+ }
+
+ @Override
@@ -1213,10 +1214,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ public @Nullable Key model() {
+ return this.impl.model()
+ .map(PaperAdventure::asAdventure)
+ .orElse(null);
+ public @Nullable Key assetId() {
+ // TODO
+ throw new UnsupportedOperationException("Not yet implemented");
+ //return this.impl.assetId()
+ // .map(PaperAdventure::asAdventure)
+ // .orElse(null);
+ }
+
+ @Override
@@ -1252,7 +1255,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public Builder toBuilder() {
+ return new BuilderImpl(this.slot())
+ .equipSound(this.equipSound())
+ .model(this.model())
+ .assetId(this.assetId())
+ .cameraOverlay(this.cameraOverlay())
+ .allowedEntities(this.allowedEntities())
+ .dispensable(this.dispensable())
@@ -1265,7 +1268,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ private final net.minecraft.world.entity.EquipmentSlot equipmentSlot;
+ private Holder<SoundEvent> equipSound = SoundEvents.ARMOR_EQUIP_GENERIC;
+ private Optional<ResourceLocation> model = Optional.empty();
+ private Optional<ResourceLocation> assetId = Optional.empty();
+ private Optional<ResourceLocation> cameraOverlay = Optional.empty();
+ private Optional<HolderSet<net.minecraft.world.entity.EntityType<?>>> allowedEntities = Optional.empty();
+ private boolean dispensable = true;
@@ -1283,8 +1286,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ public Builder model(final @Nullable Key model) {
+ this.model = Optional.ofNullable(model)
+ public Builder assetId(final @Nullable Key model) {
+ this.assetId = Optional.ofNullable(model)
+ .map(PaperAdventure::asVanilla);
+
+ return this;
@@ -1329,7 +1332,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ new net.minecraft.world.item.equipment.Equippable(
+ this.equipmentSlot,
+ this.equipSound,
+ this.model,
+ null, // TODO
+ this.cameraOverlay,
+ this.allowedEntities,
+ this.dispensable,