Class Blocks

java.lang.Object
com.sk89q.worldedit.blocks.Blocks

public final class Blocks extends Object
Block-related utility methods.
  • Method Details

    • containsFuzzy

      public static <B extends BlockStateHolder<B>> boolean containsFuzzy(Collection<? extends BlockStateHolder<?>> collection, B o)
      Checks whether a given block is in a list of base blocks.
      Parameters:
      collection - the collection
      o - the block
      Returns:
      true if the collection contains the given block
    • resolveProperties

      public static Map<Property<Object>,Object> resolveProperties(Map<String,String> states, BlockType type)
      Parses a string->string map to find the matching Property and values for the given BlockType.
      Parameters:
      states - the desired states and values
      type - the block type to get properties and values for
      Returns:
      a property->value map