Package com.sk89q.worldedit.blocks
Class Blocks
java.lang.Object
com.sk89q.worldedit.blocks.Blocks
Block-related utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <B extends BlockStateHolder<B>>
booleancontainsFuzzy
(Collection<? extends BlockStateHolder<?>> collection, B o) Checks whether a given block is in a list of base blocks.resolveProperties
(Map<String, String> states, BlockType type) Parses a string->string map to find the matching Property and values for the given BlockType.
-
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 collectiono
- 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 valuestype
- the block type to get properties and values for- Returns:
- a property->value map
-