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 gri
  • Field Details

    • LOGGER

      private static final Logger 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 Lgri;a:Lorg/slf4j/Logger;
    • LAYERS_TO_LOADERS

      private static final Map<Identifier,Identifier> 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 b Lgri;b:Ljava/util/Map;
    • models

      private Map<Identifier,BakedModel> models
      Mappings:
      Namespace Name Mixin selector
      named models Lnet/minecraft/client/render/model/BakedModelManager;models:Ljava/util/Map;
      intermediary field_5408 Lnet/minecraft/class_1092;field_5408:Ljava/util/Map;
      official c Lgri;c:Ljava/util/Map;
    • atlasManager

      private final SpriteAtlasManager 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 d Lgri;d:Lgrb;
    • blockModelCache

      private final BlockModels 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 e Lgri;e:Lgej;
    • colorMap

      private final BlockColors 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 f Lgri;f:Lfgk;
    • 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 g Lgri;g:I
    • missingModel

      private BakedModel missingModel
      Mappings:
      Namespace Name Mixin selector
      named missingModel Lnet/minecraft/client/render/model/BakedModelManager;missingModel:Lnet/minecraft/client/render/model/BakedModel;
      intermediary field_5407 Lnet/minecraft/class_1092;field_5407:Lnet/minecraft/class_1087;
      official h Lgri;h:Lgrc;
    • stateLookup

      private Object2IntMap<BlockState> stateLookup
      Mappings:
      Namespace Name Mixin selector
      named stateLookup Lnet/minecraft/client/render/model/BakedModelManager;stateLookup:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      intermediary field_20278 Lnet/minecraft/class_1092;field_20278:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      official i Lgri;i:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
  • Constructor Details

    • BakedModelManager

      public BakedModelManager(TextureManager textureManager, BlockColors colorMap, int mipmap)
      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> Lgri;<init>(Lgpc;Lfgk;I)V
  • Method Details

    • getModel

      public BakedModel getModel(ModelIdentifier id)
      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 Lgri;a(Lgrj;)Lgrc;
    • getMissingModel

      public BakedModel getMissingModel()
      Mappings:
      Namespace Name Mixin selector
      named getMissingModel Lnet/minecraft/client/render/model/BakedModelManager;getMissingModel()Lnet/minecraft/client/render/model/BakedModel;
      intermediary method_4744 Lnet/minecraft/class_1092;method_4744()Lnet/minecraft/class_1087;
      official a Lgri;a()Lgrc;
    • getBlockModels

      public BlockModels 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 Lgri;b()Lgej;
    • 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 of thenAcceptAsync.

      Specified by:
      reload in interface ResourceReloader
      Parameters:
      synchronizer - the synchronizer
      manager - the resource manager
      prepareProfiler - the profiler for prepare stage
      applyProfiler - the profiler for apply stage
      prepareExecutor - the executor for prepare stage
      applyExecutor - the executor for apply stage
      Returns:
      a future for the reload
      See Also:
      • invalid reference
        ReloadableResourceManagerImpl#reload(Executor, Executor, CompletableFuture, List)
      Mappings:
      Namespace Name Mixin selector
      named reload Lnet/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_25931 Lnet/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 a Lauj;a(Lauj$a;Laup;Lbnk;Lbnk;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 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 Lgri;a(Laup;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
    • reloadBlockStates

      private static CompletableFuture<Map<Identifier,List<ModelLoader.SourceTrackedData>>> reloadBlockStates(ResourceManager resourceManager, Executor executor)
      Mappings:
      Namespace Name Mixin selector
      named reloadBlockStates Lnet/minecraft/client/render/model/BakedModelManager;reloadBlockStates(Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_45896 Lnet/minecraft/class_1092;method_45896(Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      official b Lgri;b(Laup;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
    • bake

      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/ModelLoader;)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;)Lnet/minecraft/class_1092$class_7779;
      official a Lgri;a(Lbnk;Ljava/util/Map;Lgrh;)Lgri$a;
    • upload

      private void upload(BakedModelManager.BakingResult bakingResult, Profiler profiler)
      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 Lgri;a(Lgri$a;Lbnk;)V
    • shouldRerender

      public boolean shouldRerender(BlockState from, BlockState to)
      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 Lgri;a(Ldse;Ldse;)Z
    • getAtlas

      public SpriteAtlasTexture getAtlas(Identifier id)
      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 a Lgri;a(Lalf;)Lgpa;
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • 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 Lgri;a(I)V