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 pTextureManager, BlockColors pBlockColors, int pMaxMipmapLevels) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(ModelManager.ReloadState pReloadState, ProfilerFiller pProfiler) void
close()
getAtlas
(ResourceLocation pLocation) getModel
(ModelResourceLocation pModelLocation) private static CompletableFuture
<Map<ResourceLocation, BlockModel>> loadBlockModels
(ResourceManager pResourceManager, Executor pExecutor) private static CompletableFuture
<Map<ResourceLocation, List<BlockStateModelLoader.LoadedJson>>> loadBlockStates
(ResourceManager pResourceManager, Executor pExecutor) private ModelManager.ReloadState
loadModels
(ProfilerFiller pProfilerFiller, Map<ResourceLocation, AtlasSet.StitchResult> pAtlasPreparations, ModelBakery pModelBakery) final CompletableFuture
<Void> reload
(PreparableReloadListener.PreparationBarrier pPreparationBarrier, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) boolean
requiresRender
(BlockState pOldState, BlockState pNewState) void
updateMaxMipLevel
(int pLevel) 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 pPreparationBarrier, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
loadBlockModels
private static CompletableFuture<Map<ResourceLocation,BlockModel>> loadBlockModels(ResourceManager pResourceManager, Executor pExecutor) -
loadBlockStates
private static CompletableFuture<Map<ResourceLocation,List<BlockStateModelLoader.LoadedJson>>> loadBlockStates(ResourceManager pResourceManager, Executor pExecutor) -
loadModels
private ModelManager.ReloadState loadModels(ProfilerFiller pProfilerFiller, Map<ResourceLocation, AtlasSet.StitchResult> pAtlasPreparations, ModelBakery pModelBakery) -
apply
-
requiresRender
-
getAtlas
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
updateMaxMipLevel
public void updateMaxMipLevel(int pLevel) -
getModelBakery
-