public class Face extends java.lang.Object implements ITransformable.Translate, ITransformable.Rotate
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
name |
protected RenderParameters |
params |
protected Vertex[] |
vertexes |
| Constructor and Description |
|---|
Face(Face face) |
Face(Face face,
RenderParameters params) |
Face(java.util.List<Vertex> vertexes) |
Face(Vertex... vertexes) |
Face(Vertex[] vertexes,
RenderParameters params) |
| Modifier and Type | Method and Description |
|---|---|
int[][][] |
calculateAoMatrix(net.minecraft.util.EnumFacing offset)
Automatically calculate AoMatrix for this
Face. |
void |
calculateNormal()
Calculates the normal of this
Face based on the vertex coordinates. |
Vector |
calculateNormal(Vector[] normals)
Calculates normal of this
Face using the vertex normals provided. |
void |
deductParameters()
Deducts the parameters for this
Face based on the calculated normal. |
void |
deductParameters(Vector[] normals)
Deducts the
RenderParameters for this Face based on the specified normals |
RenderParameters |
getParameters()
Gets the
RenderParameters of this Face. |
Vertex[] |
getVertexes()
|
Vector[] |
getVertexNormals()
Gets the vertexes normals for this
Face. |
Face |
interpolateUV() |
java.lang.String |
name()
Gets the base name of this
Face. |
static java.lang.String |
nameFromDirection(net.minecraft.util.EnumFacing dir)
Gets a
Face name from a EnumFacing. |
void |
rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ) |
void |
rotateAroundX(double angle) |
void |
rotateAroundX(double angle,
double centerX,
double centerY,
double centerZ) |
void |
rotateAroundY(double angle) |
void |
rotateAroundY(double angle,
double centerX,
double centerY,
double centerZ) |
void |
rotateAroundZ(double angle) |
void |
rotateAroundZ(double angle,
double centerX,
double centerY,
double centerZ) |
void |
scale(float f) |
void |
scale(float f,
float offset) |
void |
scale(float fx,
float fy,
float fz) |
void |
scale(float fx,
float fy,
float fz,
float offsetX,
float offsetY,
float offsetZ) |
Face |
setAlpha(int alpha) |
Face |
setBrightness(int brightness) |
Face |
setColor(int color) |
void |
setName(java.lang.String name)
Sets the base name for this
Face. |
Face |
setParameters(RenderParameters params)
Sets the
RenderParameters for this Face. |
Face |
setStandardUV() |
Face |
setTexture(MalisisIcon icon) |
Face |
setTexture(MalisisIcon icon,
boolean flippedU,
boolean flippedV,
boolean interpolate) |
net.minecraft.client.renderer.block.model.BakedQuad |
toBakedQuad()
Gets a
BakedQuad from this Face |
java.lang.String |
toString() |
void |
translate(float x,
float y,
float z) |
protected java.lang.String name
protected Vertex[] vertexes
protected RenderParameters params
public Face(Vertex[] vertexes, RenderParameters params)
public Face(Vertex... vertexes)
public Face(java.util.List<Vertex> vertexes)
public Face(Face face)
public Face(Face face, RenderParameters params)
public void setName(java.lang.String name)
Face. If the name specified is null, it is automatically determined based on the Vertex
positions.name - the base namepublic java.lang.String name()
Face.public Vertex[] getVertexes()
public Face setParameters(RenderParameters params)
RenderParameters for this Face.params - the parameters. If null, sets default parametersFacepublic RenderParameters getParameters()
RenderParameters of this Face.public Face setColor(int color)
public Face setAlpha(int alpha)
public Face setBrightness(int brightness)
public Face setTexture(MalisisIcon icon)
public Face setStandardUV()
public Face interpolateUV()
public Face setTexture(MalisisIcon icon, boolean flippedU, boolean flippedV, boolean interpolate)
public void translate(float x,
float y,
float z)
translate in interface ITransformable.Translatepublic void scale(float f)
public void scale(float f,
float offset)
public void scale(float fx,
float fy,
float fz)
public void scale(float fx,
float fy,
float fz,
float offsetX,
float offsetY,
float offsetZ)
public void rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
rotate in interface ITransformable.Rotatepublic void rotateAroundX(double angle)
public void rotateAroundX(double angle,
double centerX,
double centerY,
double centerZ)
public void rotateAroundY(double angle)
public void rotateAroundY(double angle,
double centerX,
double centerY,
double centerZ)
public void rotateAroundZ(double angle)
public void rotateAroundZ(double angle,
double centerX,
double centerY,
double centerZ)
public int[][][] calculateAoMatrix(net.minecraft.util.EnumFacing offset)
Face. Only works for regular N/S/E/W/T/B facesoffset - the offsetpublic Vector[] getVertexNormals()
Face.public void calculateNormal()
Face based on the vertex coordinates.public Vector calculateNormal(Vector[] normals)
Face using the vertex normals provided.normals - the normalspublic void deductParameters()
Face based on the calculated normal.public void deductParameters(Vector[] normals)
RenderParameters for this Face based on the specified normalsnormals - the vertex normalspublic net.minecraft.client.renderer.block.model.BakedQuad toBakedQuad()
BakedQuad from this Facepublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String nameFromDirection(net.minecraft.util.EnumFacing dir)
Face name from a EnumFacing.dir - the dir