@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 BakedModelpublic boolean useAmbientOcclusion()
useAmbientOcclusion in interface BakedModelpublic boolean hasDepth()
hasDepth in interface BakedModelpublic 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 BakedModelpublic boolean isBuiltin()
isBuiltin in interface BakedModelpublic Sprite getSprite()
getSprite in interface BakedModelpublic ModelTransformation getTransformation()
getTransformation in interface BakedModelpublic ModelOverrideList getOverrides()
getOverrides in interface BakedModel