Class ModelProvider<T extends ModelBuilder<T>>
java.lang.Object
net.minecraftforge.client.model.generators.ModelProvider<T>
- All Implemented Interfaces:
DataProvider
- Direct Known Subclasses:
BlockModelProvider
,ItemModelProvider
public abstract class ModelProvider<T extends ModelBuilder<T>>
extends Object
implements DataProvider
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
final ExistingFileHelper
protected final Function<ResourceLocation,
T> protected final String
final Map<ResourceLocation,
T> protected final DataGenerator
private static final com.google.gson.Gson
static final String
protected static final ExistingFileHelper.ResourceType
protected static final ExistingFileHelper.ResourceType
protected final String
protected static final ExistingFileHelper.ResourceType
Fields inherited from interface net.minecraft.data.DataProvider
SHA1
-
Constructor Summary
ConstructorDescriptionModelProvider
(DataGenerator generator, String modid, String folder, BiFunction<ResourceLocation, ExistingFileHelper, T> builderFromModId, ExistingFileHelper existingFileHelper) ModelProvider
(DataGenerator generator, String modid, String folder, Function<ResourceLocation, T> factory, ExistingFileHelper existingFileHelper) -
Method Summary
Modifier and TypeMethodDescriptionbutton
(String name, ResourceLocation texture) buttonInventory
(String name, ResourceLocation texture) buttonPressed
(String name, ResourceLocation texture) carpet
(String name, ResourceLocation wool) protected void
clear()
crop
(String name, ResourceLocation crop) cross
(String name, ResourceLocation cross) cube
(String name, ResourceLocation down, ResourceLocation up, ResourceLocation north, ResourceLocation south, ResourceLocation east, ResourceLocation west) cubeAll
(String name, ResourceLocation texture) cubeBottomTop
(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) cubeColumn
(String name, ResourceLocation side, ResourceLocation end) cubeColumnHorizontal
(String name, ResourceLocation side, ResourceLocation end) cubeTop
(String name, ResourceLocation side, ResourceLocation top) private T
door
(String name, String model, ResourceLocation bottom, ResourceLocation top) doorBottomLeft
(String name, ResourceLocation bottom, ResourceLocation top) doorBottomRight
(String name, ResourceLocation bottom, ResourceLocation top) doorTopLeft
(String name, ResourceLocation bottom, ResourceLocation top) doorTopRight
(String name, ResourceLocation bottom, ResourceLocation top) private ResourceLocation
fenceGate
(String name, ResourceLocation texture) fenceGateOpen
(String name, ResourceLocation texture) fenceGateWall
(String name, ResourceLocation texture) fenceGateWallOpen
(String name, ResourceLocation texture) fenceInventory
(String name, ResourceLocation texture) fencePost
(String name, ResourceLocation texture) fenceSide
(String name, ResourceLocation texture) protected void
generateAll
(HashCache cache) getBuilder
(String path) private Path
nested()
Gets a model builder that's not directly saved to disk.orientable
(String name, ResourceLocation side, ResourceLocation front, ResourceLocation top) orientableVertical
(String name, ResourceLocation side, ResourceLocation front) orientableWithBottom
(String name, ResourceLocation side, ResourceLocation front, ResourceLocation bottom, ResourceLocation top) private T
pane
(String name, String parent, ResourceLocation pane, ResourceLocation edge) paneNoSide
(String name, ResourceLocation pane) paneNoSideAlt
(String name, ResourceLocation pane) panePost
(String name, ResourceLocation pane, ResourceLocation edge) paneSide
(String name, ResourceLocation pane, ResourceLocation edge) paneSideAlt
(String name, ResourceLocation pane, ResourceLocation edge) pressurePlate
(String name, ResourceLocation texture) pressurePlateDown
(String name, ResourceLocation texture) protected abstract void
void
private T
sideBottomTop
(String name, String parent, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) sign
(String name, ResourceLocation texture) private T
singleTexture
(String name, String parent, String textureKey, ResourceLocation texture) private T
singleTexture
(String name, String parent, ResourceLocation texture) singleTexture
(String name, ResourceLocation parent, String textureKey, ResourceLocation texture) singleTexture
(String name, ResourceLocation parent, ResourceLocation texture) slab
(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) slabTop
(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) stairs
(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) stairsInner
(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) stairsOuter
(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) torch
(String name, ResourceLocation torch) torchWall
(String name, ResourceLocation torch) trapdoorBottom
(String name, ResourceLocation texture) trapdoorOpen
(String name, ResourceLocation texture) trapdoorOrientableBottom
(String name, ResourceLocation texture) trapdoorOrientableOpen
(String name, ResourceLocation texture) trapdoorOrientableTop
(String name, ResourceLocation texture) trapdoorTop
(String name, ResourceLocation texture) wallInventory
(String name, ResourceLocation wall) wallPost
(String name, ResourceLocation wall) wallSide
(String name, ResourceLocation wall) wallSideTall
(String name, ResourceLocation wall) withExistingParent
(String name, String parent) withExistingParent
(String name, ResourceLocation parent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.data.DataProvider
getName
-
Field Details
-
BLOCK_FOLDER
- See Also:
-
ITEM_FOLDER
- See Also:
-
TEXTURE
-
MODEL
-
MODEL_WITH_EXTENSION
-
GSON
private static final com.google.gson.Gson GSON -
generator
-
modid
-
folder
-
factory
-
generatedModels
-
existingFileHelper
-
-
Constructor Details
-
ModelProvider
public ModelProvider(DataGenerator generator, String modid, String folder, Function<ResourceLocation, T> factory, ExistingFileHelper existingFileHelper) -
ModelProvider
public ModelProvider(DataGenerator generator, String modid, String folder, BiFunction<ResourceLocation, ExistingFileHelper, T> builderFromModId, ExistingFileHelper existingFileHelper)
-
-
Method Details
-
registerModels
protected abstract void registerModels() -
getBuilder
-
extendWithFolder
-
modLoc
-
mcLoc
-
withExistingParent
-
withExistingParent
-
cube
public T cube(String name, ResourceLocation down, ResourceLocation up, ResourceLocation north, ResourceLocation south, ResourceLocation east, ResourceLocation west) -
singleTexture
-
singleTexture
-
singleTexture
-
singleTexture
public T singleTexture(String name, ResourceLocation parent, String textureKey, ResourceLocation texture) -
cubeAll
-
cubeTop
-
sideBottomTop
private T sideBottomTop(String name, String parent, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
cubeBottomTop
public T cubeBottomTop(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
cubeColumn
-
cubeColumnHorizontal
-
orientableVertical
-
orientableWithBottom
public T orientableWithBottom(String name, ResourceLocation side, ResourceLocation front, ResourceLocation bottom, ResourceLocation top) -
orientable
public T orientable(String name, ResourceLocation side, ResourceLocation front, ResourceLocation top) -
crop
-
cross
-
stairs
-
stairsOuter
public T stairsOuter(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
stairsInner
public T stairsInner(String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
slab
-
slabTop
-
button
-
buttonPressed
-
buttonInventory
-
pressurePlate
-
pressurePlateDown
-
sign
-
fencePost
-
fenceSide
-
fenceInventory
-
fenceGate
-
fenceGateOpen
-
fenceGateWall
-
fenceGateWallOpen
-
wallPost
-
wallSide
-
wallSideTall
-
wallInventory
-
pane
-
panePost
-
paneSide
-
paneSideAlt
-
paneNoSide
-
paneNoSideAlt
-
door
-
doorBottomLeft
-
doorBottomRight
-
doorTopLeft
-
doorTopRight
-
trapdoorBottom
-
trapdoorTop
-
trapdoorOpen
-
trapdoorOrientableBottom
-
trapdoorOrientableTop
-
trapdoorOrientableOpen
-
torch
-
torchWall
-
carpet
-
nested
Gets 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:
run
in interfaceDataProvider
- Throws:
IOException
-
generateAll
-
getPath
-