Class WorldRenderer


  • public class WorldRenderer
    extends java.lang.Object
    Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  WorldRenderer.State  
    • Constructor Summary

      Constructors 
      Constructor Description
      WorldRenderer​(int bufferSizeIn)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addVertexData​(int[] vertexData)
      adds cached vertex data to the buffer
      void begin​(int parInt1, VertexFormat parVertexFormat)  
      WorldRenderer color​(float parFloat1, float parFloat2, float parFloat3, float parFloat4)
      sets color of current vertex
      WorldRenderer color​(int parInt1, int parInt2, int parInt3, int parInt4)
      sets color of current vertex
      void endVertex()
      increases the index of the current vertex by 1
      void finalize()  
      void finishDrawing()  
      void free()  
      WorldRenderer.State func_181672_a()
      SLOW AND STUPID UPLOAD QUEUE SYSTEM, MUST BE REPLACED
      void func_181674_a​(float parFloat1, float parFloat2, float parFloat3)
      MOST LIKELY USED TO SORT QUADS BACK TO FRONT
      ByteBuffer getByteBuffer()  
      int getDrawMode()  
      int getVertexCount()  
      VertexFormat getVertexFormat()  
      WorldRenderer lightmap​(int parInt1, int parInt2)  
      void markDirty()
      Marks the current renderer data as dirty (makes it skip certain calls)
      WorldRenderer normal​(float parFloat1, float parFloat2, float parFloat3)
      set normal of current vertex
      WorldRenderer pos​(double parDouble1, double parDouble2, double parDouble3)
      sets position of current vertex
      void putBrightness4​(int parInt1, int parInt2, int parInt3, int parInt4)
      update lightmap color of the last 4 verticies, used in AO calculation
      void putColor4​(int argb)  
      void putColorMultiplier​(float red, float green, float blue, int parInt1)
      multiplies the color of a vertex parInt1 indicies before the current vertex, skips if !this.needsUpdate
      void putColorRGB_F​(float red, float green, float blue, int parInt1)
      sets color multiplier of a vertex parInt1 indicies before the current vertex
      void putColorRGB_F4​(float red, float green, float blue)  
      void putNormal​(float x, float y, float z)
      sets the normal of the previous 4 verticies in the buffer
      void putPosition​(double x, double y, double z)
      translates the last 4 verticies to the given position plus current offset
      void reset()  
      void setTranslation​(double x, double y, double z)
      sets translation applied to all positions set by functions
      void setVertexState​(WorldRenderer.State state)
      SLOW AND STUPID COMPANION FUNCTION TO 'func_181672_a'
      WorldRenderer tex​(double parDouble1, double parDouble2)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorldRenderer

        public WorldRenderer​(int bufferSizeIn)
    • Method Detail

      • free

        public void free()
      • finalize

        public void finalize()
        Overrides:
        finalize in class java.lang.Object
      • func_181674_a

        public void func_181674_a​(float parFloat1,
                                  float parFloat2,
                                  float parFloat3)
        MOST LIKELY USED TO SORT QUADS BACK TO FRONT
      • func_181672_a

        public WorldRenderer.State func_181672_a()
        SLOW AND STUPID UPLOAD QUEUE SYSTEM, MUST BE REPLACED
      • setVertexState

        public void setVertexState​(WorldRenderer.State state)
        SLOW AND STUPID COMPANION FUNCTION TO 'func_181672_a'
      • reset

        public void reset()
      • begin

        public void begin​(int parInt1,
                          VertexFormat parVertexFormat)
      • tex

        public WorldRenderer tex​(double parDouble1,
                                 double parDouble2)
      • lightmap

        public WorldRenderer lightmap​(int parInt1,
                                      int parInt2)
      • putBrightness4

        public void putBrightness4​(int parInt1,
                                   int parInt2,
                                   int parInt3,
                                   int parInt4)
        update lightmap color of the last 4 verticies, used in AO calculation
      • putPosition

        public void putPosition​(double x,
                                double y,
                                double z)
        translates the last 4 verticies to the given position plus current offset
      • putColorMultiplier

        public void putColorMultiplier​(float red,
                                       float green,
                                       float blue,
                                       int parInt1)
        multiplies the color of a vertex parInt1 indicies before the current vertex, skips if !this.needsUpdate
      • putColorRGB_F

        public void putColorRGB_F​(float red,
                                  float green,
                                  float blue,
                                  int parInt1)
        sets color multiplier of a vertex parInt1 indicies before the current vertex
      • markDirty

        public void markDirty()
        Marks the current renderer data as dirty (makes it skip certain calls)
      • color

        public WorldRenderer color​(float parFloat1,
                                   float parFloat2,
                                   float parFloat3,
                                   float parFloat4)
        sets color of current vertex
      • color

        public WorldRenderer color​(int parInt1,
                                   int parInt2,
                                   int parInt3,
                                   int parInt4)
        sets color of current vertex
      • addVertexData

        public void addVertexData​(int[] vertexData)
        adds cached vertex data to the buffer
      • endVertex

        public void endVertex()
        increases the index of the current vertex by 1
      • pos

        public WorldRenderer pos​(double parDouble1,
                                 double parDouble2,
                                 double parDouble3)
        sets position of current vertex
      • putNormal

        public void putNormal​(float x,
                              float y,
                              float z)
        sets the normal of the previous 4 verticies in the buffer
      • normal

        public WorldRenderer normal​(float parFloat1,
                                    float parFloat2,
                                    float parFloat3)
        set normal of current vertex
      • setTranslation

        public void setTranslation​(double x,
                                   double y,
                                   double z)
        sets translation applied to all positions set by functions
      • finishDrawing

        public void finishDrawing()
      • getByteBuffer

        public ByteBuffer getByteBuffer()
      • getVertexCount

        public int getVertexCount()
      • getDrawMode

        public int getDrawMode()
      • putColor4

        public void putColor4​(int argb)
      • putColorRGB_F4

        public void putColorRGB_F4​(float red,
                                   float green,
                                   float blue)