Package net.minecraft.data.client.model
Class VariantsBlockStateSupplier
java.lang.Object
net.minecraft.data.client.model.VariantsBlockStateSupplier
- All Implemented Interfaces:
Supplier<JsonElement>,BlockStateSupplier
public class VariantsBlockStateSupplier extends Object implements BlockStateSupplier
-
Field Summary
Fields Modifier and Type Field Description private Blockblockprivate Set<Property<?>>definedPropertiesprivate List<BlockStateVariantMap>variantMapsprivate List<BlockStateVariant>variants -
Constructor Summary
Constructors Modifier Constructor Description privateVariantsBlockStateSupplier(Block block, List<BlockStateVariant> variants) -
Method Summary
Modifier and Type Method Description VariantsBlockStateSuppliercoordinate(BlockStateVariantMap map)Appends a block state variant map to this block state information.static VariantsBlockStateSuppliercreate(Block block)static VariantsBlockStateSuppliercreate(Block block, BlockStateVariant variant)static VariantsBlockStateSuppliercreate(Block block, BlockStateVariant[] variants)JsonElementget()BlockgetBlock()private static List<BlockStateVariant>intersect(List<BlockStateVariant> list, List<BlockStateVariant> list2)
-
Field Details
-
block
-
variants
-
definedProperties
-
variantMaps
-
-
Constructor Details
-
VariantsBlockStateSupplier
-
-
Method Details
-
coordinate
Appends a block state variant map to this block state information.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.
- Parameters:
map- the variant map to contribute property to variant settings mappings to the block state file- Returns:
- this block state file
-
get
- Specified by:
getin interfaceSupplier<JsonElement>
-
intersect
private static List<BlockStateVariant> intersect(List<BlockStateVariant> list, List<BlockStateVariant> list2) -
getBlock
- Specified by:
getBlockin interfaceBlockStateSupplier
-
create
-
create
-
create
-