|
45 | 45 | import com.viaversion.viaversion.api.minecraft.item.data.ItemModel; |
46 | 46 | import com.viaversion.viaversion.api.minecraft.item.data.PotionEffect; |
47 | 47 | import com.viaversion.viaversion.api.minecraft.item.data.PotionEffectData; |
| 48 | +import com.viaversion.viaversion.api.minecraft.item.data.Repairable; |
48 | 49 | import com.viaversion.viaversion.api.minecraft.item.data.UseCooldown; |
49 | 50 | import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; |
50 | 51 | import com.viaversion.viaversion.api.type.Types; |
@@ -348,9 +349,9 @@ private void backupInconvertibleData(final Item item) { |
348 | 349 | backupTag.put("instrument_description", instrument.value().description()); |
349 | 350 | } |
350 | 351 |
|
351 | | - final HolderSet repairable = data.get(StructuredDataKey.REPAIRABLE); |
| 352 | + final Repairable repairable = data.get(StructuredDataKey.REPAIRABLE); |
352 | 353 | if (repairable != null) { |
353 | | - backupTag.put("repairable", holderSetToTag(repairable)); |
| 354 | + backupTag.put("repairable", holderSetToTag(repairable.items())); |
354 | 355 | } |
355 | 356 |
|
356 | 357 | final Enchantable enchantable = data.get(StructuredDataKey.ENCHANTABLE); |
@@ -523,7 +524,7 @@ private void restoreInconvertibleData(final Item item) { |
523 | 524 | } |
524 | 525 |
|
525 | 526 | if (backupTag.contains("repairable")) { |
526 | | - data.set(StructuredDataKey.REPAIRABLE, restoreHolderSet(backupTag, "repairable")); |
| 527 | + data.set(StructuredDataKey.REPAIRABLE, new Repairable(restoreHolderSet(backupTag, "repairable"))); |
527 | 528 | } |
528 | 529 |
|
529 | 530 | final IntTag enchantable = backupTag.getIntTag("enchantable"); |
|
0 commit comments