Package net.minecraft.client.data.models
Class ModelProvider
java.lang.Object
net.minecraft.client.data.models.ModelProvider
- All Implemented Interfaces:
DataProvider,IModelProviderExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static classNested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PackOutput.PathProviderprivate final PackOutput.PathProviderprivate final PackOutput.PathProviderfinal StringFields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionModelProvider(PackOutput pOutput) Deprecated.ModelProvider(PackOutput pOutput, String modId) -
Method Summary
Modifier and TypeMethodDescriptiongetName()protected voidregisterModels(BlockModelGenerators blockModels, ItemModelGenerators itemModels) run(CachedOutput p_387857_) (package private) static <T> CompletableFuture<?> saveAll(CachedOutput pOutput, Function<T, Path> pPathGetter, Map<T, ? extends Supplier<JsonElement>> pEntries) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 astreamcontaining allblockswhich must have their models/block states generated oremptyif none are desired.When using providers for specific
blockusages, it is best to override this method returning the exactblockswhich must be generated, oremptyif generating onlyitemmodels.Default implementation generates models for
blocksmatching the givenmodId.- See Also:
-
getKnownItems
Returns astreamcontaining allitemswhich must have their models/client items generated oremptyif none are desired.When using providers for specific
itemusages, it is best to override this method returning the exactitemswhich must be generated, oremptyif generating onlyblockmodels (which have no respectiveitem).Default implementation generates models for
itemsmatching the givenmodId.- See Also:
-
run
- Specified by:
runin interfaceDataProvider
-
saveAll
static <T> CompletableFuture<?> saveAll(CachedOutput pOutput, Function<T, Path> pPathGetter, Map<T, ? extends Supplier<JsonElement>> pEntries) -
getName
- Specified by:
getNamein interfaceDataProvider
-