Fix trim material ids at tail

This commit is contained in:
Nassim Jahnke 2024-04-24 10:11:22 +02:00
parent b78f9d350b
commit c5e6fa7d0c
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
3 changed files with 3 additions and 1 deletions

View File

@ -27,11 +27,11 @@ public final class TrimMaterials1_20_3 {
"copper",
"diamond",
"emerald",
"quartz",
"gold",
"iron",
"lapis",
"netherite",
"quartz",
"redstone"
);

View File

@ -892,6 +892,7 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
if (id == -1) {
return;
}
materialHolder = Holder.of(id);
} else if (materialTag instanceof CompoundTag) {
final CompoundTag materialCompoundTag = (CompoundTag) materialTag;

View File

@ -668,6 +668,7 @@ public final class StructuredDataConverter {
if (unmappedId != -1) {
return unmappedId;
}
final IntTag itemBackupTag = tag.getIntTag(ITEM_BACKUP_TAG_KEY);
if (itemBackupTag != null) {
tag.remove(ITEM_BACKUP_TAG_KEY);