Class JavaRegistryReaders
JavaRegistryReaders for all networked JavaRegistryKeys. A "networked registry" is a Java registry that is synced with the client over network.
The server can add, modify, or remove entries from such a registry during the configuration phase. This will happen especially frequently on proxy servers.
For each networked registry defined in JavaRegistries, a JavaRegistryReader has to be defined here. This may be a KeyDependentJavaRegistryReader as well,
however prefer to use JavaRegistryReader when possible (see the notes at KeyDependentJavaRegistryReader as to why).
Register readers in the static initialisation block below, using register(JavaRegistryKey, JavaRegistryReader)
or registerKeyDependent(JavaRegistryKey, KeyDependentJavaRegistryReader). Please maintain the same order as in JavaRegistries.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic <T> Optional<JavaRegistryReader<T>> Tries to get the reader for the givenkey.static <T> Optional<KeyDependentJavaRegistryReader<T>> getReader(JavaRegistryKey<T> key) Tries to get the reader for the givenkey.static Collection<JavaRegistryKey<?>>
-
Method Details
-
networkRegistries
- Returns:
- a collection of
JavaRegistryKeys for all networked registries
-
getReader
Tries to get the reader for the givenkey. This will be an empty optional when the registry is built-in.- Type Parameters:
T- the type of the registry- Parameters:
key- theJavaRegistryKeyto get the reader for- Returns:
- the reader, or an empty optional when the registry is built-in (no reader was defined)
-
getInlineSuitableReader
Tries to get the reader for the givenkey. This will be an empty optional when the registry is built-in.This method ensures the reader is a
JavaRegistryReader, which supports reading inline entries (without aKey).- Type Parameters:
T- the type of the registry- Parameters:
key- theJavaRegistryKeyto get the reader for- Returns:
- the reader, or an empty optional when the registry is built-in (no reader was defined), or the registry reader does not support reading inline entries
-
bootstrap
public static void bootstrap()
-