java.lang.Object
de.mrjulsen.mcdragonlib.neoforge.client.model.loaders.ObjLoader
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener, net.minecraft.server.packs.resources.ResourceManagerReloadListener, net.neoforged.neoforge.client.model.geometry.IGeometryLoader<ObjModel>

public class ObjLoader extends Object implements net.neoforged.neoforge.client.model.geometry.IGeometryLoader<ObjModel>, net.minecraft.server.packs.resources.ResourceManagerReloadListener
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static ObjLoader
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    loadMaterialLibrary(net.minecraft.resources.ResourceLocation materialLocation)
    Loads (or returns from cache) a material library at materialLocation.
    Loads (or returns from cache) a plain OBJ model described by settings.
    void
    onResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager)
     
    read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext)
     
    readInternal(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject modelContents)
    Reads the main model JSON and merges any sub-models declared in the "add" array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName

    Methods inherited from interface net.minecraft.server.packs.resources.ResourceManagerReloadListener

    reload
  • Field Details

    • INSTANCE

      public static ObjLoader INSTANCE
  • Constructor Details

    • ObjLoader

      public ObjLoader()
  • Method Details

    • onResourceManagerReload

      public void onResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager)
      Specified by:
      onResourceManagerReload in interface net.minecraft.server.packs.resources.ResourceManagerReloadListener
    • read

      public ObjModel read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext)
      Specified by:
      read in interface net.neoforged.neoforge.client.model.geometry.IGeometryLoader<ObjModel>
    • readInternal

      public ObjModel readInternal(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject modelContents)
      Reads the main model JSON and merges any sub-models declared in the "add" array. This is the single entry point for both the top-level model and recursively referenced JSON sub-models.
    • loadModel

      public ObjModel loadModel(ObjModel.ModelSettings settings)
      Loads (or returns from cache) a plain OBJ model described by settings.
    • loadMaterialLibrary

      public ObjMaterialLibrary loadMaterialLibrary(net.minecraft.resources.ResourceLocation materialLocation)
      Loads (or returns from cache) a material library at materialLocation.