Package net.minecraft.client.model
Class ModelPart
java.lang.Object
net.minecraft.client.model.ModelPart
@Environment(CLIENT) public class ModelPart extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelPart.Cuboid
(package private) static class
ModelPart.Quad
(package private) static class
ModelPart.Vertex
-
Field Summary
Fields Modifier and Type Field Description private ObjectList<ModelPart>
children
private ObjectList<ModelPart.Cuboid>
cuboids
boolean
mirror
float
pitch
float
pivotX
float
pivotY
float
pivotZ
float
roll
private float
textureHeight
private int
textureOffsetU
private int
textureOffsetV
private float
textureWidth
boolean
visible
float
yaw
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
addChild(ModelPart part)
ModelPart
addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ)
ModelPart
addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, boolean mirror)
void
addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extra)
void
addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extra, boolean mirror)
void
addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extraX, float extraY, float extraZ)
private void
addCuboid(int u, int v, float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extraX, float extraY, float extraZ, boolean mirror, boolean bool)
ModelPart
addCuboid(String name, float x, float y, float z, int sizeX, int sizeY, int sizeZ, float extra, int textureOffsetU, int textureOffsetV)
void
copyPositionAndRotation(ModelPart modelPart)
ModelPart.Cuboid
getRandomCuboid(Random random)
ModelPart
method_29991()
void
render(MatrixStack matrices, VertexConsumer vertices, int light, int overlay)
void
render(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha)
private void
renderCuboids(MatrixStack.Entry matrices, VertexConsumer vertexConsumer, int light, int overlay, float red, float green, float blue, float alpha)
void
rotate(MatrixStack matrix)
void
setPivot(float x, float y, float z)
ModelPart
setTextureOffset(int textureOffsetU, int textureOffsetV)
ModelPart
setTextureSize(int width, int height)
-
Field Details
-
textureWidth
private float textureWidth -
textureHeight
private float textureHeight -
textureOffsetU
private int textureOffsetU -
textureOffsetV
private int textureOffsetV -
pivotX
public float pivotX -
pivotY
public float pivotY -
pivotZ
public float pivotZ -
pitch
public float pitch -
yaw
public float yaw -
roll
public float roll -
mirror
public boolean mirror -
visible
public boolean visible -
cuboids
-
children
-
-
Constructor Details
-
ModelPart
-
ModelPart
-
ModelPart
public ModelPart(int textureWidth, int textureHeight, int textureOffsetU, int textureOffsetV) -
ModelPart
private ModelPart()
-
-
Method Details
-
method_29991
-
copyPositionAndRotation
-
addChild
-
setTextureOffset
-
addCuboid
-
addCuboid
-
addCuboid
public ModelPart addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, boolean mirror) -
addCuboid
public void addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extra) -
addCuboid
public void addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extraX, float extraY, float extraZ) -
addCuboid
public void addCuboid(float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extra, boolean mirror) -
addCuboid
private void addCuboid(int u, int v, float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extraX, float extraY, float extraZ, boolean mirror, boolean bool) -
setPivot
public void setPivot(float x, float y, float z) -
render
-
render
public void render(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha) -
rotate
-
renderCuboids
private void renderCuboids(MatrixStack.Entry matrices, VertexConsumer vertexConsumer, int light, int overlay, float red, float green, float blue, float alpha) -
setTextureSize
-
getRandomCuboid
-