Class ObjLoader
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>
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadMaterialLibrary(net.minecraft.resources.ResourceLocation materialLocation) Loads (or returns from cache) a material library atmaterialLocation.loadModel(ObjModel.ModelSettings settings) Loads (or returns from cache) a plain OBJ model described bysettings.voidonResourceManagerReload(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, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getNameMethods inherited from interface net.minecraft.server.packs.resources.ResourceManagerReloadListener
reload
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ObjLoader
public ObjLoader()
-
-
Method Details
-
onResourceManagerReload
public void onResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager) - Specified by:
onResourceManagerReloadin interfacenet.minecraft.server.packs.resources.ResourceManagerReloadListener
-
read
public ObjModel read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext) - Specified by:
readin interfacenet.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
Loads (or returns from cache) a plain OBJ model described bysettings. -
loadMaterialLibrary
public ObjMaterialLibrary loadMaterialLibrary(net.minecraft.resources.ResourceLocation materialLocation) Loads (or returns from cache) a material library atmaterialLocation.
-