Class ExtraModels
java.lang.Object
net.ixdarklord.coolcatcore.api.client.registry.ExtraModels
Models baked with the game's though no item or block uses them, for drawing in code (an item renderer's parts, say).
Register while the client initialises; get them once the game's models are loaded.
ExtraModels.register(MyMod.id("item/orb_glow"));
BakedModel glow = ExtraModels.get(MyMod.id("item/orb_glow"));
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.client.resources.model.BakedModelget(net.minecraft.resources.ResourceLocation model) The baked model, or the missing model if it wasn't registered or failed to load.static voidregister(Function<net.minecraft.server.packs.resources.ResourceManager, Collection<net.minecraft.resources.ResourceLocation>> provider) Models found in the resources as they load (named in a mod's own data files, say): the provider is asked at every load, with the resources being loaded.static voidregister(net.minecraft.resources.ResourceLocation model) A model underassets/<namespace>/models/<path>.jsonto bake.
-
Method Details
-
register
public static void register(net.minecraft.resources.ResourceLocation model) A model underassets/<namespace>/models/<path>.jsonto bake. -
register
public static void register(Function<net.minecraft.server.packs.resources.ResourceManager, Collection<net.minecraft.resources.ResourceLocation>> provider) Models found in the resources as they load (named in a mod's own data files, say): the provider is asked at every load, with the resources being loaded. -
get
public static net.minecraft.client.resources.model.BakedModel get(net.minecraft.resources.ResourceLocation model) The baked model, or the missing model if it wasn't registered or failed to load.
-