Class ModelProvider<T extends ModelBuilder<T>>
java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.ModelProvider<T>
- All Implemented Interfaces:
net.minecraft.data.DataProvider
- Direct Known Subclasses:
BlockModelProvider,ItemModelProvider
public abstract class ModelProvider<T extends ModelBuilder<T>>
extends Object
implements net.minecraft.data.DataProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringfinal ExistingFileHelperprotected final Stringprotected final net.minecraft.data.DataGeneratorstatic final Stringprotected static final ExistingFileHelper.ResourceTypeprotected static final ExistingFileHelper.ResourceTypeprotected final Stringprotected static final ExistingFileHelper.ResourceTypeFields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionModelProvider(net.minecraft.data.DataGenerator generator, String modid, String folder, BiFunction<net.minecraft.resources.ResourceLocation, ExistingFileHelper, T> builderFromModId, ExistingFileHelper existingFileHelper) ModelProvider(net.minecraft.data.DataGenerator generator, String modid, String folder, Function<net.minecraft.resources.ResourceLocation, T> factory, ExistingFileHelper existingFileHelper) -
Method Summary
Modifier and TypeMethodDescriptionbuttonInventory(String name, net.minecraft.resources.ResourceLocation texture) buttonPressed(String name, net.minecraft.resources.ResourceLocation texture) protected voidclear()cube(String name, net.minecraft.resources.ResourceLocation down, net.minecraft.resources.ResourceLocation up, net.minecraft.resources.ResourceLocation north, net.minecraft.resources.ResourceLocation south, net.minecraft.resources.ResourceLocation east, net.minecraft.resources.ResourceLocation west) cubeBottomTop(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) cubeColumn(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation end) cubeColumnHorizontal(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation end) cubeTop(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation top) doorBottomLeft(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorBottomLeftOpen(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorBottomRight(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorBottomRightOpen(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorTopLeft(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorTopLeftOpen(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorTopRight(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) doorTopRightOpen(String name, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) fenceGateOpen(String name, net.minecraft.resources.ResourceLocation texture) fenceGateWall(String name, net.minecraft.resources.ResourceLocation texture) fenceGateWallOpen(String name, net.minecraft.resources.ResourceLocation texture) fenceInventory(String name, net.minecraft.resources.ResourceLocation texture) protected voidgenerateAll(net.minecraft.data.CachedOutput cache) getBuilder(String path) getExistingFile(net.minecraft.resources.ResourceLocation path) net.minecraft.resources.ResourceLocationnet.minecraft.resources.ResourceLocationnested()Returns a model builder that's not directly saved to disk. Meant for use in custom model loaders..orientable(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation front, net.minecraft.resources.ResourceLocation top) orientableVertical(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation front) orientableWithBottom(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation front, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) paneNoSide(String name, net.minecraft.resources.ResourceLocation pane) paneNoSideAlt(String name, net.minecraft.resources.ResourceLocation pane) panePost(String name, net.minecraft.resources.ResourceLocation pane, net.minecraft.resources.ResourceLocation edge) paneSide(String name, net.minecraft.resources.ResourceLocation pane, net.minecraft.resources.ResourceLocation edge) paneSideAlt(String name, net.minecraft.resources.ResourceLocation pane, net.minecraft.resources.ResourceLocation edge) pressurePlate(String name, net.minecraft.resources.ResourceLocation texture) pressurePlateDown(String name, net.minecraft.resources.ResourceLocation texture) protected abstract voidvoidrun(net.minecraft.data.CachedOutput cache) singleTexture(String name, net.minecraft.resources.ResourceLocation parent, String textureKey, net.minecraft.resources.ResourceLocation texture) singleTexture(String name, net.minecraft.resources.ResourceLocation parent, net.minecraft.resources.ResourceLocation texture) slab(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) slabTop(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) stairs(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) stairsInner(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) stairsOuter(String name, net.minecraft.resources.ResourceLocation side, net.minecraft.resources.ResourceLocation bottom, net.minecraft.resources.ResourceLocation top) trapdoorBottom(String name, net.minecraft.resources.ResourceLocation texture) trapdoorOpen(String name, net.minecraft.resources.ResourceLocation texture) trapdoorOrientableBottom(String name, net.minecraft.resources.ResourceLocation texture) trapdoorOrientableOpen(String name, net.minecraft.resources.ResourceLocation texture) trapdoorOrientableTop(String name, net.minecraft.resources.ResourceLocation texture) trapdoorTop(String name, net.minecraft.resources.ResourceLocation texture) wallInventory(String name, net.minecraft.resources.ResourceLocation wall) wallSideTall(String name, net.minecraft.resources.ResourceLocation wall) withExistingParent(String name, String parent) withExistingParent(String name, net.minecraft.resources.ResourceLocation parent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.data.DataProvider
getName
-
Field Details
-
BLOCK_FOLDER
- See Also:
-
ITEM_FOLDER
- See Also:
-
TEXTURE
-
MODEL
-
MODEL_WITH_EXTENSION
-
generatedModels
public final Map<net.minecraft.resources.ResourceLocation,T extends ModelBuilder<T>> generatedModels -
existingFileHelper
-
generator
protected final net.minecraft.data.DataGenerator generator -
modid
-
folder
-
factory
protected final Function<net.minecraft.resources.ResourceLocation,T extends ModelBuilder<T>> factory
-
-
Constructor Details
-
ModelProvider
public ModelProvider(net.minecraft.data.DataGenerator generator, String modid, String folder, Function<net.minecraft.resources.ResourceLocation, T> factory, ExistingFileHelper existingFileHelper) -
ModelProvider
public ModelProvider(net.minecraft.data.DataGenerator generator, String modid, String folder, BiFunction<net.minecraft.resources.ResourceLocation, ExistingFileHelper, T> builderFromModId, ExistingFileHelper existingFileHelper)
-
-
Method Details
-
registerModels
protected abstract void registerModels() -
getBuilder
-
modLoc
-
mcLoc
-
withExistingParent
-
withExistingParent
-
cube
public T cube(String name, net.minecraft.resources.ResourceLocation down, net.minecraft.resources.ResourceLocation up, net.minecraft.resources.ResourceLocation north, net.minecraft.resources.ResourceLocation south, net.minecraft.resources.ResourceLocation east, net.minecraft.resources.ResourceLocation west) -
singleTexture
-
singleTexture
-
cubeAll
-
cubeTop
-
cubeBottomTop
-
cubeColumn
-
cubeColumnHorizontal
-
orientableVertical
-
orientableWithBottom
-
orientable
-
crop
-
cross
-
stairs
-
stairsOuter
-
stairsInner
-
slab
-
slabTop
-
button
-
buttonPressed
-
buttonInventory
-
pressurePlate
-
pressurePlateDown
-
sign
-
fencePost
-
fenceSide
-
fenceInventory
-
fenceGate
-
fenceGateOpen
-
fenceGateWall
-
fenceGateWallOpen
-
wallPost
-
wallSide
-
wallSideTall
-
wallInventory
-
panePost
-
paneSide
-
paneSideAlt
-
paneNoSide
-
paneNoSideAlt
-
doorBottomLeft
-
doorBottomLeftOpen
-
doorBottomRight
-
doorBottomRightOpen
-
doorTopLeft
-
doorTopLeftOpen
-
doorTopRight
-
doorTopRightOpen
-
trapdoorBottom
-
trapdoorTop
-
trapdoorOpen
-
trapdoorOrientableBottom
-
trapdoorOrientableTop
-
trapdoorOrientableOpen
-
torch
-
torchWall
-
carpet
-
nested
Returns a model builder that's not directly saved to disk. Meant for use in custom model loaders..- Returns:
- a model builder that's not directly saved to disk. Meant for use in custom model loaders.
-
getExistingFile
-
clear
protected void clear() -
run
- Specified by:
runin interfacenet.minecraft.data.DataProvider- Throws:
IOException
-
generateAll
protected void generateAll(net.minecraft.data.CachedOutput cache)
-