Class FusionModelProvider
java.lang.Object
com.supermartijn642.fusion.api.provider.FusionModelProvider
- All Implemented Interfaces:
net.minecraft.data.DataProvider
Allows generating model files for Fusion's model types.
Users must extend the class and overwrite
generate().
Users may use addModel(ResourceLocation, ModelInstance) to add models which should be generated.
Created 01/05/2023 by SuperMartijn642
-
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
SHA1 -
Constructor Summary
ConstructorsConstructorDescriptionFusionModelProvider(String modid, net.minecraft.data.DataGenerator generator) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddModel(net.minecraft.resources.ResourceLocation location, ModelInstance<?> model) Adds a model to be generated.protected abstract voidgenerate()Adds models which should be generated throughaddModel(ResourceLocation, ModelInstance).getName()final voidrun(net.minecraft.data.HashCache cache)
-
Constructor Details
-
FusionModelProvider
- Parameters:
modid- modid of the mod which creates the generator
-
-
Method Details
-
run
- Specified by:
runin interfacenet.minecraft.data.DataProvider- Throws:
IOException
-
generate
protected abstract void generate()Adds models which should be generated throughaddModel(ResourceLocation, ModelInstance). -
addModel
public final void addModel(net.minecraft.resources.ResourceLocation location, ModelInstance<?> model) Adds a model to be generated.- Parameters:
location- location of the modelmodel- model instance to be serialized
-
getName
- Specified by:
getNamein interfacenet.minecraft.data.DataProvider
-