public abstract class ModelHelper extends Object
Modifier and Type | Field and Description |
---|---|
static net.minecraft.client.render.model.json.ModelTransformation |
MODEL_TRANSFORM_BLOCK
Mimics the vanilla model transformation used for most vanilla blocks,
and should be suitable for most custom block-like models.
|
static int |
NULL_FACE_ID
Result from
toFaceIndex(Direction) for null values. |
static net.minecraft.client.render.model.json.Transformation |
TRANSFORM_BLOCK_1ST_PERSON_LEFT |
static net.minecraft.client.render.model.json.Transformation |
TRANSFORM_BLOCK_1ST_PERSON_RIGHT |
static net.minecraft.client.render.model.json.Transformation |
TRANSFORM_BLOCK_3RD_PERSON_RIGHT |
static net.minecraft.client.render.model.json.Transformation |
TRANSFORM_BLOCK_FIXED |
static net.minecraft.client.render.model.json.Transformation |
TRANSFORM_BLOCK_GROUND |
static net.minecraft.client.render.model.json.Transformation |
TRANSFORM_BLOCK_GUI |
Modifier and Type | Method and Description |
---|---|
static net.minecraft.util.math.Direction |
faceFromIndex(int faceIndex)
Use to decode a result from
toFaceIndex(Direction) . |
static int |
toFaceIndex(net.minecraft.util.math.Direction face)
Convenient way to encode faces that may be null.
|
static List<net.minecraft.client.render.model.BakedQuad>[] |
toQuadLists(Mesh mesh)
Converts a mesh into an array of lists of vanilla baked quads.
|
public static final int NULL_FACE_ID
toFaceIndex(Direction)
for null values.public static final net.minecraft.client.render.model.json.Transformation TRANSFORM_BLOCK_GUI
public static final net.minecraft.client.render.model.json.Transformation TRANSFORM_BLOCK_GROUND
public static final net.minecraft.client.render.model.json.Transformation TRANSFORM_BLOCK_FIXED
public static final net.minecraft.client.render.model.json.Transformation TRANSFORM_BLOCK_3RD_PERSON_RIGHT
public static final net.minecraft.client.render.model.json.Transformation TRANSFORM_BLOCK_1ST_PERSON_RIGHT
public static final net.minecraft.client.render.model.json.Transformation TRANSFORM_BLOCK_1ST_PERSON_LEFT
public static final net.minecraft.client.render.model.json.ModelTransformation MODEL_TRANSFORM_BLOCK
public static int toFaceIndex(net.minecraft.util.math.Direction face)
NULL_FACE_ID
.
Use faceFromIndex(int)
to retrieve encoded face.@Contract(value="null -> null") public static net.minecraft.util.math.Direction faceFromIndex(int faceIndex)
toFaceIndex(Direction)
.
Return value will be null if encoded value was null.
Can also be used for no-allocation iteration of Direction.values()
,
optionally including the null face. (Use < or <= NULL_FACE_ID
to exclude or include the null value, respectively.)public static List<net.minecraft.client.render.model.BakedQuad>[] toQuadLists(Mesh mesh)
Direction.getId()
with the
addition of NULL_FACE_ID
.
Retrieves sprites from the block texture atlas via SpriteFinder
.