Interface BlockRegistry

All Known Implementing Classes:
BundledBlockRegistry

public interface BlockRegistry
Provides information on blocks and provides methods to create them.
  • Method Details

    • getRichName

      com.sk89q.worldedit.util.formatting.text.Component getRichName(BlockType blockType)
      Gets the name for the given block.
      Parameters:
      blockType - the block
      Returns:
      The name
    • getName

      @Deprecated @Nullable default String getName(BlockType blockType)
      Deprecated.
      Names are now translatable, use getRichName(BlockType).
      Gets the name for the given block.
      Parameters:
      blockType - the block
      Returns:
      The name, or null if it's unknown
    • getMaterial

      @Nullable BlockMaterial getMaterial(BlockType blockType)
      Get the material for the given block.
      Parameters:
      blockType - the block
      Returns:
      the material, or null if the material information is not known
    • getProperties

      Map<String,? extends Property<?>> getProperties(BlockType blockType)
      Get an unmodifiable map of states for this block.
      Parameters:
      blockType - the block
      Returns:
      a map of states where the key is the state's ID
    • getInternalBlockStateId

      OptionalInt getInternalBlockStateId(BlockState state)
      Retrieve the internal ID for a given state, if possible.
      Parameters:
      state - The block state
      Returns:
      the internal ID of the state