Class ObjGeometry
java.lang.Object
net.neoforged.neoforge.client.model.obj.ObjGeometry
- All Implemented Interfaces:
net.minecraft.client.resources.model.UnbakedGeometry
,UnbakedGeometryExtension
,ExtendedUnbakedGeometry
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
private class
class
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
private static final org.joml.Vector4f
private final List
<org.joml.Vector4f> private static final net.minecraft.world.phys.Vec2[]
final boolean
final boolean
final net.minecraft.resources.ResourceLocation
final @Nullable String
private final List
<org.joml.Vector3f> private final com.google.common.collect.Multimap
<String, ObjGeometry.ModelGroup> private final List
<org.joml.Vector3f> final boolean
private final List
<net.minecraft.world.phys.Vec2> Fields inherited from interface net.minecraft.client.resources.model.UnbakedGeometry
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.QuadCollection
bake
(net.minecraft.client.renderer.block.model.TextureSlots textureSlots, net.minecraft.client.resources.model.ModelBaker baker, net.minecraft.client.resources.model.ModelState state, net.minecraft.client.resources.model.ModelDebugName debugName, net.minecraft.util.context.ContextMap additionalProperties) Version ofUnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName)
that also receives additional properties sourced fromUnbakedModelExtension.fillAdditionalProperties(net.minecraft.util.context.ContextMap.Builder)
.private org.apache.commons.lang3.tuple.Pair
<net.minecraft.client.renderer.block.model.BakedQuad, net.minecraft.core.Direction> makeQuad
(int[][] indices, int tintIndex, org.joml.Vector4f colorTint, org.joml.Vector4f ambientColor, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, com.mojang.math.Transformation transform) static ObjGeometry
parse
(ObjTokenizer tokenizer, ObjGeometry.Settings settings) private static net.minecraft.world.phys.Vec2
parseVector2
(String[] line) private static org.joml.Vector3f
parseVector3
(String[] line) (package private) static org.joml.Vector4f
parseVector4
(String[] line) private static org.joml.Vector3f
parseVector4To3
(String[] line) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.model.ExtendedUnbakedGeometry
bake
-
Field Details
-
COLOR_WHITE
private static final org.joml.Vector4f COLOR_WHITE -
DEFAULT_COORDS
private static final net.minecraft.world.phys.Vec2[] DEFAULT_COORDS -
parts
-
positions
-
texCoords
-
normals
-
colors
-
automaticCulling
public final boolean automaticCulling -
shadeQuads
public final boolean shadeQuads -
flipV
public final boolean flipV -
emissiveAmbient
public final boolean emissiveAmbient -
mtlOverride
-
modelLocation
public final net.minecraft.resources.ResourceLocation modelLocation
-
-
Constructor Details
-
ObjGeometry
-
-
Method Details
-
parse
public static ObjGeometry parse(ObjTokenizer tokenizer, ObjGeometry.Settings settings) throws IOException - Throws:
IOException
-
parseVector4To3
-
parseVector2
-
parseVector3
-
parseVector4
-
bake
public net.minecraft.client.resources.model.QuadCollection bake(net.minecraft.client.renderer.block.model.TextureSlots textureSlots, net.minecraft.client.resources.model.ModelBaker baker, net.minecraft.client.resources.model.ModelState state, net.minecraft.client.resources.model.ModelDebugName debugName, net.minecraft.util.context.ContextMap additionalProperties) Description copied from interface:UnbakedGeometryExtension
Version ofUnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName)
that also receives additional properties sourced fromUnbakedModelExtension.fillAdditionalProperties(net.minecraft.util.context.ContextMap.Builder)
.- Specified by:
bake
in interfaceExtendedUnbakedGeometry
- Specified by:
bake
in interfaceUnbakedGeometryExtension
-
makeQuad
private org.apache.commons.lang3.tuple.Pair<net.minecraft.client.renderer.block.model.BakedQuad,net.minecraft.core.Direction> makeQuad(int[][] indices, int tintIndex, org.joml.Vector4f colorTint, org.joml.Vector4f ambientColor, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, com.mojang.math.Transformation transform)
-