Class ValueTypeLightLevelRegistry
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeLightLevelRegistry
- All Implemented Interfaces:
org.cyclops.cyclopscore.init.IRegistry,IValueTypeLightLevelRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.integrateddynamics.api.evaluate.variable.IValueTypeLightLevelRegistry
IValueTypeLightLevelRegistry.ILightLevelCalculator<V extends IValue> -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueTypeLightLevelRegistry<V extends IValue>
intgetLightLevel(V value) Get the light level calculator for the given value.<V extends IValue>
IValueTypeLightLevelRegistry.ILightLevelCalculator<V>getLightLevelCalculator(IValueType<V> valueType) Get the light level calculator for the given value type.<L extends IValueTypeLightLevelRegistry.ILightLevelCalculator<V>,V extends IValue>
Lregister(IValueType<V> valueType, L lightLevelCalculator) Register light level calculator for a value type.
-
Method Details
-
getInstance
- Returns:
- The unique instance.
-
register
public <L extends IValueTypeLightLevelRegistry.ILightLevelCalculator<V>,V extends IValue> L register(IValueType<V> valueType, L lightLevelCalculator) Description copied from interface:IValueTypeLightLevelRegistryRegister light level calculator for a value type.- Specified by:
registerin interfaceIValueTypeLightLevelRegistry- Type Parameters:
L- The light level calculator type.V- The value type.- Parameters:
valueType- The value typelightLevelCalculator- The light level calculator.- Returns:
- The registered light level calculator.
-
getLightLevelCalculator
@Nullable public <V extends IValue> IValueTypeLightLevelRegistry.ILightLevelCalculator<V> getLightLevelCalculator(IValueType<V> valueType) Description copied from interface:IValueTypeLightLevelRegistryGet the light level calculator for the given value type.- Specified by:
getLightLevelCalculatorin interfaceIValueTypeLightLevelRegistry- Type Parameters:
V- The value type.- Parameters:
valueType- The value type- Returns:
- The registered light level calculator.
-
getLightLevel
Description copied from interface:IValueTypeLightLevelRegistryGet the light level calculator for the given value.- Specified by:
getLightLevelin interfaceIValueTypeLightLevelRegistry- Type Parameters:
V- The value type.- Parameters:
value- The value- Returns:
- The registered light level calculator.
- Throws:
InvalidValueTypeException- If an error occured while autocasting.
-