Interface IValueTypeLightLevelRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
- All Known Implementing Classes:
ValueTypeLightLevelRegistry
public interface IValueTypeLightLevelRegistry
extends org.cyclops.cyclopscore.init.IRegistry
Registry for mapping value types to their light level calculator.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescription<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
-
register
<L extends IValueTypeLightLevelRegistry.ILightLevelCalculator<V>,V extends IValue> L register(IValueType<V> valueType, L lightLevelCalculator) Register light level calculator for a value type.- 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 <V extends IValue> IValueTypeLightLevelRegistry.ILightLevelCalculator<V> getLightLevelCalculator(IValueType<V> valueType) Get the light level calculator for the given value type.- Type Parameters:
V- The value type.- Parameters:
valueType- The value type- Returns:
- The registered light level calculator.
-
getLightLevel
Get the light level calculator for the given value.- Type Parameters:
V- The value type.- Parameters:
value- The value- Returns:
- The registered light level calculator.
- Throws:
InvalidValueTypeException- If an error occured while autocasting.
-