java.lang.Object
net.ixdarklord.coolcatcore.api.client.registry.ExtraModels

public final class ExtraModels extends Object
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 Type
    Method
    Description
    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.
    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.
    static void
    register(net.minecraft.resources.ResourceLocation model)
    A model under assets/<namespace>/models/<path>.json to bake.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static void register(net.minecraft.resources.ResourceLocation model)
      A model under assets/<namespace>/models/<path>.json to 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.