Class FusionTextureMetadataProvider
java.lang.Object
com.supermartijn642.fusion.api.provider.FusionTextureMetadataProvider
- All Implemented Interfaces:
net.minecraft.data.DataProvider
public abstract class FusionTextureMetadataProvider
extends Object
implements net.minecraft.data.DataProvider
Allows generating texture metadata files for Fusion's texture types.
Users must extend the class and overwrite
generate().
Users may use addTextureMetadata(ResourceLocation, TextureType, Object) to add metadata which should be generated.
Created 02/05/2023 by SuperMartijn642
-
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
SHA1 -
Constructor Summary
ConstructorsConstructorDescriptionFusionTextureMetadataProvider(String modid, net.minecraft.data.DataGenerator generator) -
Method Summary
Modifier and TypeMethodDescriptionfinal <T> voidaddTextureMetadata(net.minecraft.resources.ResourceLocation location, TextureType<T> textureType, T data) Adds texture metadata to be generated.protected abstract voidgenerate()Adds texture metadata which should be generated throughaddTextureMetadata(ResourceLocation, TextureType, Object).getName()final voidrun(net.minecraft.data.HashCache cache)
-
Constructor Details
-
FusionTextureMetadataProvider
- 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 texture metadata which should be generated throughaddTextureMetadata(ResourceLocation, TextureType, Object). -
addTextureMetadata
public final <T> void addTextureMetadata(net.minecraft.resources.ResourceLocation location, TextureType<T> textureType, T data) Adds texture metadata to be generated.- Parameters:
location- location of the texturetextureType- type of the texturedata- metadata to be serialized
-
getName
- Specified by:
getNamein interfacenet.minecraft.data.DataProvider
-