Class ObjModels

java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.model.ObjModels

public final class ObjModels extends Object
.obj models as resources. A model is any file under assets/, named by its whole path: ObjModels.get(Identifier.fromNamespaceAndPath("mymod", "models/obj/crystal.obj")) reads assets/mymod/models/obj/crystal.obj. It is read the first time it is asked for, kept, and read again after resource packs reload, so a resource pack can replace it; ask each frame and do not keep the result.

A file that is missing or cannot be read is logged once and gives ObjModel.EMPTY, which draws nothing.

  • Method Details

    • get

      public static ObjModel get(net.minecraft.resources.Identifier file)
      The model at this path under assets/<namespace>/; never null. Client thread only.