mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
Cache Tessellator#instance in local var (#321)
This commit is contained in:
1 parent
ae7af4e712
commit
1e66772abc
5 files changed
+43
-37
No files matched your search
@@ -27,20 +27,21 @@ public final class RenderUtil {
|
||||
if (icon == null) {
|
||||
return;
|
||||
}
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
Tessellator.instance.setNormal(nx, ny, nz);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(nx, ny, nz);
|
||||
if (nz > 0.0F) {
|
||||
Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
|
||||
Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
|
||||
Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
|
||||
Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
|
||||
} else {
|
||||
Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
|
||||
Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
|
||||
Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
|
||||
Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
|
||||
}
|
||||
Tessellator.instance.draw();
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
public static void renderFluidIntoGui(Gui gui, int x, int y, int width, int height,
|
||||
|
||||
Reference in new issue
Block a user