Class ModelManager
java.lang.Object
net.minecraft.client.resources.model.ModelManager
- All Implemented Interfaces:
AutoCloseable,PreparableReloadListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtlasSetprivate Map<ModelResourceLocation, BakedModel> private final BlockColorsprivate final BlockModelShaperprivate static final org.slf4j.Loggerprivate intprivate BakedModelprivate ModelBakeryprivate it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> private static final Map<ResourceLocation, ResourceLocation> -
Constructor Summary
ConstructorsConstructorDescriptionModelManager(TextureManager textureManager, BlockColors blockColors, int maxMipmapLevels) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapply(ModelManager.ReloadState reloadState, ProfilerFiller profiler) voidclose()getAtlas(ResourceLocation location) getModel(ModelResourceLocation modelLocation) private static CompletableFuture<Map<ResourceLocation, BlockModel>> loadBlockModels(ResourceManager resourceManager, Executor executor) private static CompletableFuture<Map<ResourceLocation, List<BlockStateModelLoader.LoadedJson>>> loadBlockStates(ResourceManager resourceManager, Executor executor) private ModelManager.ReloadStateloadModels(ProfilerFiller profilerFiller, Map<ResourceLocation, AtlasSet.StitchResult> atlasPreparations, ModelBakery modelBakery) final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) booleanrequiresRender(BlockState oldState, BlockState newState) voidupdateMaxMipLevel(int level) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
VANILLA_ATLASES
-
bakedRegistry
-
atlases
-
blockModelShaper
-
blockColors
-
maxMipmapLevels
private int maxMipmapLevels -
missingModel
-
modelGroups
-
modelBakery
-
-
Constructor Details
-
ModelManager
-
-
Method Details
-
getModel
-
getMissingModel
-
getBlockModelShaper
-
reload
public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) - Specified by:
reloadin interfacePreparableReloadListener
-
loadBlockModels
private static CompletableFuture<Map<ResourceLocation,BlockModel>> loadBlockModels(ResourceManager resourceManager, Executor executor) -
loadBlockStates
private static CompletableFuture<Map<ResourceLocation,List<BlockStateModelLoader.LoadedJson>>> loadBlockStates(ResourceManager resourceManager, Executor executor) -
loadModels
private ModelManager.ReloadState loadModels(ProfilerFiller profilerFiller, Map<ResourceLocation, AtlasSet.StitchResult> atlasPreparations, ModelBakery modelBakery) -
apply
-
requiresRender
-
getAtlas
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
updateMaxMipLevel
public void updateMaxMipLevel(int level) -
getModelBakery
-