Class ObjLoader
java.lang.Object
net.neoforged.neoforge.client.model.obj.ObjLoader
- All Implemented Interfaces:
PreparableReloadListener,ResourceManagerReloadListener,IGeometryLoader<ObjModel>
public class ObjLoader
extends Object
implements IGeometryLoader<ObjModel>, ResourceManagerReloadListener
A loader for
OBJ models.
Allows the user to enable automatic face culling, toggle quad shading, flip UVs, render emissively and specify a
material library override.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ObjLoaderprivate final ResourceManagerprivate final Map<ResourceLocation, ObjMaterialLibrary> private final Map<ObjModel.ModelSettings, ObjModel> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadMaterialLibrary(ResourceLocation materialLocation) loadModel(ObjModel.ModelSettings settings) voidonResourceManagerReload(ResourceManager resourceManager) read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getNameMethods inherited from interface net.minecraft.server.packs.resources.ResourceManagerReloadListener
reload
-
Field Details
-
INSTANCE
-
modelCache
-
materialCache
-
manager
-
-
Constructor Details
-
ObjLoader
public ObjLoader()
-
-
Method Details
-
onResourceManagerReload
- Specified by:
onResourceManagerReloadin interfaceResourceManagerReloadListener
-
read
public ObjModel read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext) - Specified by:
readin interfaceIGeometryLoader<ObjModel>
-
loadModel
-
loadMaterialLibrary
-