Skip to content

Conversation

@eclipseisoffline
Copy link
Member

@eclipseisoffline eclipseisoffline commented May 5, 2025

This PR makes a couple of small improvements to the DataComponents class:

  • Added contains(DataComponentType<?>) and remove(DataComponentType<T>) methods.
  • Make put(DataComponentType<T>, T) allow null values.
  • Add Javadoc to make usage of null values clear.

In the future, an additional, separate class should probably be created for data component patches.

This PR also makes a small change to DataComponentTypes: a fromKey(Key) method was added.

- Added #contains and #remove methods
- Make #put allow null values
- Add Javadoc to make usage of null values clear
Copy link
Member

@onebeastchris onebeastchris left a comment

Choose a reason for hiding this comment

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

LGTM - this could probably be improved further in the future, but it's definitely a neat improvement for the time being

@onebeastchris onebeastchris merged commit 36a4c73 into GeyserMC:feature/1.21.5 May 5, 2025
1 check passed
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.

2 participants