Class Tessellator

java.lang.Object
net.minecraft.src.Tessellator

public class Tessellator extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Tessellator
    The static instance of the Tessellator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTranslation(float par1, float par2, float par3)
    Offsets the translation for all vertices in the current draw call.
    void
    addVertex(double par1, double par3, double par5)
    Adds a vertex with the specified x,y,z to the current draw call.
    void
    addVertexWithUV(double par1, double par3, double par5, double par7, double par9)
    Adds a vertex specifying both x,y,z and the texture u,v for it.
    void
    Disables colors for the current draw call.
    int
    Draws the data set up in this tessellator and resets the state to prepare for new drawing.
    void
    setBrightness(int par1)
     
    void
    setColorOpaque(int par1, int par2, int par3)
    Sets the RGB values as specified, and sets alpha to opaque.
    void
    setColorOpaque_F(float par1, float par2, float par3)
    Sets the RGB values as specified, converting from floats between 0 and 1 to integers from 0-255.
    void
    setColorOpaque_I(int par1)
    Sets the color to the given opaque value (stored as byte values packed in an integer).
    void
    setColorRGBA(int par1, int par2, int par3, int par4)
    Sets the RGBA values for the color.
    void
    setColorRGBA_F(float par1, float par2, float par3, float par4)
    Sets the RGBA values for the color, converting from floats between 0 and 1 to integers from 0-255.
    void
    setColorRGBA_I(int par1, int par2)
    Sets the color to the given color (packed as bytes in integer) and alpha values.
    void
    setNormal(float par1, float par2, float par3)
    Sets the normal for the current draw call.
    void
    setTextureUV(double par1, double par3)
    Sets the texture coordinates.
    void
    setTranslation(double par1, double par3, double par5)
    Sets the translation for all vertices in the current draw call.
    void
    startDrawing(int par1)
    Resets tessellator state and prepares for drawing (with the specified draw mode).
    void
    Sets draw mode in the tessellator to draw quads.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • instance

      public static final Tessellator instance
      The static instance of the Tessellator.
  • Method Details

    • draw

      public int draw()
      Draws the data set up in this tessellator and resets the state to prepare for new drawing.
    • startDrawingQuads

      public void startDrawingQuads()
      Sets draw mode in the tessellator to draw quads.
    • startDrawing

      public void startDrawing(int par1)
      Resets tessellator state and prepares for drawing (with the specified draw mode).
    • setTextureUV

      public void setTextureUV(double par1, double par3)
      Sets the texture coordinates.
    • setBrightness

      public void setBrightness(int par1)
    • setColorOpaque_F

      public void setColorOpaque_F(float par1, float par2, float par3)
      Sets the RGB values as specified, converting from floats between 0 and 1 to integers from 0-255.
    • setColorRGBA_F

      public void setColorRGBA_F(float par1, float par2, float par3, float par4)
      Sets the RGBA values for the color, converting from floats between 0 and 1 to integers from 0-255.
    • setColorOpaque

      public void setColorOpaque(int par1, int par2, int par3)
      Sets the RGB values as specified, and sets alpha to opaque.
    • setColorRGBA

      public void setColorRGBA(int par1, int par2, int par3, int par4)
      Sets the RGBA values for the color. Also clamps them to 0-255.
    • addVertexWithUV

      public void addVertexWithUV(double par1, double par3, double par5, double par7, double par9)
      Adds a vertex specifying both x,y,z and the texture u,v for it.
    • addVertex

      public void addVertex(double par1, double par3, double par5)
      Adds a vertex with the specified x,y,z to the current draw call. It will trigger a draw() if the buffer gets full.
    • setColorOpaque_I

      public void setColorOpaque_I(int par1)
      Sets the color to the given opaque value (stored as byte values packed in an integer).
    • setColorRGBA_I

      public void setColorRGBA_I(int par1, int par2)
      Sets the color to the given color (packed as bytes in integer) and alpha values.
    • disableColor

      public void disableColor()
      Disables colors for the current draw call.
    • setNormal

      public void setNormal(float par1, float par2, float par3)
      Sets the normal for the current draw call.
    • setTranslation

      public void setTranslation(double par1, double par3, double par5)
      Sets the translation for all vertices in the current draw call.
    • addTranslation

      public void addTranslation(float par1, float par2, float par3)
      Offsets the translation for all vertices in the current draw call.