Class SimpleRegistry<T extends MappedEntity>
java.lang.Object
com.github.retrooper.packetevents.util.mappings.SimpleRegistry<T>
- All Implemented Interfaces:
IRegistry<T>
,BiFunction<ClientVersion,
Integer, T>
-
Constructor Summary
ConstructorDescriptionSimpleRegistry
(ResourceLocation registryKey) SimpleRegistry
(String registryKey) -
Method Summary
Modifier and TypeMethodDescription<Z extends T>
Zdefine
(ResourceLocation name, int id, Z instance) <Z extends T>
ZgetById
(ClientVersion version, int id) Returns an immutable view of the registry entries.int
getId
(MappedEntity entity, ClientVersion version) int
getId
(String entityName, ClientVersion version) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
SimpleRegistry
-
SimpleRegistry
-
-
Method Details
-
define
-
define
-
getByName
- Specified by:
getByName
in interfaceIRegistry<T extends MappedEntity>
-
getById
- Specified by:
getById
in interfaceIRegistry<T extends MappedEntity>
-
getId
- Specified by:
getId
in interfaceIRegistry<T extends MappedEntity>
-
getId
- Specified by:
getId
in interfaceIRegistry<T extends MappedEntity>
-
getEntries
Returns an immutable view of the registry entries.- Specified by:
getEntries
in interfaceIRegistry<T extends MappedEntity>
- Returns:
- Registry entries
-
getRegistryKey
- Specified by:
getRegistryKey
in interfaceIRegistry<T extends MappedEntity>
-
toString
-