Class ModelBakery
- java.lang.Object
-
- net.minecraft.client.renderer.model.ModelBakery
-
- Direct Known Subclasses:
ModelLoader
public class ModelBakery extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ModelBakery.BlockStateDefinitionException
(package private) static class
ModelBakery.ModelListWrapper
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
ModelBakery(IResourceManager p_i226056_1_, BlockColors p_i226056_2_, boolean vanillaBakery)
ModelBakery(IResourceManager p_i226056_1_, BlockColors p_i226056_2_, IProfiler p_i226056_3_, int p_i226056_4_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private void
addModelToCache(ResourceLocation p_217843_1_)
IBakedModel
bake(ResourceLocation p_217845_1_, IModelTransform p_217845_2_)
Deprecated.private void
cacheAndQueueDependencies(ResourceLocation p_209593_1_, IUnbakedModel p_209593_2_)
IBakedModel
getBakedModel(ResourceLocation p_217845_1_, IModelTransform p_217845_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> textureGetter)
java.util.Map<ResourceLocation,IBakedModel>
getBakedTopLevelModels()
IUnbakedModel
getModel(ResourceLocation p_209597_1_)
it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState>
getModelGroups()
java.util.Set<ResourceLocation>
getSpecialModels()
SpriteMap
getSpriteMap()
(package private) static <T extends java.lang.Comparable<T>>
TgetValueHelper(Property<T> p_209592_0_, java.lang.String p_209592_1_)
protected BlockModel
loadBlockModel(ResourceLocation p_177594_1_)
private void
loadModel(ResourceLocation p_209598_1_)
private void
loadTopLevel(ModelResourceLocation p_217843_1_)
private static java.util.function.Predicate<BlockState>
predicate(StateContainer<Block,BlockState> p_209605_0_, java.lang.String p_209605_1_)
protected void
processLoading(IProfiler p_i226056_3_, int p_i226056_4_)
private void
registerModelGroup(java.lang.Iterable<BlockState> p_225352_1_)
SpriteMap
uploadTextures(TextureManager p_229333_1_, IProfiler p_229333_2_)
-
-
-
Field Detail
-
FIRE_0
public static final RenderMaterial FIRE_0
-
FIRE_1
public static final RenderMaterial FIRE_1
-
LAVA_FLOW
public static final RenderMaterial LAVA_FLOW
-
WATER_FLOW
public static final RenderMaterial WATER_FLOW
-
WATER_OVERLAY
public static final RenderMaterial WATER_OVERLAY
-
BANNER_BASE
public static final RenderMaterial BANNER_BASE
-
SHIELD_BASE
public static final RenderMaterial SHIELD_BASE
-
NO_PATTERN_SHIELD
public static final RenderMaterial NO_PATTERN_SHIELD
-
DESTROY_STAGES
public static final java.util.List<ResourceLocation> DESTROY_STAGES
-
BREAKING_LOCATIONS
public static final java.util.List<ResourceLocation> BREAKING_LOCATIONS
-
DESTROY_TYPES
public static final java.util.List<RenderType> DESTROY_TYPES
-
UNREFERENCED_TEXTURES
protected static final java.util.Set<RenderMaterial> UNREFERENCED_TEXTURES
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
MISSING_MODEL_LOCATION
public static final ModelResourceLocation MISSING_MODEL_LOCATION
-
MISSING_MODEL_LOCATION_STRING
private static final java.lang.String MISSING_MODEL_LOCATION_STRING
-
MISSING_MODEL_MESH
public static final java.lang.String MISSING_MODEL_MESH
-
BUILTIN_MODELS
private static final java.util.Map<java.lang.String,java.lang.String> BUILTIN_MODELS
-
COMMA_SPLITTER
private static final com.google.common.base.Splitter COMMA_SPLITTER
-
EQUAL_SPLITTER
private static final com.google.common.base.Splitter EQUAL_SPLITTER
-
GENERATION_MARKER
public static final BlockModel GENERATION_MARKER
-
BLOCK_ENTITY_MARKER
public static final BlockModel BLOCK_ENTITY_MARKER
-
ITEM_FRAME_FAKE_DEFINITION
private static final StateContainer<Block,BlockState> ITEM_FRAME_FAKE_DEFINITION
-
ITEM_MODEL_GENERATOR
private static final ItemModelGenerator ITEM_MODEL_GENERATOR
-
STATIC_DEFINITIONS
private static final java.util.Map<ResourceLocation,StateContainer<Block,BlockState>> STATIC_DEFINITIONS
-
resourceManager
protected final IResourceManager resourceManager
-
atlasSet
@Nullable private SpriteMap atlasSet
-
blockColors
private final BlockColors blockColors
-
loadingStack
private final java.util.Set<ResourceLocation> loadingStack
-
context
private final BlockModelDefinition.ContainerHolder context
-
unbakedCache
private final java.util.Map<ResourceLocation,IUnbakedModel> unbakedCache
-
bakedCache
private final java.util.Map<org.apache.commons.lang3.tuple.Triple<ResourceLocation,TransformationMatrix,java.lang.Boolean>,IBakedModel> bakedCache
-
topLevelModels
private final java.util.Map<ResourceLocation,IUnbakedModel> topLevelModels
-
bakedTopLevelModels
private final java.util.Map<ResourceLocation,IBakedModel> bakedTopLevelModels
-
atlasPreparations
private java.util.Map<ResourceLocation,com.mojang.datafixers.util.Pair<AtlasTexture,AtlasTexture.SheetData>> atlasPreparations
-
nextModelGroup
private int nextModelGroup
-
modelGroups
private final it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> modelGroups
-
-
Constructor Detail
-
ModelBakery
public ModelBakery(IResourceManager p_i226056_1_, BlockColors p_i226056_2_, IProfiler p_i226056_3_, int p_i226056_4_)
-
ModelBakery
protected ModelBakery(IResourceManager p_i226056_1_, BlockColors p_i226056_2_, boolean vanillaBakery)
-
-
Method Detail
-
processLoading
protected void processLoading(IProfiler p_i226056_3_, int p_i226056_4_)
-
uploadTextures
public SpriteMap uploadTextures(TextureManager p_229333_1_, IProfiler p_229333_2_)
-
predicate
private static java.util.function.Predicate<BlockState> predicate(StateContainer<Block,BlockState> p_209605_0_, java.lang.String p_209605_1_)
-
getValueHelper
@Nullable static <T extends java.lang.Comparable<T>> T getValueHelper(Property<T> p_209592_0_, java.lang.String p_209592_1_)
-
getModel
public IUnbakedModel getModel(ResourceLocation p_209597_1_)
-
loadModel
private void loadModel(ResourceLocation p_209598_1_) throws java.lang.Exception
- Throws:
java.lang.Exception
-
cacheAndQueueDependencies
private void cacheAndQueueDependencies(ResourceLocation p_209593_1_, IUnbakedModel p_209593_2_)
-
addModelToCache
private void addModelToCache(ResourceLocation p_217843_1_)
-
loadTopLevel
private void loadTopLevel(ModelResourceLocation p_217843_1_)
-
registerModelGroup
private void registerModelGroup(java.lang.Iterable<BlockState> p_225352_1_)
-
bake
@Nullable @Deprecated public IBakedModel bake(ResourceLocation p_217845_1_, IModelTransform p_217845_2_)
Deprecated.
-
getBakedModel
@Nullable public IBakedModel getBakedModel(ResourceLocation p_217845_1_, IModelTransform p_217845_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> textureGetter)
-
loadBlockModel
protected BlockModel loadBlockModel(ResourceLocation p_177594_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
getBakedTopLevelModels
public java.util.Map<ResourceLocation,IBakedModel> getBakedTopLevelModels()
-
getModelGroups
public it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> getModelGroups()
-
getSpecialModels
public java.util.Set<ResourceLocation> getSpecialModels()
-
getSpriteMap
public SpriteMap getSpriteMap()
-
-