Skip to content

refactor: switch to codecs for nbt serialization#340

Merged
John-Paul-R merged 7 commits into1.21.xfrom
codecs
Jun 24, 2025
Merged

refactor: switch to codecs for nbt serialization#340
John-Paul-R merged 7 commits into1.21.xfrom
codecs

Conversation

@John-Paul-R
Copy link
Copy Markdown
Owner

No description provided.

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com bot commented Jun 24, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/main/java/com/fibermc/essentialcommands/playerdata/PlayerDataFactory.java  56% smaller
  src/main/java/com/fibermc/essentialcommands/types/NamedMinecraftLocation.java  24% smaller
  src/main/java/com/fibermc/essentialcommands/types/WarpStorage.java  16% smaller
  src/main/java/com/fibermc/essentialcommands/playerdata/PlayerData.java  16% smaller
  src/main/java/com/fibermc/essentialcommands/types/NamedLocationStorage.java  15% smaller
  src/main/java/com/fibermc/essentialcommands/WorldDataManager.java  15% smaller
  src/main/java/com/fibermc/essentialcommands/util/EssentialsXParser.java  14% smaller
  src/main/java/com/fibermc/essentialcommands/types/WarpLocation.java  12% smaller
  ec-core/src/main/java/dev/jpcode/eccore/util/TextUtil.java  12% smaller
  src/main/java/com/fibermc/essentialcommands/playerdata/PlayerDataManager.java  10% smaller
  src/main/java/com/fibermc/essentialcommands/types/MinecraftLocation.java  4% smaller
  src/main/java/com/fibermc/essentialcommands/WorldData.java  0% smaller
  src/main/java/com/fibermc/essentialcommands/codec/Codecs.java  0% smaller
  src/main/java/com/fibermc/essentialcommands/commands/HomeOverwriteCommand.java  0% smaller
  src/main/java/com/fibermc/essentialcommands/commands/HomeSetCommand.java  0% smaller
  src/main/java/com/fibermc/essentialcommands/mixin/WorldSaveHandlerMixin.java  0% smaller
  src/main/java/com/fibermc/essentialcommands/util/EssentialsConvertor.java  0% smaller

Comment on lines +63 to +65
var location = MinecraftLocation.fromNbt(homeTag);
super.put(
name,
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically, the old and new Compound varieties should be format-compatible, as the new one is fairly forgiving. The NbtList one is can stick around for compatibility until if/when Mojang decides to break the methods used here in a complicated way.

float headYaw,
float pitch,
String name
Optional<String> name
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is ugly and probably deserves an inline comment with some capslock

@John-Paul-R John-Paul-R merged commit e97b3ac into 1.21.x Jun 24, 2025
1 check passed
@John-Paul-R John-Paul-R deleted the codecs branch June 24, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant