public final class ModelLoader extends ModelBakery
| Modifier and Type | Class and Description |
|---|---|
protected class |
ModelLoader.BakedModelCacheKey |
protected static class |
ModelLoader.VanillaLoader |
protected static class |
ModelLoader.VariantLoader |
static class |
ModelLoader.White
16x16 pure white sprite.
|
bakedRegistry, blockModelShapes, LOCATIONS_BUILTIN_TEXTURES, MODEL_ENTITY, MODEL_GENERATED, MODEL_MISSING, resourceManager, sprites, textureMap| Constructor and Description |
|---|
ModelLoader(IResourceManager manager,
TextureMap map,
BlockModelShapes shapes) |
| Modifier and Type | Method and Description |
|---|---|
static <any> |
defaultTextureGetter()
Get the default texture getter the models will be baked with.
|
static ModelResourceLocation |
getInventoryVariant(java.lang.String s)
Hooked from ModelBakery, allows using MRLs that don't end with "inventory" for items.
|
protected IModel |
getMissingModel() |
protected ModelBlockDefinition |
getModelBlockDefinition(ResourceLocation location) |
protected ResourceLocation |
getModelLocation(ResourceLocation model) |
boolean |
isLoading() |
protected void |
loadBlocks() |
protected void |
loadItemModels() |
protected void |
loadMultipartVariantModels() |
protected void |
loadVariantModels() |
void |
onPostBakeEvent(IRegistry<ModelResourceLocation,IBakedModel> modelRegistry)
Internal, do not use.
|
static void |
onRegisterAllBlocks(BlockModelShapes shapes)
Internal, do not use.
|
static void |
onRegisterItems(ItemModelMesher mesher)
Internal, do not use.
|
protected void |
registerMultipartVariant(ModelBlockDefinition definition,
java.util.Collection<ModelResourceLocation> locations) |
protected void |
registerVariant(ModelBlockDefinition definition,
ModelResourceLocation location) |
static void |
setBucketModelDefinition(Item item)
Helper method for registering all itemstacks for given item to map to universal bucket model.
|
static void |
setCustomMeshDefinition(Item item,
ItemMeshDefinition meshDefinition)
Adds generic ItemStack -> model variant logic.
|
static void |
setCustomModelResourceLocation(Item item,
int metadata,
ModelResourceLocation model)
Adds a simple mapping from Item + metadata to the model variant.
|
static void |
setCustomStateMapper(Block block,
IStateMapper mapper)
Adds a custom IBlockState -> model variant logic.
|
IRegistry<ModelResourceLocation,IBakedModel> |
setupModelRegistry() |
bakeModel, getItemLocation, getTextureLocations, getVariantNames, hasItemModel, isCustomRenderer, loadBlock, loadModel, loadVariantItemModels, loadVariantList, makeBakedQuad, makeItemModel, registerItemVariants, registerVariantNamespublic ModelLoader(IResourceManager manager, TextureMap map, BlockModelShapes shapes)
public boolean isLoading()
public IRegistry<ModelResourceLocation,IBakedModel> setupModelRegistry()
setupModelRegistry in class ModelBakeryprotected void loadVariantModels()
loadVariantModels in class ModelBakeryprotected void loadMultipartVariantModels()
loadMultipartVariantModels in class ModelBakeryprotected void loadBlocks()
loadBlocks in class ModelBakeryprotected void registerVariant(ModelBlockDefinition definition, ModelResourceLocation location)
registerVariant in class ModelBakeryprotected void registerMultipartVariant(ModelBlockDefinition definition, java.util.Collection<ModelResourceLocation> locations)
registerMultipartVariant in class ModelBakeryprotected ModelBlockDefinition getModelBlockDefinition(ResourceLocation location)
getModelBlockDefinition in class ModelBakeryprotected void loadItemModels()
loadItemModels in class ModelBakerypublic static ModelResourceLocation getInventoryVariant(java.lang.String s)
protected ResourceLocation getModelLocation(ResourceLocation model)
getModelLocation in class ModelBakeryprotected IModel getMissingModel()
public void onPostBakeEvent(IRegistry<ModelResourceLocation,IBakedModel> modelRegistry)
public static void setCustomStateMapper(Block block, IStateMapper mapper)
public static void onRegisterAllBlocks(BlockModelShapes shapes)
public static void setCustomModelResourceLocation(Item item, int metadata, ModelResourceLocation model)
public static void setCustomMeshDefinition(Item item, ItemMeshDefinition meshDefinition)
public static void setBucketModelDefinition(Item item)
public static void onRegisterItems(ItemModelMesher mesher)
public static <any> defaultTextureGetter()