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.
  • 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 type
      lightLevelCalculator - 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

      <V extends IValue> int getLightLevel(V value) throws InvalidValueTypeException
      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.