public final class ModelLoader extends ModelBakery
修飾子とタイプ | クラスと説明 |
---|---|
static class |
ModelLoader.ItemLoadingException
16x16 pure white sprite.
|
static class |
ModelLoader.White |
DESTROY_LOCATIONS, DESTROY_RENDER_TYPES, DESTROY_STAGES, LOCATION_BANNER_BASE, LOCATION_FIRE_0, LOCATION_FIRE_1, LOCATION_LAVA_FLOW, LOCATION_SHIELD_BASE, LOCATION_SHIELD_NO_PATTERN, LOCATION_WATER_FLOW, LOCATION_WATER_OVERLAY, LOCATIONS_BUILTIN_TEXTURES, MISSING_MODEL_MESH, MODEL_ENTITY, MODEL_GENERATED, MODEL_MISSING, resourceManager
コンストラクタと説明 |
---|
ModelLoader(IResourceManager manager,
BlockColors colours,
IProfiler profiler,
int p_i226056_4_) |
修飾子とタイプ | メソッドと説明 |
---|---|
static void |
addSpecialModel(ResourceLocation rl)
Indicate to vanilla that it should load and bake the given model, even if no blocks or
items use it.
|
static java.util.function.Function<ResourceLocation,IUnbakedModel> |
defaultModelGetter() |
static java.util.function.Function<Material,TextureAtlasSprite> |
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 IUnbakedModel |
getMissingModel() |
protected ResourceLocation |
getModelLocation(ResourceLocation model) |
IUnbakedModel |
getModelOrLogError(ResourceLocation location,
java.lang.String error)
Use this if you want the model, but need to log the error.
|
IUnbakedModel |
getModelOrMissing(ResourceLocation location)
Use this if you don't care about the exception and want some model anyway.
|
java.util.Set<ResourceLocation> |
getSpecialModels() |
static ModelLoader |
instance() |
boolean |
isLoading() |
void |
onPostBakeEvent(java.util.Map<ResourceLocation,IBakedModel> modelRegistry)
Internal, do not use.
|
bake, getBakedModel, getSpriteMap, getStateModelIds, getTopBakedModels, getUnbakedModel, loadModel, processLoading, uploadTextures
public ModelLoader(IResourceManager manager, BlockColors colours, IProfiler profiler, int p_i226056_4_)
@Nullable public static ModelLoader instance()
public boolean isLoading()
public static void addSpecialModel(ResourceLocation rl)
ModelRegistryEvent
rl
- The model, either ModelResourceLocation
to point to a blockstate variant,
or plain ResourceLocation
to point directly to a json in the models folder.public java.util.Set<ResourceLocation> getSpecialModels()
getSpecialModels
クラス内 ModelBakery
public static ModelResourceLocation getInventoryVariant(java.lang.String s)
protected ResourceLocation getModelLocation(ResourceLocation model)
protected IUnbakedModel getMissingModel()
public IUnbakedModel getModelOrMissing(ResourceLocation location)
public IUnbakedModel getModelOrLogError(ResourceLocation location, java.lang.String error)
public void onPostBakeEvent(java.util.Map<ResourceLocation,IBakedModel> modelRegistry)
public static java.util.function.Function<Material,TextureAtlasSprite> defaultTextureGetter()
public static java.util.function.Function<ResourceLocation,IUnbakedModel> defaultModelGetter()