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/BakedModelManager
intermediary net/minecraft/class_1092
official hhh
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpriteAtlasManager
private Map
<ModelIdentifier, BakedModel> private Map
<Identifier, ItemModel> private LoadedBlockEntityModels
private final BlockModels
private final BlockColors
private LoadedEntityModels
private Map
<Identifier, ItemAsset.Properties> private static final Map
<Identifier, Identifier> private static final Logger
private int
private BakedModel
private ItemModel
private Object2IntMap
<BlockState> private static final ResourceFinder
-
Constructor Summary
ConstructorsConstructorDescriptionBakedModelManager
(TextureManager textureManager, BlockColors colorMap, int mipmap) -
Method Summary
Modifier and TypeMethodDescriptionprivate static BakedModelManager.BakingResult
bake
(Profiler profiler, Map<Identifier, SpriteAtlasManager.AtlasPreparation> atlases, ModelBaker baker, Object2IntMap<BlockState> groups, LoadedEntityModels entityModels, LoadedBlockEntityModels blockEntityModels) void
close()
private static ReferencedModelsCollector
collect
(UnbakedModel missingModel, Map<Identifier, UnbakedModel> models, BlockStatesLoader.BlockStateDefinition blockStates, ItemAssetsLoader.Result itemAssets) getAtlas
(Identifier id) private static Object2IntMap
<BlockState> group
(BlockColors colors, BlockStatesLoader.BlockStateDefinition definition) final CompletableFuture
<Void> reload
(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor) Performs a reload.private static CompletableFuture
<Map<Identifier, UnbakedModel>> reloadModels
(ResourceManager resourceManager, Executor executor) void
setMipmapLevels
(int mipmapLevels) boolean
shouldRerender
(BlockState from, BlockState to) private static Map
<BlockState, BakedModel> toStateMap
(Map<ModelIdentifier, BakedModel> blockStateModels, BakedModel missingModel) private void
upload
(BakedModelManager.BakingResult bakingResult, Profiler profiler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/client/render/model/BakedModelManager;LOGGER:Lorg/slf4j/Logger;
intermediary field_40573
Lnet/minecraft/class_1092;field_40573:Lorg/slf4j/Logger;
official a
Lhhh;a:Lorg/slf4j/Logger;
-
MODELS_FINDER
- Mappings:
Namespace Name Mixin selector named MODELS_FINDER
Lnet/minecraft/client/render/model/BakedModelManager;MODELS_FINDER:Lnet/minecraft/resource/ResourceFinder;
intermediary field_53676
Lnet/minecraft/class_1092;field_53676:Lnet/minecraft/class_7654;
official b
Lhhh;b:Lako;
-
LAYERS_TO_LOADERS
- Mappings:
Namespace Name Mixin selector named LAYERS_TO_LOADERS
Lnet/minecraft/client/render/model/BakedModelManager;LAYERS_TO_LOADERS:Ljava/util/Map;
intermediary field_40574
Lnet/minecraft/class_1092;field_40574:Ljava/util/Map;
official c
Lhhh;c:Ljava/util/Map;
-
bakedBlockModels
- Mappings:
Namespace Name Mixin selector named bakedBlockModels
Lnet/minecraft/client/render/model/BakedModelManager;bakedBlockModels:Ljava/util/Map;
intermediary field_55471
Lnet/minecraft/class_1092;field_55471:Ljava/util/Map;
official d
Lhhh;d:Ljava/util/Map;
-
bakedItemModels
- Mappings:
Namespace Name Mixin selector named bakedItemModels
Lnet/minecraft/client/render/model/BakedModelManager;bakedItemModels:Ljava/util/Map;
intermediary field_55472
Lnet/minecraft/class_1092;field_55472:Ljava/util/Map;
official e
Lhhh;e:Ljava/util/Map;
-
itemProperties
- Mappings:
Namespace Name Mixin selector named itemProperties
Lnet/minecraft/client/render/model/BakedModelManager;itemProperties:Ljava/util/Map;
intermediary field_55573
Lnet/minecraft/class_1092;field_55573:Ljava/util/Map;
official f
Lhhh;f:Ljava/util/Map;
-
atlasManager
- Mappings:
Namespace Name Mixin selector named atlasManager
Lnet/minecraft/client/render/model/BakedModelManager;atlasManager:Lnet/minecraft/client/render/model/SpriteAtlasManager;
intermediary field_21775
Lnet/minecraft/class_1092;field_21775:Lnet/minecraft/class_4724;
official g
Lhhh;g:Lhgs;
-
blockModelCache
- Mappings:
Namespace Name Mixin selector named blockModelCache
Lnet/minecraft/client/render/model/BakedModelManager;blockModelCache:Lnet/minecraft/client/render/block/BlockModels;
intermediary field_5410
Lnet/minecraft/class_1092;field_5410:Lnet/minecraft/class_773;
official h
Lhhh;h:Lgnc;
-
colorMap
- Mappings:
Namespace Name Mixin selector named colorMap
Lnet/minecraft/client/render/model/BakedModelManager;colorMap:Lnet/minecraft/client/color/block/BlockColors;
intermediary field_20277
Lnet/minecraft/class_1092;field_20277:Lnet/minecraft/class_324;
official i
Lhhh;i:Lfmm;
-
entityModels
- Mappings:
Namespace Name Mixin selector named entityModels
Lnet/minecraft/client/render/model/BakedModelManager;entityModels:Lnet/minecraft/client/render/entity/model/LoadedEntityModels;
intermediary field_55473
Lnet/minecraft/class_1092;field_55473:Lnet/minecraft/class_5599;
official j
Lhhh;j:Lgfa;
-
blockEntityModels
- Mappings:
Namespace Name Mixin selector named blockEntityModels
Lnet/minecraft/client/render/model/BakedModelManager;blockEntityModels:Lnet/minecraft/client/render/block/entity/LoadedBlockEntityModels;
intermediary field_55474
Lnet/minecraft/class_1092;field_55474:Lnet/minecraft/class_10418;
official k
Lhhh;k:Lgmw;
-
mipmapLevels
private int mipmapLevels- Mappings:
Namespace Name Mixin selector named mipmapLevels
Lnet/minecraft/client/render/model/BakedModelManager;mipmapLevels:I
intermediary field_21777
Lnet/minecraft/class_1092;field_21777:I
official l
Lhhh;l:I
-
missingBlockModel
- Mappings:
Namespace Name Mixin selector named missingBlockModel
Lnet/minecraft/client/render/model/BakedModelManager;missingBlockModel:Lnet/minecraft/client/render/model/BakedModel;
intermediary field_5407
Lnet/minecraft/class_1092;field_5407:Lnet/minecraft/class_1087;
official m
Lhhh;m:Lhgt;
-
missingItemModel
- Mappings:
Namespace Name Mixin selector named missingItemModel
Lnet/minecraft/client/render/model/BakedModelManager;missingItemModel:Lnet/minecraft/client/render/item/model/ItemModel;
intermediary field_55475
Lnet/minecraft/class_1092;field_55475:Lnet/minecraft/class_10439;
official n
Lhhh;n:Lhbm;
-
modelGroups
- Mappings:
Namespace Name Mixin selector named modelGroups
Lnet/minecraft/client/render/model/BakedModelManager;modelGroups:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
intermediary field_55476
Lnet/minecraft/class_1092;field_55476:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
official o
Lhhh;o: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)V
intermediary <init>
Lnet/minecraft/class_1092;<init>(Lnet/minecraft/class_1060;Lnet/minecraft/class_324;I)V
official <init>
Lhhh;<init>(Lhev;Lfmm;I)V
-
-
Method Details
-
getModel
- Mappings:
Namespace Name Mixin selector named getModel
Lnet/minecraft/client/render/model/BakedModelManager;getModel(Lnet/minecraft/client/util/ModelIdentifier;)Lnet/minecraft/client/render/model/BakedModel;
intermediary method_4742
Lnet/minecraft/class_1092;method_4742(Lnet/minecraft/class_1091;)Lnet/minecraft/class_1087;
official a
Lhhh;a(Lhhi;)Lhgt;
-
getMissingBlockModel
- Mappings:
Namespace Name Mixin selector named getMissingBlockModel
Lnet/minecraft/client/render/model/BakedModelManager;getMissingBlockModel()Lnet/minecraft/client/render/model/BakedModel;
intermediary method_4744
Lnet/minecraft/class_1092;method_4744()Lnet/minecraft/class_1087;
official a
Lhhh;a()Lhgt;
-
getItemModel
- Mappings:
Namespace Name Mixin selector named getItemModel
Lnet/minecraft/client/render/model/BakedModelManager;getItemModel(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/item/model/ItemModel;
intermediary method_65746
Lnet/minecraft/class_1092;method_65746(Lnet/minecraft/class_2960;)Lnet/minecraft/class_10439;
official a
Lhhh;a(Lakv;)Lhbm;
-
getItemProperties
- Mappings:
Namespace Name Mixin selector named getItemProperties
Lnet/minecraft/client/render/model/BakedModelManager;getItemProperties(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/item/ItemAsset$Properties;
intermediary method_65934
Lnet/minecraft/class_1092;method_65934(Lnet/minecraft/class_2960;)Lnet/minecraft/class_10434$class_10543;
official b
Lhhh;b(Lakv;)Lhbi$a;
-
getBlockModels
- Mappings:
Namespace Name Mixin selector named getBlockModels
Lnet/minecraft/client/render/model/BakedModelManager;getBlockModels()Lnet/minecraft/client/render/block/BlockModels;
intermediary method_4743
Lnet/minecraft/class_1092;method_4743()Lnet/minecraft/class_773;
official b
Lhhh;b()Lgnc;
-
reload
public final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, 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:
reload
in interfaceResourceReloader
- Parameters:
synchronizer
- the synchronizermanager
- the resource manager- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector named reload
Lnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
intermediary method_25931
Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
official a
Lauj;a(Lauj$a;Laup;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
reloadModels
private static CompletableFuture<Map<Identifier,UnbakedModel>> reloadModels(ResourceManager resourceManager, Executor executor) - Mappings:
Namespace Name Mixin selector named reloadModels
Lnet/minecraft/client/render/model/BakedModelManager;reloadModels(Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
intermediary method_45881
Lnet/minecraft/class_1092;method_45881(Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
official a
Lhhh;a(Laup;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
collect
private static ReferencedModelsCollector collect(UnbakedModel missingModel, Map<Identifier, UnbakedModel> models, BlockStatesLoader.BlockStateDefinition blockStates, ItemAssetsLoader.Result itemAssets) - Mappings:
Namespace Name Mixin selector named collect
Lnet/minecraft/client/render/model/BakedModelManager;collect(Lnet/minecraft/client/render/model/UnbakedModel;Ljava/util/Map;Lnet/minecraft/client/render/model/BlockStatesLoader$BlockStateDefinition;Lnet/minecraft/client/item/ItemAssetsLoader$Result;)Lnet/minecraft/client/render/model/ReferencedModelsCollector;
intermediary method_62657
Lnet/minecraft/class_1092;method_62657(Lnet/minecraft/class_1100;Ljava/util/Map;Lnet/minecraft/class_9824$class_10095;Lnet/minecraft/class_10521$class_10522;)Lnet/minecraft/class_10097;
official a
Lhhh;a(Lhho;Ljava/util/Map;Lhgv$c;Lhgw$a;)Lhhf;
-
bake
private static BakedModelManager.BakingResult bake(Profiler profiler, Map<Identifier, SpriteAtlasManager.AtlasPreparation> atlases, ModelBaker baker, Object2IntMap<BlockState> groups, LoadedEntityModels entityModels, LoadedBlockEntityModels blockEntityModels) - Mappings:
Namespace Name Mixin selector named bake
Lnet/minecraft/client/render/model/BakedModelManager;bake(Lnet/minecraft/util/profiler/Profiler;Ljava/util/Map;Lnet/minecraft/client/render/model/ModelBaker;Lit/unimi/dsi/fastutil/objects/Object2IntMap;Lnet/minecraft/client/render/entity/model/LoadedEntityModels;Lnet/minecraft/client/render/block/entity/LoadedBlockEntityModels;)Lnet/minecraft/client/render/model/BakedModelManager$BakingResult;
intermediary method_45883
Lnet/minecraft/class_1092;method_45883(Lnet/minecraft/class_3695;Ljava/util/Map;Lnet/minecraft/class_1088;Lit/unimi/dsi/fastutil/objects/Object2IntMap;Lnet/minecraft/class_5599;Lnet/minecraft/class_10418;)Lnet/minecraft/class_1092$class_7779;
official a
Lhhh;a(Lbou;Ljava/util/Map;Lhhd;Lit/unimi/dsi/fastutil/objects/Object2IntMap;Lgfa;Lgmw;)Lhhh$a;
-
toStateMap
private static Map<BlockState,BakedModel> toStateMap(Map<ModelIdentifier, BakedModel> blockStateModels, BakedModel missingModel) - Mappings:
Namespace Name Mixin selector named toStateMap
Lnet/minecraft/client/render/model/BakedModelManager;toStateMap(Ljava/util/Map;Lnet/minecraft/client/render/model/BakedModel;)Ljava/util/Map;
intermediary method_65751
Lnet/minecraft/class_1092;method_65751(Ljava/util/Map;Lnet/minecraft/class_1087;)Ljava/util/Map;
official a
Lhhh;a(Ljava/util/Map;Lhgt;)Ljava/util/Map;
-
group
private static Object2IntMap<BlockState> group(BlockColors colors, BlockStatesLoader.BlockStateDefinition definition) - Mappings:
Namespace Name Mixin selector named group
Lnet/minecraft/client/render/model/BakedModelManager;group(Lnet/minecraft/client/color/block/BlockColors;Lnet/minecraft/client/render/model/BlockStatesLoader$BlockStateDefinition;)Lit/unimi/dsi/fastutil/objects/Object2IntMap;
intermediary method_62654
Lnet/minecraft/class_1092;method_62654(Lnet/minecraft/class_324;Lnet/minecraft/class_9824$class_10095;)Lit/unimi/dsi/fastutil/objects/Object2IntMap;
official a
Lhhh;a(Lfmm;Lhgv$c;)Lit/unimi/dsi/fastutil/objects/Object2IntMap;
-
upload
- Mappings:
Namespace Name Mixin selector named upload
Lnet/minecraft/client/render/model/BakedModelManager;upload(Lnet/minecraft/client/render/model/BakedModelManager$BakingResult;Lnet/minecraft/util/profiler/Profiler;)V
intermediary method_18179
Lnet/minecraft/class_1092;method_18179(Lnet/minecraft/class_1092$class_7779;Lnet/minecraft/class_3695;)V
official a
Lhhh;a(Lhhh$a;Lbou;)V
-
shouldRerender
- Mappings:
Namespace Name Mixin selector named shouldRerender
Lnet/minecraft/client/render/model/BakedModelManager;shouldRerender(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;)Z
intermediary method_21611
Lnet/minecraft/class_1092;method_21611(Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;)Z
official a
Lhhh;a(Ldwy;Ldwy;)Z
-
getAtlas
- Mappings:
Namespace Name Mixin selector named getAtlas
Lnet/minecraft/client/render/model/BakedModelManager;getAtlas(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/SpriteAtlasTexture;
intermediary method_24153
Lnet/minecraft/class_1092;method_24153(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1059;
official c
Lhhh;c(Lakv;)Lhes;
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
setMipmapLevels
public void setMipmapLevels(int mipmapLevels) - Mappings:
Namespace Name Mixin selector named setMipmapLevels
Lnet/minecraft/client/render/model/BakedModelManager;setMipmapLevels(I)V
intermediary method_24152
Lnet/minecraft/class_1092;method_24152(I)V
official a
Lhhh;a(I)V
-
getBlockEntityModelsSupplier
- Mappings:
Namespace Name Mixin selector named getBlockEntityModelsSupplier
Lnet/minecraft/client/render/model/BakedModelManager;getBlockEntityModelsSupplier()Ljava/util/function/Supplier;
intermediary method_65756
Lnet/minecraft/class_1092;method_65756()Ljava/util/function/Supplier;
official d
Lhhh;d()Ljava/util/function/Supplier;
-
getEntityModelsSupplier
- Mappings:
Namespace Name Mixin selector named getEntityModelsSupplier
Lnet/minecraft/client/render/model/BakedModelManager;getEntityModelsSupplier()Ljava/util/function/Supplier;
intermediary method_65757
Lnet/minecraft/class_1092;method_65757()Ljava/util/function/Supplier;
official e
Lhhh;e()Ljava/util/function/Supplier;
-