@Environment(value=CLIENT) public class WeightedBakedModel extends Object implements BakedModel
Modifier and Type | Class and Description |
---|---|
static class |
WeightedBakedModel.Builder |
(package private) static class |
WeightedBakedModel.Entry |
Modifier and Type | Field and Description |
---|---|
private BakedModel |
defaultModel |
private List<WeightedBakedModel.Entry> |
models |
private int |
totalWeight |
Constructor and Description |
---|
WeightedBakedModel(List<WeightedBakedModel.Entry> models) |
Modifier and Type | Method and Description |
---|---|
ModelOverrideList |
getOverrides() |
List<BakedQuad> |
getQuads(BlockState state,
Direction face,
Random random) |
Sprite |
getSprite() |
ModelTransformation |
getTransformation() |
boolean |
hasDepth() |
boolean |
isBuiltin() |
boolean |
isSideLit()
Allows control of the lighting when rendering a model in a GUI.
|
boolean |
useAmbientOcclusion() |
private final int totalWeight
private final List<WeightedBakedModel.Entry> models
private final BakedModel defaultModel
public WeightedBakedModel(List<WeightedBakedModel.Entry> models)
public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction face, Random random)
getQuads
in interface BakedModel
public boolean useAmbientOcclusion()
useAmbientOcclusion
in interface BakedModel
public boolean hasDepth()
hasDepth
in interface BakedModel
public boolean isSideLit()
True, the model will be lit from the side, like a block.
False, the model will be lit from the front, like an item.
isSideLit
in interface BakedModel
public boolean isBuiltin()
isBuiltin
in interface BakedModel
public Sprite getSprite()
getSprite
in interface BakedModel
public ModelTransformation getTransformation()
getTransformation
in interface BakedModel
public ModelOverrideList getOverrides()
getOverrides
in interface BakedModel