Package net.minecraft.client.data.models
Class ModelProvider
java.lang.Object
net.minecraft.client.data.models.ModelProvider
- All Implemented Interfaces:
DataProvider
,IModelProviderExtension
- Direct Known Subclasses:
CustomItemDisplayContextTest.ModelGen
,NewModelLoaderTest.ModelGen
,ScaffoldingTest.ScaffoldingModels
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PackOutput.PathProvider
private final PackOutput.PathProvider
private final PackOutput.PathProvider
final String
Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER
-
Constructor Summary
ConstructorsConstructorDescriptionModelProvider
(PackOutput p_388260_) Deprecated.ModelProvider
(PackOutput p_388260_, String modId) -
Method Summary
Modifier and TypeMethodDescriptiongetName()
protected void
registerModels
(BlockModelGenerators blockModels, ItemModelGenerators itemModels) run
(CachedOutput p_387857_) (package private) static <T> CompletableFuture
<?> saveAll
(CachedOutput p_387084_, Function<T, Path> p_386455_, Map<T, ? extends Supplier<com.google.gson.JsonElement>> p_386585_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.IModelProviderExtension
mcLocation, modLocation
-
Field Details
-
blockStatePathProvider
-
itemInfoPathProvider
-
modelPathProvider
-
modId
-
-
Constructor Details
-
ModelProvider
Deprecated. -
ModelProvider
-
-
Method Details
-
registerModels
-
getKnownBlocks
Returns astream
containing allblocks
which must have their models/block states generated orempty
if none are desired.When using providers for specific
block
usages, it is best to override this method returning the exactblocks
which must be generated, orempty
if generating onlyitem
models.Default implementation generates models for
blocks
matching the givenmodId
.- See Also:
-
getKnownItems
Returns astream
containing allitems
which must have their models/client items generated orempty
if none are desired.When using providers for specific
item
usages, it is best to override this method returning the exactitems
which must be generated, orempty
if generating onlyblock
models (which have no respectiveitem
).Default implementation generates models for
items
matching the givenmodId
.- See Also:
-
run
- Specified by:
run
in interfaceDataProvider
-
saveAll
static <T> CompletableFuture<?> saveAll(CachedOutput p_387084_, Function<T, Path> p_386455_, Map<T, ? extends Supplier<com.google.gson.JsonElement>> p_386585_) -
getName
- Specified by:
getName
in interfaceDataProvider
-