Class PylonRegistry
-
- All Implemented Interfaces:
-
kotlin.collections.Iterable
public final class PylonRegistry<T extends Keyed> implements Iterable<T>
-
-
Field Summary
Fields Modifier and Type Field Description public final static PylonRegistry<PylonItemSchema>
ITEMS
public final static PylonRegistry<PylonBlockSchema>
BLOCKS
public final static PylonRegistry<PylonEntitySchema>
ENTITIES
public final static PylonRegistry<PylonFluid>
FLUIDS
public final static PylonRegistry<PylonAddon>
ADDONS
public final static PylonRegistry<GameTestConfig>
GAMETESTS
public final static PylonRegistry<RecipeType<?>>
RECIPE_TYPES
public final static PylonRegistry<MobDrop>
MOB_DROPS
public final static PylonRegistry<Research>
RESEARCHES
public final static PylonRegistry<Tag<ItemTypeWrapper>>
ITEM_TAGS
private final PylonRegistryKey<T>
key
-
Constructor Summary
Constructors Constructor Description PylonRegistry(PylonRegistryKey<T> key)
-
Method Summary
Modifier and Type Method Description final PylonRegistryKey<T>
getKey()
final Unit
register(T values)
final Unit
register(Tag<T> tag)
final Unit
unregister(T values)
final Unit
unregister(Tag<T> tag)
final Unit
unregister(NamespacedKey keys)
final Unit
unregisterAllFromAddon(PylonAddon addon)
final T
get(NamespacedKey key)
final T
getOrThrow(NamespacedKey key)
final T
getOrCreate(NamespacedKey key, Function0<T> creator)
final Set<NamespacedKey>
getKeys()
final Collection<T>
getValues()
final Boolean
contains(NamespacedKey key)
final Boolean
contains(Tag<T> tag)
Iterator<T>
iterator()
final Stream<T>
stream()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static <T extends Keyed> PylonRegistry<T>
getRegistry(PylonRegistryKey<T> key)
final static <T extends Keyed> PylonRegistry<T>
getRegistryOrNull(PylonRegistryKey<T> key)
final static Unit
addRegistry(PylonRegistry<?> registry)
-
-
Constructor Detail
-
PylonRegistry
PylonRegistry(PylonRegistryKey<T> key)
-
-
Method Detail
-
getKey
final PylonRegistryKey<T> getKey()
-
unregister
final Unit unregister(T values)
-
unregister
final Unit unregister(Tag<T> tag)
-
unregister
final Unit unregister(NamespacedKey keys)
-
unregisterAllFromAddon
final Unit unregisterAllFromAddon(PylonAddon addon)
-
get
final T get(NamespacedKey key)
-
getOrThrow
final T getOrThrow(NamespacedKey key)
-
getOrCreate
final T getOrCreate(NamespacedKey key, Function0<T> creator)
-
getKeys
final Set<NamespacedKey> getKeys()
-
getValues
final Collection<T> getValues()
-
contains
final Boolean contains(NamespacedKey key)
-
getRegistry
final static <T extends Keyed> PylonRegistry<T> getRegistry(PylonRegistryKey<T> key)
-
getRegistryOrNull
final static <T extends Keyed> PylonRegistry<T> getRegistryOrNull(PylonRegistryKey<T> key)
-
addRegistry
final static Unit addRegistry(PylonRegistry<?> registry)
-
-
-
-