More fixed for 1.21.5, 1.21.9, 1.21.11, stress tested against everything from 1.20.6 - 1.21.11

This commit is contained in:
Anon 2026-03-25 02:08:59 +01:00
parent 17808bb652
commit c43b157b55
6 changed files with 76 additions and 11 deletions

View file

@ -16,7 +16,7 @@ public class InstrumentComponent1215(DataTypes dataTypes, ItemPalette itemPalett
var holderId = DataTypes.ReadNextVarInt(data);
if (holderId == 0)
{
// Inline Instrument: SoundEvent holder + VarInt useDuration + Float range + Component description
// Inline Instrument: SoundEvent holder + Float useDuration + Float range + Component description
var soundHolderId = DataTypes.ReadNextVarInt(data);
if (soundHolderId == 0)
{
@ -25,9 +25,10 @@ public class InstrumentComponent1215(DataTypes dataTypes, ItemPalette itemPalett
if (hasFixedRange)
DataTypes.ReadNextFloat(data);
}
DataTypes.ReadNextVarInt(data); // useDuration
DataTypes.ReadNextFloat(data); // useDuration
DataTypes.ReadNextFloat(data); // range
DataTypes.ReadNextString(data); // description (Component as JSON string)
// ComponentSerialization.STREAM_CODEC is NBT-backed, not a plain string.
DataTypes.ReadNextNbt(data);
}
}
else

View file

@ -20,11 +20,11 @@ public class PaintingVariantHolderComponent(DataTypes dataTypes, ItemPalette ite
// Optional<Component> title
if (DataTypes.ReadNextBool(data))
DataTypes.ReadNextString(data);
DataTypes.ReadNextNbt(data);
// Optional<Component> author
if (DataTypes.ReadNextBool(data))
DataTypes.ReadNextString(data);
DataTypes.ReadNextNbt(data);
}
}

View file

@ -25,8 +25,8 @@ public class ProvidesTrimMaterialComponent(DataTypes dataTypes, ItemPalette item
DataTypes.ReadNextString(data); // ResourceKey<EquipmentAsset>
DataTypes.ReadNextString(data); // override suffix
}
// description Component
DataTypes.ReadNextString(data);
// ComponentSerialization.STREAM_CODEC is NBT-backed, not a plain string.
DataTypes.ReadNextNbt(data);
}
}
else