@Environment(value=CLIENT) public class BakedModelManager extends SinglePreparationResourceReloadListener<ModelLoader> implements AutoCloseable
ResourceReloadListener.Synchronizer
Modifier and Type | Field and Description |
---|---|
private SpriteAtlasManager |
atlasManager |
private BlockModels |
blockModelCache |
private BlockColors |
colorMap |
private int |
mipmap |
private BakedModel |
missingModel |
private Map<Identifier,BakedModel> |
models |
private it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> |
stateLookup |
private TextureManager |
textureManager |
Constructor and Description |
---|
BakedModelManager(TextureManager textureManager,
BlockColors colorMap,
int mipmap) |
Modifier and Type | Method and Description |
---|---|
protected void |
apply(ModelLoader modelLoader,
ResourceManager resourceManager,
Profiler profiler) |
void |
close() |
BlockModels |
getBlockModels() |
BakedModel |
getMissingModel() |
BakedModel |
getModel(ModelIdentifier id) |
SpriteAtlasTexture |
method_24153(Identifier identifier) |
protected ModelLoader |
prepare(ResourceManager resourceManager,
Profiler profiler) |
void |
resetMipmapLevels(int int2) |
boolean |
shouldRerender(BlockState from,
BlockState to) |
reload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
private Map<Identifier,BakedModel> models
@Nullable private SpriteAtlasManager atlasManager
private final BlockModels blockModelCache
private final TextureManager textureManager
private final BlockColors colorMap
private int mipmap
private BakedModel missingModel
private it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> stateLookup
public BakedModelManager(TextureManager textureManager, BlockColors colorMap, int mipmap)
public BakedModel getModel(ModelIdentifier id)
public BakedModel getMissingModel()
public BlockModels getBlockModels()
protected ModelLoader prepare(ResourceManager resourceManager, Profiler profiler)
prepare
in class SinglePreparationResourceReloadListener<ModelLoader>
protected void apply(ModelLoader modelLoader, ResourceManager resourceManager, Profiler profiler)
apply
in class SinglePreparationResourceReloadListener<ModelLoader>
public boolean shouldRerender(BlockState from, BlockState to)
public SpriteAtlasTexture method_24153(Identifier identifier)
public void close()
close
in interface AutoCloseable
public void resetMipmapLevels(int int2)