public class VanillaModelType extends java.lang.Object implements ModelType<net.minecraft.client.renderer.model.BlockModel>
| Constructor and Description |
|---|
VanillaModelType() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.client.renderer.model.IBakedModel |
bake(ModelBakingContext context,
net.minecraft.client.renderer.model.BlockModel data)
Converts the model data into a baked model.
|
net.minecraft.client.renderer.model.BlockModel |
deserialize(com.google.gson.JsonObject json)
Deserializes the given json to some data.
|
net.minecraft.client.renderer.model.BlockModel |
getAsVanillaModel(net.minecraft.client.renderer.model.BlockModel data)
Represents the model as a vanilla
BlockModel instance. |
java.util.Collection<net.minecraft.util.ResourceLocation> |
getModelDependencies(net.minecraft.client.renderer.model.BlockModel data)
Gets all the dependencies on other model files.
|
java.util.Collection<SpriteIdentifier> |
getTextureDependencies(GatherTexturesContext context,
net.minecraft.client.renderer.model.BlockModel data)
Gets all the dependencies on sprites.
|
com.google.gson.JsonObject |
serialize(net.minecraft.client.renderer.model.BlockModel value)
Serializes the given data to json.
|
public java.util.Collection<net.minecraft.util.ResourceLocation> getModelDependencies(net.minecraft.client.renderer.model.BlockModel data)
ModelTypegetModelDependencies in interface ModelType<net.minecraft.client.renderer.model.BlockModel>data - custom model datapublic java.util.Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context, net.minecraft.client.renderer.model.BlockModel data)
ModelTypegetTextureDependencies in interface ModelType<net.minecraft.client.renderer.model.BlockModel>context - context for gathering texture dependenciesdata - custom model dataGatherTexturesContextpublic net.minecraft.client.renderer.model.IBakedModel bake(ModelBakingContext context, net.minecraft.client.renderer.model.BlockModel data)
ModelTypebake in interface ModelType<net.minecraft.client.renderer.model.BlockModel>context - context for baking the modeldata - custom model dataModelBakingContext@Nullable public net.minecraft.client.renderer.model.BlockModel getAsVanillaModel(net.minecraft.client.renderer.model.BlockModel data)
ModelTypeBlockModel instance. May be used gather info from other models, such as with the vanilla 'parent' property.
If the model cannot be represented as a BlockModel instance, this method should return null.getAsVanillaModel in interface ModelType<net.minecraft.client.renderer.model.BlockModel>data - custom model dataBlockModel instance, or null if such a representation is not availablepublic net.minecraft.client.renderer.model.BlockModel deserialize(com.google.gson.JsonObject json)
throws com.google.gson.JsonParseException
Serializerdeserialize in interface Serializer<net.minecraft.client.renderer.model.BlockModel>com.google.gson.JsonParseException - if the given json does not match the expected formatpublic com.google.gson.JsonObject serialize(net.minecraft.client.renderer.model.BlockModel value)
Serializerserialize in interface Serializer<net.minecraft.client.renderer.model.BlockModel>