Class BakedModelManager
java.lang.Object
net.minecraft.client.render.model.BakedModelManager
- All Implemented Interfaces:
AutoCloseable,ResourceReloader
@Environment(CLIENT)
public class BakedModelManager
extends Object
implements ResourceReloader, AutoCloseable
- Mappings:
Namespace Name named net/minecraft/client/render/model/BakedModelManagerintermediary net/minecraft/class_1092official gst
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpriteAtlasManagerprivate final BlockModelsprivate final BlockColorsprivate static final Map<Identifier, Identifier> private static final Loggerprivate intprivate BakedModelprivate Map<ModelIdentifier, BakedModel> private Object2IntMap<BlockState> -
Constructor Summary
ConstructorsConstructorDescriptionBakedModelManager(TextureManager textureManager, BlockColors colorMap, int mipmap) -
Method Summary
Modifier and TypeMethodDescriptionprivate BakedModelManager.BakingResultbake(Profiler profiler, Map<Identifier, SpriteAtlasManager.AtlasPreparation> preparations, ModelLoader modelLoader) voidclose()getAtlas(Identifier id) final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload.private static CompletableFuture<Map<Identifier, List<BlockStatesLoader.SourceTrackedData>>> reloadBlockStates(ResourceManager resourceManager, Executor executor) private static CompletableFuture<Map<Identifier, JsonUnbakedModel>> reloadModels(ResourceManager resourceManager, Executor executor) voidsetMipmapLevels(int mipmapLevels) booleanshouldRerender(BlockState from, BlockState to) private voidupload(BakedModelManager.BakingResult bakingResult, Profiler profiler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/render/model/BakedModelManager;LOGGER:Lorg/slf4j/Logger;intermediary field_40573Lnet/minecraft/class_1092;field_40573:Lorg/slf4j/Logger;official aLgst;a:Lorg/slf4j/Logger;
-
LAYERS_TO_LOADERS
- Mappings:
Namespace Name Mixin selector named LAYERS_TO_LOADERSLnet/minecraft/client/render/model/BakedModelManager;LAYERS_TO_LOADERS:Ljava/util/Map;intermediary field_40574Lnet/minecraft/class_1092;field_40574:Ljava/util/Map;official bLgst;b:Ljava/util/Map;
-
models
- Mappings:
Namespace Name Mixin selector named modelsLnet/minecraft/client/render/model/BakedModelManager;models:Ljava/util/Map;intermediary field_5408Lnet/minecraft/class_1092;field_5408:Ljava/util/Map;official cLgst;c:Ljava/util/Map;
-
atlasManager
- Mappings:
Namespace Name Mixin selector named atlasManagerLnet/minecraft/client/render/model/BakedModelManager;atlasManager:Lnet/minecraft/client/render/model/SpriteAtlasManager;intermediary field_21775Lnet/minecraft/class_1092;field_21775:Lnet/minecraft/class_4724;official dLgst;d:Lgsl;
-
blockModelCache
- Mappings:
Namespace Name Mixin selector named blockModelCacheLnet/minecraft/client/render/model/BakedModelManager;blockModelCache:Lnet/minecraft/client/render/block/BlockModels;intermediary field_5410Lnet/minecraft/class_1092;field_5410:Lnet/minecraft/class_773;official eLgst;e:Lgfs;
-
colorMap
- Mappings:
Namespace Name Mixin selector named colorMapLnet/minecraft/client/render/model/BakedModelManager;colorMap:Lnet/minecraft/client/color/block/BlockColors;intermediary field_20277Lnet/minecraft/class_1092;field_20277:Lnet/minecraft/class_324;official fLgst;f:Lfhq;
-
mipmapLevels
private int mipmapLevels- Mappings:
Namespace Name Mixin selector named mipmapLevelsLnet/minecraft/client/render/model/BakedModelManager;mipmapLevels:Iintermediary field_21777Lnet/minecraft/class_1092;field_21777:Iofficial gLgst;g:I
-
missingModel
- Mappings:
Namespace Name Mixin selector named missingModelLnet/minecraft/client/render/model/BakedModelManager;missingModel:Lnet/minecraft/client/render/model/BakedModel;intermediary field_5407Lnet/minecraft/class_1092;field_5407:Lnet/minecraft/class_1087;official hLgst;h:Lgsm;
-
stateLookup
- Mappings:
Namespace Name Mixin selector named stateLookupLnet/minecraft/client/render/model/BakedModelManager;stateLookup:Lit/unimi/dsi/fastutil/objects/Object2IntMap;intermediary field_20278Lnet/minecraft/class_1092;field_20278:Lit/unimi/dsi/fastutil/objects/Object2IntMap;official iLgst;i:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
-
-
Constructor Details
-
BakedModelManager
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/render/model/BakedModelManager;<init>(Lnet/minecraft/client/texture/TextureManager;Lnet/minecraft/client/color/block/BlockColors;I)Vintermediary <init>Lnet/minecraft/class_1092;<init>(Lnet/minecraft/class_1060;Lnet/minecraft/class_324;I)Vofficial <init>Lgst;<init>(Lgqm;Lfhq;I)V
-
-
Method Details
-
getModel
- Mappings:
Namespace Name Mixin selector named getModelLnet/minecraft/client/render/model/BakedModelManager;getModel(Lnet/minecraft/client/util/ModelIdentifier;)Lnet/minecraft/client/render/model/BakedModel;intermediary method_4742Lnet/minecraft/class_1092;method_4742(Lnet/minecraft/class_1091;)Lnet/minecraft/class_1087;official aLgst;a(Lgsu;)Lgsm;
-
getMissingModel
- Mappings:
Namespace Name Mixin selector named getMissingModelLnet/minecraft/client/render/model/BakedModelManager;getMissingModel()Lnet/minecraft/client/render/model/BakedModel;intermediary method_4744Lnet/minecraft/class_1092;method_4744()Lnet/minecraft/class_1087;official aLgst;a()Lgsm;
-
getBlockModels
- Mappings:
Namespace Name Mixin selector named getBlockModelsLnet/minecraft/client/render/model/BakedModelManager;getBlockModels()Lnet/minecraft/client/render/block/BlockModels;intermediary method_4743Lnet/minecraft/class_1092;method_4743()Lnet/minecraft/class_773;official bLgst;b()Lgfs;
-
reload
public final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload. Returns a future that is completed when the reload is completed.In a reload, there is a prepare stage and an apply stage. For the prepare stage, you should create completable futures with CompletableFuture.supplyAsync(..., prepareExecutor) to ensure the prepare actions are done with the prepare executor. Then, you should have a completable future for all the prepared actions, and call combinedPrepare.thenCompose(synchronizer::waitFor) to notify the
synchronizer. Finally, you should run CompletableFuture.thenAcceptAsync(..., applyExecutor) for apply actions. In the end, returns the result ofthenAcceptAsync.- Specified by:
reloadin interfaceResourceReloader- Parameters:
synchronizer- the synchronizermanager- the resource managerprepareProfiler- the profiler for prepare stageapplyProfiler- the profiler for apply stageprepareExecutor- the executor for prepare stageapplyExecutor- the executor for apply stage- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector named reloadLnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/util/profiler/Profiler;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_25931Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;official aLaty;a(Laty$a;Laue;Lbnf;Lbnf;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
reloadModels
private static CompletableFuture<Map<Identifier,JsonUnbakedModel>> reloadModels(ResourceManager resourceManager, Executor executor) - Mappings:
Namespace Name Mixin selector named reloadModelsLnet/minecraft/client/render/model/BakedModelManager;reloadModels(Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_45881Lnet/minecraft/class_1092;method_45881(Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;official aLgst;a(Laue;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
reloadBlockStates
private static CompletableFuture<Map<Identifier,List<BlockStatesLoader.SourceTrackedData>>> reloadBlockStates(ResourceManager resourceManager, Executor executor) - Mappings:
Namespace Name Mixin selector named reloadBlockStatesLnet/minecraft/client/render/model/BakedModelManager;reloadBlockStates(Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_45896Lnet/minecraft/class_1092;method_45896(Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;official bLgst;b(Laue;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
bake
private BakedModelManager.BakingResult bake(Profiler profiler, Map<Identifier, SpriteAtlasManager.AtlasPreparation> preparations, ModelLoader modelLoader) - Mappings:
Namespace Name Mixin selector named bakeLnet/minecraft/client/render/model/BakedModelManager;bake(Lnet/minecraft/util/profiler/Profiler;Ljava/util/Map;Lnet/minecraft/client/render/model/ModelLoader;)Lnet/minecraft/client/render/model/BakedModelManager$BakingResult;intermediary method_45883Lnet/minecraft/class_1092;method_45883(Lnet/minecraft/class_3695;Ljava/util/Map;Lnet/minecraft/class_1088;)Lnet/minecraft/class_1092$class_7779;official aLgst;a(Lbnf;Ljava/util/Map;Lgss;)Lgst$a;
-
upload
- Mappings:
Namespace Name Mixin selector named uploadLnet/minecraft/client/render/model/BakedModelManager;upload(Lnet/minecraft/client/render/model/BakedModelManager$BakingResult;Lnet/minecraft/util/profiler/Profiler;)Vintermediary method_18179Lnet/minecraft/class_1092;method_18179(Lnet/minecraft/class_1092$class_7779;Lnet/minecraft/class_3695;)Vofficial aLgst;a(Lgst$a;Lbnf;)V
-
shouldRerender
- Mappings:
Namespace Name Mixin selector named shouldRerenderLnet/minecraft/client/render/model/BakedModelManager;shouldRerender(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;)Zintermediary method_21611Lnet/minecraft/class_1092;method_21611(Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;)Zofficial aLgst;a(Ldtc;Ldtc;)Z
-
getAtlas
- Mappings:
Namespace Name Mixin selector named getAtlasLnet/minecraft/client/render/model/BakedModelManager;getAtlas(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/SpriteAtlasTexture;intermediary method_24153Lnet/minecraft/class_1092;method_24153(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1059;official aLgst;a(Lakr;)Lgqk;
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
setMipmapLevels
public void setMipmapLevels(int mipmapLevels) - Mappings:
Namespace Name Mixin selector named setMipmapLevelsLnet/minecraft/client/render/model/BakedModelManager;setMipmapLevels(I)Vintermediary method_24152Lnet/minecraft/class_1092;method_24152(I)Vofficial aLgst;a(I)V
-