Mark serializer versions in ComponentRewriter as nullable

This commit is contained in:
FlorianMichael 2024-10-19 14:43:43 +02:00
parent 4a7624fef4
commit 4066a7b5b6

View File

@ -486,16 +486,16 @@ public class ComponentRewriter<C extends ClientboundPacketType> implements com.v
} }
} }
protected SerializerVersion inputSerializerVersion() { protected @Nullable SerializerVersion inputSerializerVersion() {
return null; return null;
} }
protected SerializerVersion outputSerializerVersion() { protected @Nullable SerializerVersion outputSerializerVersion() {
return inputSerializerVersion(); // Only matters if the nbt serializer changed return inputSerializerVersion(); // Only matters if the nbt serializer changed
} }
private void convertLegacyContents(final CompoundTag hoverEvent) { private void convertLegacyContents(final CompoundTag hoverEvent) {
if (inputSerializerVersion() == null || outputSerializerVersion() == null) { if (inputSerializerVersion() == null) {
return; return;
} }