Interface CustomBlockState


public interface CustomBlockState
This class is used to store a custom block state, which contains CustomBlockData tied to defined properties and values
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the custom block data associated with the state
    @NonNull String
    Gets the name of the state
    @NonNull Map<String,Object>
    Gets a map of the properties for the state
    <T> @NonNull T
    property(@NonNull String propertyName)
    Gets the given property for the state
  • Method Details

    • block

      @NonNull CustomBlockData block()
      Gets the custom block data associated with the state
      Returns:
      The custom block data for the state.
    • name

      @NonNull String name()
      Gets the name of the state
      Returns:
      The name of the state.
    • property

      <T> @NonNull T property(@NonNull String propertyName)
      Gets the given property for the state
      Parameters:
      propertyName - the property name
      Returns:
      the boolean, int, or string property.
    • properties

      @NonNull Map<String,Object> properties()
      Gets a map of the properties for the state
      Returns:
      The properties for the state.