Class VersionedRegistry<T extends MappedEntity>
java.lang.Object
com.github.retrooper.packetevents.util.mappings.VersionedRegistry<T>
- All Implemented Interfaces:
IRegistry<T>
,BiFunction<ClientVersion,
Integer, T>
@NullMarked
public final class VersionedRegistry<T extends MappedEntity>
extends Object
implements IRegistry<T>
-
Constructor Summary
ConstructorsConstructorDescriptionVersionedRegistry
(ResourceLocation registryKey, String mappingsPath) VersionedRegistry
(String registry) VersionedRegistry
(String registry, String mappingsPath) -
Method Summary
Modifier and TypeMethodDescription<Z extends T>
Zdefine
(String name, Function<TypesBuilderData, Z> builder) getById
(ClientVersion version, int id) getByName
(ResourceLocation name) Returns an immutable view of the registry entries.int
getId
(MappedEntity entity, ClientVersion version) int
size()
toString()
void
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
Methods inherited from interface com.github.retrooper.packetevents.util.mappings.IRegistry
apply, getByIdOrThrow, getByNameOrThrow, getByNameOrThrow, getId
-
Constructor Details
-
VersionedRegistry
-
VersionedRegistry
-
VersionedRegistry
-
-
Method Details
-
define
-
getTypesBuilder
-
unloadMappings
@Internal public void unloadMappings() -
getByName
- Specified by:
getByName
in interfaceIRegistry<T extends MappedEntity>
-
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>
-
getEntries
Returns an immutable view of the registry entries.- Specified by:
getEntries
in interfaceIRegistry<T extends MappedEntity>
- Returns:
- Registry entries
-
size
public int size()- Specified by:
size
in interfaceIRegistry<T extends MappedEntity>
-
getRegistryKey
- Specified by:
getRegistryKey
in interfaceIRegistry<T extends MappedEntity>
-
toString
-