Repository navigation
Feature/26.3 registries - #14
Open
eclipseisoffline wants to merge 13 commits into
Open
eclipseisoffline wants to merge 13 commits into
eclipseisoffline wants to merge 13 commits into
Conversation
…capabilities to JavaRegistryProvider, rename methods in JavaRegistryKey to get*
…te JavaRegistryLookup, MutableJavaRegistry, hold built-in Java content in BuiltInJavaRegistries
…retrieve registry contents
…split between key-dependent and "simple" readers
…ndent, directly use JavaRegistryTagCache in gametests
1 task done
onebeastchris
approved these changes
Oct 6, 2026
onebeastchris
left a comment
There was a problem hiding this comment.
Looks awesome! Don't have much to say tbh; structure wise i (without claude this time, heh) like this. Great to see more tests too 👀
| EntityDamageCause cause = session.getRegistryCache().registry(JavaRegistries.DAMAGE_TYPE).byId(packet.getSourceTypeId()); | ||
| if (cause == null) { | ||
| cause = EntityDamageCause.OVERRIDE; | ||
| Optional<EntityDamageCause> cause = JavaRegistries.DAMAGE_TYPE.get(session.javaRegistries(), packet.getSourceTypeId()); |
There was a problem hiding this comment.
EntityDamageCause cause = JavaRegistries.DAMAGE_TYPE.get(session.javaRegistries(), packet.getSourceTypeId())
.orElse(EntityDamageCause.OVERRIDE);Don't see why we'd need the optional :p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes:
GeyserHolderSets support heterogeneous NBT lists using text-serializer-nbt's implementation.JavaRegistryProvidernow provides both Java registry and tag data, allowing tags to be used in gametests.JavaRegistryTagCachein Geyser.RegistryCacheandTagCachestill exist, but are not used directly anymore.JavaRegistryLookupandJavaRegistryKey'sget*methods now either return an optional or throw when an element is missing, enforcing safety. The exception notes the registry name and lookup details.SimpleJavaRegistrywas reworked significantly:RegistryEntryDatacan be unbound (unknown) before freezing (see Javadocs).JavaRegistryLookupproviding simple access to one or more registry entries.JavaRegistryextendsJavaRegistryLookupwith methods to iterate over the entire registry.MutableJavaRegistryextendsJavaRegistryand has a mutable and frozen state, and is implemented bySimpleJavaRegistry.BuiltInJavaRegistriesclass, and useSimpleJavaRegistrys, which allows using the same ID/key/entry <-> ID/key/entry lookups as per-session registries, and allows a clean incorporation with per-session registries.RegistryCacheand into a newJavaRegistryReadersclass, and a distinction has been made between readers that depend on the entry's key and those that do not (see Javadocs).GeyserSessionjust for registry access has been removed, preferring to pass the weakenedJavaRegistryProviderinstance instead.org.geysermc.geyser.registry.java, except for the session-cache classes.GeyserHolderSetnow has gametests.Item#javaIdentifier()(returning a string representation of theKey) has been removed, preferring to useKeys when possible instead.All registry classes have received up-to-date Javadocs giving a thorough explanation of their inner workings and usage.