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
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
net.minecraft.data.DataProvider.Factory<T extends net.minecraft.data.DataProvider> -
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR, LOGGER -
Constructor Summary
Constructors -
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 CompletableFuture<?>run(net.minecraft.data.CachedOutput cache)
-
Constructor Details
-
FusionModelProvider
- Parameters:
modid- modid of the mod which creates the generator
-
-
Method Details
-
run
- Specified by:
runin interfacenet.minecraft.data.DataProvider
-
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
-