Interface Property<T>

All Known Implementing Classes:
AbstractProperty, BooleanProperty, DirectionalProperty, EnumProperty, IntegerProperty

public interface Property<T>
Describes a state property of a block.

Example states include "variant" (indicating material or type) and "facing" (indicating orientation).

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of this state.
    Gets the value for the given string, or null.
    Return a list of available values for this state.
  • Method Details

    • getName

      String getName()
      Returns the name of this state.
      Returns:
      The state name
    • getValues

      List<T> getValues()
      Return a list of available values for this state.
      Returns:
      the list of state values
    • getValueFor

      @Nullable T getValueFor(String string) throws IllegalArgumentException
      Gets the value for the given string, or null.
      Parameters:
      string - The string
      Returns:
      The value, or null
      Throws:
      IllegalArgumentException - When the value is invalid.