Object CustomBlockRegistry
-
- All Implemented Interfaces:
public class CustomBlockRegistry
-
-
Field Summary
Fields Modifier and Type Field Description private final LinkedHashMap<String, CustomBlockType<out CustomBlockMechanic>>
registry
private final List<String>
names
private final List<CustomBlockType<?>>
types
public final static CustomBlockRegistry
INSTANCE
-
Method Summary
Modifier and Type Method Description final <T extends CustomBlockMechanic> CustomBlockType<CustomBlockMechanic>
getByClass(Class<T> mechanicClass)
final CustomBlockMechanic
getMechanic(String itemId)
final CustomBlockMechanic
getMechanic(Block block)
final CustomBlockMechanic
getMechanic(BlockData blockData)
final <T extends CustomBlockMechanic> Unit
register(CustomBlockType<T> blockType)
final CustomBlockType<out CustomBlockMechanic>
get(String name)
final CustomBlockType<?>
fromMechanicSection(ConfigurationSection section)
final LinkedHashMap<String, CustomBlockType<out CustomBlockMechanic>>
getRegistry()
final List<String>
getNames()
final List<CustomBlockType<?>>
getTypes()
-
-
Method Detail
-
getByClass
final <T extends CustomBlockMechanic> CustomBlockType<CustomBlockMechanic> getByClass(Class<T> mechanicClass)
-
getMechanic
final CustomBlockMechanic getMechanic(String itemId)
-
getMechanic
final CustomBlockMechanic getMechanic(Block block)
-
getMechanic
final CustomBlockMechanic getMechanic(BlockData blockData)
-
register
final <T extends CustomBlockMechanic> Unit register(CustomBlockType<T> blockType)
-
get
final CustomBlockType<out CustomBlockMechanic> get(String name)
-
fromMechanicSection
final CustomBlockType<?> fromMechanicSection(ConfigurationSection section)
-
getRegistry
final LinkedHashMap<String, CustomBlockType<out CustomBlockMechanic>> getRegistry()
-
getTypes
final List<CustomBlockType<?>> getTypes()
-
-
-
-