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 AtlasSet
private Map
<ModelResourceLocation, BakedModel> private final BlockColors
private final BlockModelShaper
private static final org.slf4j.Logger
private int
private BakedModel
private ModelBakery
private 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 void
apply
(ModelManager.ReloadState reloadState, ProfilerFiller profiler) void
close()
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.ReloadState
loadModels
(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) boolean
requiresRender
(BlockState oldState, BlockState newState) void
updateMaxMipLevel
(int level) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
reload
in 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:
close
in interfaceAutoCloseable
-
updateMaxMipLevel
public void updateMaxMipLevel(int level) -
getModelBakery
-