Class JsonUnbakedModel
java.lang.Object
net.minecraft.client.render.model.json.JsonUnbakedModel
- All Implemented Interfaces:
UnbakedModel
@Environment(CLIENT) public class JsonUnbakedModel extends Object implements UnbakedModel
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonUnbakedModel.Deserializer
static class
JsonUnbakedModel.GuiLight
-
Field Summary
Fields Modifier and Type Field Description private boolean
ambientOcclusion
private List<ModelElement>
elements
(package private) static Gson
GSON
private JsonUnbakedModel.GuiLight
guiLight
String
id
private static Logger
LOGGER
private List<ModelOverride>
overrides
protected JsonUnbakedModel
parent
protected Identifier
parentId
private static BakedQuadFactory
QUAD_FACTORY
protected Map<String,com.mojang.datafixers.util.Either<SpriteIdentifier,String>>
textureMap
private ModelTransformation
transformations
-
Constructor Summary
Constructors Constructor Description JsonUnbakedModel(Identifier parentId, List<ModelElement> elements, Map<String,com.mojang.datafixers.util.Either<SpriteIdentifier,String>> textureMap, boolean ambientOcclusion, JsonUnbakedModel.GuiLight guiLight, ModelTransformation transformations, List<ModelOverride> overrides)
-
Method Summary
-
Field Details
-
LOGGER
-
QUAD_FACTORY
-
GSON
-
elements
-
guiLight
-
ambientOcclusion
private final boolean ambientOcclusion -
transformations
-
overrides
-
id
-
textureMap
-
parent
-
parentId
-
-
Constructor Details
-
JsonUnbakedModel
public JsonUnbakedModel(@Nullable Identifier parentId, List<ModelElement> elements, Map<String,com.mojang.datafixers.util.Either<SpriteIdentifier,String>> textureMap, boolean ambientOcclusion, @Nullable JsonUnbakedModel.GuiLight guiLight, ModelTransformation transformations, List<ModelOverride> overrides)
-
-
Method Details
-
deserialize
-
deserialize
-
getElements
-
useAmbientOcclusion
public boolean useAmbientOcclusion() -
getGuiLight
-
getOverrides
-
compileOverrides
-
getModelDependencies
- Specified by:
getModelDependencies
in interfaceUnbakedModel
-
getTextureDependencies
public Collection<SpriteIdentifier> getTextureDependencies(Function<Identifier,UnbakedModel> unbakedModelGetter, Set<com.mojang.datafixers.util.Pair<String,String>> unresolvedTextureReferences)- Specified by:
getTextureDependencies
in interfaceUnbakedModel
-
bake
public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier,Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId)- Specified by:
bake
in interfaceUnbakedModel
-
bake
public BakedModel bake(ModelLoader loader, JsonUnbakedModel parent, Function<SpriteIdentifier,Sprite> textureGetter, ModelBakeSettings settings, Identifier id, boolean hasDepth) -
createQuad
private static BakedQuad createQuad(ModelElement element, ModelElementFace elementFace, Sprite sprite, Direction side, ModelBakeSettings settings, Identifier id) -
textureExists
-
resolveSprite
-
resolveTexture
-
isTextureReference
-
getRootModel
-
getTransformations
-
getTransformation
-
toString
-