public class VariantsBlockStateSupplier extends Object implements BlockStateSupplier
Modifier and Type | Field and Description |
---|---|
private Block |
block |
private Set<Property<?>> |
definedProperties |
private List<BlockStateVariantMap> |
variantMaps |
private List<BlockStateVariant> |
variants |
Modifier | Constructor and Description |
---|---|
private |
VariantsBlockStateSupplier(Block block,
List<BlockStateVariant> variants) |
Modifier and Type | Method and Description |
---|---|
VariantsBlockStateSupplier |
coordinate(BlockStateVariantMap map)
Appends a block state variant map to this block state information.
|
static VariantsBlockStateSupplier |
create(Block block) |
static VariantsBlockStateSupplier |
create(Block block,
BlockStateVariant variant) |
static VariantsBlockStateSupplier |
create(Block block,
BlockStateVariant[] variants) |
JsonElement |
get() |
Block |
getBlock() |
private static List<BlockStateVariant> |
intersect(List<BlockStateVariant> list,
List<BlockStateVariant> list2) |
private final Block block
private final List<BlockStateVariant> variants
private final List<BlockStateVariantMap> variantMaps
private VariantsBlockStateSupplier(Block block, List<BlockStateVariant> variants)
public VariantsBlockStateSupplier coordinate(BlockStateVariantMap map)
A block state variant map defines some of the variant settings based on a defined set of properties in the block state, such as the model of the block state is determined by a coordinated map of power and machine type property, and the y rotation determined by a facing property, etc.
map
- the variant map to contribute property to variant settings
mappings to the block state filepublic JsonElement get()
get
in interface Supplier<JsonElement>
private static List<BlockStateVariant> intersect(List<BlockStateVariant> list, List<BlockStateVariant> list2)
public Block getBlock()
getBlock
in interface BlockStateSupplier
public static VariantsBlockStateSupplier create(Block block)
public static VariantsBlockStateSupplier create(Block block, BlockStateVariant variant)
public static VariantsBlockStateSupplier create(Block block, BlockStateVariant[] variants)