From 7da5babe9fc611e05e1f66fd4ef6f0ec6bdee2ac Mon Sep 17 00:00:00 2001 From: catfoolyou Date: Wed, 29 Jan 2025 18:49:55 -0500 Subject: [PATCH] 48 errors --- .gradle/8.0/fileHashes/fileHashes.bin | Bin 1960423 -> 1960423 bytes .gradle/8.0/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../8.0/fileHashes/resourceHashesCache.bin | Bin 883898 -> 884102 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .../src/GuiCreateFlatWorldListSlot.java | 1 + .../minecraft/src/GuiFlatPresetsListSlot.java | 1 + ...poraryResourcePackSelectSelectionList.java | 1 + .../net/minecraft/src/GuiSlotLanguage.java | 1 + .../java/net/minecraft/src/GuiSlotServer.java | 1 + .../net/minecraft/src/GuiSlotStatsItem.java | 1 + .../java/net/minecraft/src/Tessellator.java | 569 ------------------ 11 files changed, 6 insertions(+), 569 deletions(-) delete mode 100644 src/main/java/net/minecraft/src/Tessellator.java diff --git a/.gradle/8.0/fileHashes/fileHashes.bin b/.gradle/8.0/fileHashes/fileHashes.bin index 983a6c784705e1423f03567084717db30725e721..86873918aaa408f9edcd57a7dba28f32f476dd07 100644 GIT binary patch delta 1831 zcmX|>YfzMB6vuZ#V7cwZ7YLqZLqMAtb%3l7O$ecrP0k>0>ev?th;eFnBx1AyGc58Q zbW$WF{8vJ>N~MEAj5_O>j-lgp(<$PzAhNKcE-GZ3quFHA+2`!remcMBobx}I=XuxP zU+wR&eoxh_VQRQKM~zS;)hN}VMyoMutQx1rt47tNnpKNBS5?#mHBn7cA3L7>)BUvY z(wExTeBkY_+*WdML-|0LPN)Cqcy-4no%{(DifG0C@P6_u2ht+$&0A*P{AonPi#eNy zPR~6mLpQ$th(qI%n;)mR>-VMXi%!1O5usc2VWjz;=gytzd9WmlL!0u^o@o^Bm8~h6 zv5(h0Y2WyIMzuAp)wOQRd@C28xyWjnaGeZO+@F1wl5r>bL37ztzArYl<{Q^OJg=18 z=Fp1`sBIy&Klh7_*yKZ1ofi^MbpEzt>G8b0jP^#Z_~mjG4@C<1ii2WTS9pz6xcgRH zkEO5vPL?!ZfPJM+fp@@0l8zSm#v=txgSJGXZahEFOj{+2sd4P$jJ-&I zHBP~14%v_0gR;UAoMGc*++m{==|dq`+o@=QiXkcbIRaa40_{u(Q1q-(ppS@3oa7Qu z!?%n|gnMLy8%68G1fF3!f5P_pH0_&J&QE^$y4WgZm0rW|OB=?@9%dm|G z)0{~t`XNf7n20WOmWMEu!gA51;Qi6yWja$(l0#*W$qa`NMb0?_*O>zNcT^UdK=u`B z%%F@6+K89M5>Pj7QSkK@*`^oc*)-6&Mt$GS6|jtje8oFyBg-{1@1Z{5V!DflF)4ow z>0Q+D2p>-)pdD{-Oc7Y>l}gj78>hWjGEJd0layRcw@~&Ct*u|9+g_1P2fZa~H zj&Z4UE2tEF`BXQT>R#gGX%ybm3(QKQl{T)RmE=wYQ|S9yy+a6;Gg(oxihM1S922lR zXyEUeJow{Ri@@I+S$x68IeBloFw~tfE7;(Zsyg%(Qd^B0HD%E2?Um#h!?t@g{9Vl# zKTEXWsvN+B?W<|{^%_-PmE(Be(u{xh(mG}|e|r+W>9k4triZx`Gb~%E5j!2yB0MN4 zrCZv;Gz`~a`tDBrPdU_!J7hA z40@Q(gbN(vz(@G@Mo`fii5WJck>-~tCfM09pmQ;`+2#*QI}Ol#=`;C-DG7^yj}XvL z1xIiu^31DH*FiHcp+ibAVNoIdA8ceYK=uhHBYgfufghO?;G2@AV{q0_uW<2ADG-gE a1+?H2CR0m*nrUK)!tPPJ*7G-Q^Zx^c4xzFD delta 1837 zcmY+Ee@xVM7{@(Oe#71QMTHNZ7m{sE8C*Z1VR|^MIr(vE)3q7U)tWXkSIzt4{DFSc znjj(Cdo9SJZP_f9Ft1F8=vYRuWPqgTT_@n_itIFgWoplTp8K|We?70y=Xu`G`}ur6 z_x1N|^!IGsrWv#_EnJ(bP17Q@NG(c>)?&0+El!Kq5;UV`(#+a)P0jEPK`(Hl5oYnb8qtAXlwMzlC39iA5W@Y=3dczFt6j`)afuxnico5 z`sB3OS!v&CN4g5zPb?U7SH0i-Y$&r7-JM3^{_Kn7xwov7Z6k4aJgbMxdq;=r`-c+M6$r#U$7V^KLtqS9R-hb(ZDAz4V~?;Aps0UFz;GPHCPU z<5ct6dkV_x4T`(5JjIYm`!8T~Qi5=|R;Dz3DKXWNAa<$qXS>z;mZrnuPFFKBdM%k0 ze2)?i`cO+jtkc!YlBRYzmRS^ddMzaBIt!mSLcrK(nL*T##gCW->_jn6*GaC}gVa~! z6uiSJ=dim^cIZJ12kp4UK`&A-hPE0`MGKT)l%kyos1|_(Oy^OMlOWJdL@ns9g1;x> z%cBmJxPciktoi#XX-#(dWt~$rJ$Ia1^cC7Pt}Ulw-kYD zUbdlaFkYZllFN&((?)@SzIW`g*#c>orJGR%zKRieNfODGUzQ_`;s6JKqgw{54SUYg zWmpDe-z6wGA1P2o6iY66h^SJSJBaBo2RHX!qg z3>1`6Kqqpa#S&5ZhgrebSESAR@Mh9LUY)wnOcyX;4eb@}q7zx7lc|b)z9&hYgX*hN z-iXwrWcU&WL8 zLA7hWQpp%p3f>F#wNc+LUN*x%Y7lt9WJAqTIuhG&vgCOb?+^k`ok|L6Z$Fa(j7;Tc)m@fx|w&!A#EJfbGIsF!$(99 zX_5;fk-8y5fifJjQRJkLK|a%6tQii?Rl~sq+Blem)QZ0@%O>!^Oqa7rlA2Su=xu=w z43ERu5-xCvDHA_jmlyvuMmWfZ)h}0a;ou+}M>5D}gFh&(X2am2zsWC5d06o0Gy%hn z;0UUnM<_()=QQ&Zv`7UDvA|B>gV&j|*(aEC;q%WB_=#yTd^cq49JKoB6=vL&0y)T< aM+aQOv~Yib%+xYGgWUskt>jUL1NQ&` diff --git a/.gradle/8.0/fileHashes/resourceHashesCache.bin b/.gradle/8.0/fileHashes/resourceHashesCache.bin index fcb621f33727d422ceb76789df18963b69880334..0ec28b11d50f5558feef1bbd4aa8213e93906194 100644 GIT binary patch delta 455 zcmdn>)3oikX~P!ASQW;H+v8LicXIIC=q)>X`)&>c2=LZAZRgWvj82E-Zz6i<{0C~?XTlF7$x{8eT|P1IuZ%BOkw-uG7d&2{s+#pX3bc{3^nl1_S+R4 z&3ue2H!5bZPrqNr$+w-gpW{$1f{G68$ z6-=zR9Bh~u@YnV36??Pz()5E9xrF)a@83V{VLHpKu`#*Gn8|Q@qd2!PzXaDBQOVe^ m-TjYNsn)3YO<(wvSy<%1AA4%rVCG+h50V zFiLD^Dd+gXxLu@@ql#~P;!m!b?9=a;aq?|v?dLdD3siK1hjSO}_E|!lJC%^7AK7r4 s#xpM6E-{DmApiD{t2qyeGj?uN?BD?FZZ|r^3B+7L%)Q;{3{S@f0Hdif1OPb}1d;#% literal 17 VcmZSH;5Bjcn=huq3}C<}3;;O?1cLwo diff --git a/src/main/java/net/minecraft/src/GuiCreateFlatWorldListSlot.java b/src/main/java/net/minecraft/src/GuiCreateFlatWorldListSlot.java index 2024be2..7364699 100644 --- a/src/main/java/net/minecraft/src/GuiCreateFlatWorldListSlot.java +++ b/src/main/java/net/minecraft/src/GuiCreateFlatWorldListSlot.java @@ -2,6 +2,7 @@ package net.minecraft.src; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import net.lax1dude.eaglercraft.adapter.Tessellator; class GuiCreateFlatWorldListSlot extends GuiSlot { diff --git a/src/main/java/net/minecraft/src/GuiFlatPresetsListSlot.java b/src/main/java/net/minecraft/src/GuiFlatPresetsListSlot.java index 68be247..d15f3aa 100644 --- a/src/main/java/net/minecraft/src/GuiFlatPresetsListSlot.java +++ b/src/main/java/net/minecraft/src/GuiFlatPresetsListSlot.java @@ -2,6 +2,7 @@ package net.minecraft.src; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import net.lax1dude.eaglercraft.adapter.Tessellator; class GuiFlatPresetsListSlot extends GuiSlot { diff --git a/src/main/java/net/minecraft/src/GuiScreenTemporaryResourcePackSelectSelectionList.java b/src/main/java/net/minecraft/src/GuiScreenTemporaryResourcePackSelectSelectionList.java index 6543fb0..6cf4e49 100644 --- a/src/main/java/net/minecraft/src/GuiScreenTemporaryResourcePackSelectSelectionList.java +++ b/src/main/java/net/minecraft/src/GuiScreenTemporaryResourcePackSelectSelectionList.java @@ -3,6 +3,7 @@ package net.minecraft.src; import java.io.IOException; import java.util.List; import org.lwjgl.opengl.GL11; +import net.lax1dude.eaglercraft.adapter.Tessellator; class GuiScreenTemporaryResourcePackSelectSelectionList extends GuiSlot { diff --git a/src/main/java/net/minecraft/src/GuiSlotLanguage.java b/src/main/java/net/minecraft/src/GuiSlotLanguage.java index ac77ff6..9952e34 100644 --- a/src/main/java/net/minecraft/src/GuiSlotLanguage.java +++ b/src/main/java/net/minecraft/src/GuiSlotLanguage.java @@ -5,6 +5,7 @@ import com.google.common.collect.Maps; import java.util.Iterator; import java.util.List; import java.util.Map; +import net.lax1dude.eaglercraft.adapter.Tessellator; class GuiSlotLanguage extends GuiSlot { diff --git a/src/main/java/net/minecraft/src/GuiSlotServer.java b/src/main/java/net/minecraft/src/GuiSlotServer.java index bb754eb..333a9dc 100644 --- a/src/main/java/net/minecraft/src/GuiSlotServer.java +++ b/src/main/java/net/minecraft/src/GuiSlotServer.java @@ -1,6 +1,7 @@ package net.minecraft.src; import org.lwjgl.opengl.GL11; +import net.lax1dude.eaglercraft.adapter.Tessellator; class GuiSlotServer extends GuiSlot { diff --git a/src/main/java/net/minecraft/src/GuiSlotStatsItem.java b/src/main/java/net/minecraft/src/GuiSlotStatsItem.java index b0c4736..a964e83 100644 --- a/src/main/java/net/minecraft/src/GuiSlotStatsItem.java +++ b/src/main/java/net/minecraft/src/GuiSlotStatsItem.java @@ -2,6 +2,7 @@ package net.minecraft.src; import java.util.ArrayList; import java.util.Iterator; +import net.lax1dude.eaglercraft.adapter.Tessellator; class GuiSlotStatsItem extends GuiSlotStats { diff --git a/src/main/java/net/minecraft/src/Tessellator.java b/src/main/java/net/minecraft/src/Tessellator.java deleted file mode 100644 index 4ac9784..0000000 --- a/src/main/java/net/minecraft/src/Tessellator.java +++ /dev/null @@ -1,569 +0,0 @@ -package net.minecraft.src; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.ShortBuffer; -import org.lwjgl.opengl.ARBVertexBufferObject; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; - -public class Tessellator -{ - /** - * Boolean used to check whether quads should be drawn as two triangles. Initialized to false and never changed. - */ - private static boolean convertQuadsToTriangles; - - /** - * Boolean used to check if we should use vertex buffers. Initialized to false and never changed. - */ - private static boolean tryVBO; - - /** The byte buffer used for GL allocation. */ - private ByteBuffer byteBuffer; - - /** The same memory as byteBuffer, but referenced as an integer buffer. */ - private IntBuffer intBuffer; - - /** The same memory as byteBuffer, but referenced as an float buffer. */ - private FloatBuffer floatBuffer; - - /** Short buffer */ - private ShortBuffer shortBuffer; - - /** Raw integer array. */ - private int[] rawBuffer; - - /** - * The number of vertices to be drawn in the next draw call. Reset to 0 between draw calls. - */ - private int vertexCount; - - /** The first coordinate to be used for the texture. */ - private double textureU; - - /** The second coordinate to be used for the texture. */ - private double textureV; - private int brightness; - - /** The color (RGBA) value to be used for the following draw call. */ - private int color; - - /** - * Whether the current draw object for this tessellator has color values. - */ - private boolean hasColor; - - /** - * Whether the current draw object for this tessellator has texture coordinates. - */ - private boolean hasTexture; - private boolean hasBrightness; - - /** - * Whether the current draw object for this tessellator has normal values. - */ - private boolean hasNormals; - - /** The index into the raw buffer to be used for the next data. */ - private int rawBufferIndex; - - /** - * The number of vertices manually added to the given draw call. This differs from vertexCount because it adds extra - * vertices when converting quads to triangles. - */ - private int addedVertices; - - /** Disables all color information for the following draw call. */ - private boolean isColorDisabled; - - /** The draw mode currently being used by the tessellator. */ - private int drawMode; - - /** - * An offset to be applied along the x-axis for all vertices in this draw call. - */ - private double xOffset; - - /** - * An offset to be applied along the y-axis for all vertices in this draw call. - */ - private double yOffset; - - /** - * An offset to be applied along the z-axis for all vertices in this draw call. - */ - private double zOffset; - - /** The normal to be applied to the face being drawn. */ - private int normal; - - /** The static instance of the Tessellator. */ - public static final Tessellator instance = new Tessellator(2097152); - - /** Whether this tessellator is currently in draw mode. */ - private boolean isDrawing; - - /** Whether we are currently using VBO or not. */ - private boolean useVBO; - - /** An IntBuffer used to store the indices of vertex buffer objects. */ - private IntBuffer vertexBuffers; - - /** - * The index of the last VBO used. This is used in round-robin fashion, sequentially, through the vboCount vertex - * buffers. - */ - private int vboIndex; - - /** Number of vertex buffer objects allocated for use. */ - private int vboCount = 10; - - /** The size of the buffers used (in integers). */ - private int bufferSize; - - private Tessellator(int par1) - { - this.bufferSize = par1; - this.byteBuffer = GLAllocation.createDirectByteBuffer(par1 * 4); - this.intBuffer = this.byteBuffer.asIntBuffer(); - this.floatBuffer = this.byteBuffer.asFloatBuffer(); - this.shortBuffer = this.byteBuffer.asShortBuffer(); - this.rawBuffer = new int[par1]; - this.useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object; - - if (this.useVBO) - { - this.vertexBuffers = GLAllocation.createDirectIntBuffer(this.vboCount); - ARBVertexBufferObject.glGenBuffersARB(this.vertexBuffers); - } - } - - /** - * Draws the data set up in this tessellator and resets the state to prepare for new drawing. - */ - public int draw() - { - if (!this.isDrawing) - { - throw new IllegalStateException("Not tesselating!"); - } - else - { - this.isDrawing = false; - - if (this.vertexCount > 0) - { - this.intBuffer.clear(); - this.intBuffer.put(this.rawBuffer, 0, this.rawBufferIndex); - this.byteBuffer.position(0); - this.byteBuffer.limit(this.rawBufferIndex * 4); - - if (this.useVBO) - { - this.vboIndex = (this.vboIndex + 1) % this.vboCount; - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, this.vertexBuffers.get(this.vboIndex)); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, this.byteBuffer, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - } - - if (this.hasTexture) - { - if (this.useVBO) - { - GL11.glTexCoordPointer(2, GL11.GL_FLOAT, 32, 12L); - } - else - { - this.floatBuffer.position(3); - GL11.glTexCoordPointer(2, 32, this.floatBuffer); - } - - GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); - } - - if (this.hasBrightness) - { - OpenGlHelper.setClientActiveTexture(OpenGlHelper.lightmapTexUnit); - - if (this.useVBO) - { - GL11.glTexCoordPointer(2, GL11.GL_SHORT, 32, 28L); - } - else - { - this.shortBuffer.position(14); - GL11.glTexCoordPointer(2, 32, this.shortBuffer); - } - - GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); - OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit); - } - - if (this.hasColor) - { - if (this.useVBO) - { - GL11.glColorPointer(4, GL11.GL_UNSIGNED_BYTE, 32, 20L); - } - else - { - this.byteBuffer.position(20); - GL11.glColorPointer(4, true, 32, this.byteBuffer); - } - - GL11.glEnableClientState(GL11.GL_COLOR_ARRAY); - } - - if (this.hasNormals) - { - if (this.useVBO) - { - GL11.glNormalPointer(GL11.GL_UNSIGNED_BYTE, 32, 24L); - } - else - { - this.byteBuffer.position(24); - GL11.glNormalPointer(32, this.byteBuffer); - } - - GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY); - } - - if (this.useVBO) - { - GL11.glVertexPointer(3, GL11.GL_FLOAT, 32, 0L); - } - else - { - this.floatBuffer.position(0); - GL11.glVertexPointer(3, 32, this.floatBuffer); - } - - GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); - - if (this.drawMode == 7 && convertQuadsToTriangles) - { - GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, this.vertexCount); - } - else - { - GL11.glDrawArrays(this.drawMode, 0, this.vertexCount); - } - - GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); - - if (this.hasTexture) - { - GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY); - } - - if (this.hasBrightness) - { - OpenGlHelper.setClientActiveTexture(OpenGlHelper.lightmapTexUnit); - GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY); - OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit); - } - - if (this.hasColor) - { - GL11.glDisableClientState(GL11.GL_COLOR_ARRAY); - } - - if (this.hasNormals) - { - GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY); - } - } - - int var1 = this.rawBufferIndex * 4; - this.reset(); - return var1; - } - } - - /** - * Clears the tessellator state in preparation for new drawing. - */ - private void reset() - { - this.vertexCount = 0; - this.byteBuffer.clear(); - this.rawBufferIndex = 0; - this.addedVertices = 0; - } - - /** - * Sets draw mode in the tessellator to draw quads. - */ - public void startDrawingQuads() - { - this.startDrawing(7); - } - - /** - * Resets tessellator state and prepares for drawing (with the specified draw mode). - */ - public void startDrawing(int par1) - { - if (this.isDrawing) - { - throw new IllegalStateException("Already tesselating!"); - } - else - { - this.isDrawing = true; - this.reset(); - this.drawMode = par1; - this.hasNormals = false; - this.hasColor = false; - this.hasTexture = false; - this.hasBrightness = false; - this.isColorDisabled = false; - } - } - - /** - * Sets the texture coordinates. - */ - public void setTextureUV(double par1, double par3) - { - this.hasTexture = true; - this.textureU = par1; - this.textureV = par3; - } - - public void setBrightness(int par1) - { - this.hasBrightness = true; - this.brightness = par1; - } - - /** - * Sets the RGB values as specified, converting from floats between 0 and 1 to integers from 0-255. - */ - public void setColorOpaque_F(float par1, float par2, float par3) - { - this.setColorOpaque((int)(par1 * 255.0F), (int)(par2 * 255.0F), (int)(par3 * 255.0F)); - } - - /** - * Sets the RGBA values for the color, converting from floats between 0 and 1 to integers from 0-255. - */ - public void setColorRGBA_F(float par1, float par2, float par3, float par4) - { - this.setColorRGBA((int)(par1 * 255.0F), (int)(par2 * 255.0F), (int)(par3 * 255.0F), (int)(par4 * 255.0F)); - } - - /** - * Sets the RGB values as specified, and sets alpha to opaque. - */ - public void setColorOpaque(int par1, int par2, int par3) - { - this.setColorRGBA(par1, par2, par3, 255); - } - - /** - * Sets the RGBA values for the color. Also clamps them to 0-255. - */ - public void setColorRGBA(int par1, int par2, int par3, int par4) - { - if (!this.isColorDisabled) - { - if (par1 > 255) - { - par1 = 255; - } - - if (par2 > 255) - { - par2 = 255; - } - - if (par3 > 255) - { - par3 = 255; - } - - if (par4 > 255) - { - par4 = 255; - } - - if (par1 < 0) - { - par1 = 0; - } - - if (par2 < 0) - { - par2 = 0; - } - - if (par3 < 0) - { - par3 = 0; - } - - if (par4 < 0) - { - par4 = 0; - } - - this.hasColor = true; - - if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) - { - this.color = par4 << 24 | par3 << 16 | par2 << 8 | par1; - } - else - { - this.color = par1 << 24 | par2 << 16 | par3 << 8 | par4; - } - } - } - - /** - * Adds a vertex specifying both x,y,z and the texture u,v for it. - */ - public void addVertexWithUV(double par1, double par3, double par5, double par7, double par9) - { - this.setTextureUV(par7, par9); - this.addVertex(par1, par3, 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. - */ - public void addVertex(double par1, double par3, double par5) - { - ++this.addedVertices; - - if (this.drawMode == 7 && convertQuadsToTriangles && this.addedVertices % 4 == 0) - { - for (int var7 = 0; var7 < 2; ++var7) - { - int var8 = 8 * (3 - var7); - - if (this.hasTexture) - { - this.rawBuffer[this.rawBufferIndex + 3] = this.rawBuffer[this.rawBufferIndex - var8 + 3]; - this.rawBuffer[this.rawBufferIndex + 4] = this.rawBuffer[this.rawBufferIndex - var8 + 4]; - } - - if (this.hasBrightness) - { - this.rawBuffer[this.rawBufferIndex + 7] = this.rawBuffer[this.rawBufferIndex - var8 + 7]; - } - - if (this.hasColor) - { - this.rawBuffer[this.rawBufferIndex + 5] = this.rawBuffer[this.rawBufferIndex - var8 + 5]; - } - - this.rawBuffer[this.rawBufferIndex + 0] = this.rawBuffer[this.rawBufferIndex - var8 + 0]; - this.rawBuffer[this.rawBufferIndex + 1] = this.rawBuffer[this.rawBufferIndex - var8 + 1]; - this.rawBuffer[this.rawBufferIndex + 2] = this.rawBuffer[this.rawBufferIndex - var8 + 2]; - ++this.vertexCount; - this.rawBufferIndex += 8; - } - } - - if (this.hasTexture) - { - this.rawBuffer[this.rawBufferIndex + 3] = Float.floatToRawIntBits((float)this.textureU); - this.rawBuffer[this.rawBufferIndex + 4] = Float.floatToRawIntBits((float)this.textureV); - } - - if (this.hasBrightness) - { - this.rawBuffer[this.rawBufferIndex + 7] = this.brightness; - } - - if (this.hasColor) - { - this.rawBuffer[this.rawBufferIndex + 5] = this.color; - } - - if (this.hasNormals) - { - this.rawBuffer[this.rawBufferIndex + 6] = this.normal; - } - - this.rawBuffer[this.rawBufferIndex + 0] = Float.floatToRawIntBits((float)(par1 + this.xOffset)); - this.rawBuffer[this.rawBufferIndex + 1] = Float.floatToRawIntBits((float)(par3 + this.yOffset)); - this.rawBuffer[this.rawBufferIndex + 2] = Float.floatToRawIntBits((float)(par5 + this.zOffset)); - this.rawBufferIndex += 8; - ++this.vertexCount; - - if (this.vertexCount % 4 == 0 && this.rawBufferIndex >= this.bufferSize - 32) - { - this.draw(); - this.isDrawing = true; - } - } - - /** - * Sets the color to the given opaque value (stored as byte values packed in an integer). - */ - public void setColorOpaque_I(int par1) - { - int var2 = par1 >> 16 & 255; - int var3 = par1 >> 8 & 255; - int var4 = par1 & 255; - this.setColorOpaque(var2, var3, var4); - } - - /** - * Sets the color to the given color (packed as bytes in integer) and alpha values. - */ - public void setColorRGBA_I(int par1, int par2) - { - int var3 = par1 >> 16 & 255; - int var4 = par1 >> 8 & 255; - int var5 = par1 & 255; - this.setColorRGBA(var3, var4, var5, par2); - } - - /** - * Disables colors for the current draw call. - */ - public void disableColor() - { - this.isColorDisabled = true; - } - - /** - * Sets the normal for the current draw call. - */ - public void setNormal(float par1, float par2, float par3) - { - this.hasNormals = true; - byte var4 = (byte)((int)(par1 * 127.0F)); - byte var5 = (byte)((int)(par2 * 127.0F)); - byte var6 = (byte)((int)(par3 * 127.0F)); - this.normal = var4 & 255 | (var5 & 255) << 8 | (var6 & 255) << 16; - } - - /** - * Sets the translation for all vertices in the current draw call. - */ - public void setTranslation(double par1, double par3, double par5) - { - this.xOffset = par1; - this.yOffset = par3; - this.zOffset = par5; - } - - /** - * Offsets the translation for all vertices in the current draw call. - */ - public void addTranslation(float par1, float par2, float par3) - { - this.xOffset += (double)par1; - this.yOffset += (double)par2; - this.zOffset += (double)par3; - } -}