Class TSimpleRegistry<T>
java.lang.Object
io.github.thecsdev.tcdcommons.api.registry.TAbstractMappedRegistry<T>
io.github.thecsdev.tcdcommons.api.registry.TSimpleRegistry<T>
A simple
TRegistry
that allows registering new entries, but
prohibits unregistering existing entries.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.thecsdev.tcdcommons.api.registry.TAbstractMappedRegistry
TAbstractMappedRegistry.MappedRegistryEvent<T>
-
Field Summary
Fields inherited from class io.github.thecsdev.tcdcommons.api.registry.TAbstractMappedRegistry
eRegistered, eUnRegistered, map
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal T
unregister
(net.minecraft.util.Identifier id) UnRegisters an existing entry that is part of thisTRegistry
.Methods inherited from class io.github.thecsdev.tcdcommons.api.registry.TAbstractMappedRegistry
containsKey, containsValue, forEach, getKey, getValue, iterator, register, size, spliterator
-
Constructor Details
-
TSimpleRegistry
public TSimpleRegistry()
-
-
Method Details
-
unregister
Description copied from interface:TRegistry
UnRegisters an existing entry that is part of thisTRegistry
.- Specified by:
unregister
in interfaceTRegistry<T>
- Overrides:
unregister
in classTAbstractMappedRegistry<T>
- Parameters:
id
- The uniqueIdentifier
of the entry being unregistered.- Returns:
- The entry value that was previously associated with the given unique
Identifier
, or null if there was no such entry. - Throws:
UnsupportedOperationException
- If thisTRegistry
does not support unregistering existing entries.
-