public class ModelManager extends ReloadListener<ModelBakery> implements java.lang.AutoCloseable
IFutureReloadListener.IStage
Modifier and Type | Field and Description |
---|---|
private SpriteMap |
atlases |
private BlockColors |
blockColors |
private IBakedModel |
defaultModel |
private int |
maxMipmapLevel |
private BlockModelShapes |
modelProvider |
private java.util.Map<ResourceLocation,IBakedModel> |
modelRegistry |
private it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> |
stateModelIds |
private TextureManager |
textureManager |
Constructor and Description |
---|
ModelManager(TextureManager textureManagerIn,
BlockColors blockColorsIn,
int maxMipmapLevelIn) |
Modifier and Type | Method and Description |
---|---|
protected void |
apply(ModelBakery objectIn,
IResourceManager resourceManagerIn,
IProfiler profilerIn) |
void |
close() |
AtlasTexture |
getAtlasTexture(ResourceLocation locationIn) |
BlockModelShapes |
getBlockModelShapes() |
IBakedModel |
getMissingModel() |
IBakedModel |
getModel(ModelResourceLocation modelLocation) |
IBakedModel |
getModel(ResourceLocation modelLocation) |
IResourceType |
getResourceType() |
boolean |
needsRenderUpdate(BlockState oldState,
BlockState newState) |
protected ModelBakery |
prepare(IResourceManager resourceManagerIn,
IProfiler profilerIn) |
void |
setMaxMipmapLevel(int levelIn) |
reload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
func_225594_i_
private java.util.Map<ResourceLocation,IBakedModel> modelRegistry
private SpriteMap atlases
private final BlockModelShapes modelProvider
private final TextureManager textureManager
private final BlockColors blockColors
private int maxMipmapLevel
private IBakedModel defaultModel
private it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> stateModelIds
public ModelManager(TextureManager textureManagerIn, BlockColors blockColorsIn, int maxMipmapLevelIn)
public IBakedModel getModel(ResourceLocation modelLocation)
public IBakedModel getModel(ModelResourceLocation modelLocation)
public IBakedModel getMissingModel()
public BlockModelShapes getBlockModelShapes()
protected ModelBakery prepare(IResourceManager resourceManagerIn, IProfiler profilerIn)
prepare
in class ReloadListener<ModelBakery>
protected void apply(ModelBakery objectIn, IResourceManager resourceManagerIn, IProfiler profilerIn)
apply
in class ReloadListener<ModelBakery>
public boolean needsRenderUpdate(BlockState oldState, BlockState newState)
public AtlasTexture getAtlasTexture(ResourceLocation locationIn)
public void close()
close
in interface java.lang.AutoCloseable
public void setMaxMipmapLevel(int levelIn)
public IResourceType getResourceType()