diff options
author | Dream-Master <dream-master@gmx.net> | 2016-06-21 19:21:14 +0200 |
---|---|---|
committer | Dream-Master <dream-master@gmx.net> | 2016-06-21 19:21:14 +0200 |
commit | 4f1900142313bf92a82f48fc146bd8c806734d7a (patch) | |
tree | 38387991fa4a64aecd8b97c3f4cf27a3c7f97653 /src/main/java/gregtech/common/render/GT_RenderUtil.java | |
parent | 6fe4d4a8d3226c02a65a70d7a8035a219cbd2c66 (diff) | |
parent | 2651e69c7037e2f5e19b404158506941999cde08 (diff) | |
download | GT5-Unofficial-4f1900142313bf92a82f48fc146bd8c806734d7a.tar.gz GT5-Unofficial-4f1900142313bf92a82f48fc146bd8c806734d7a.tar.bz2 GT5-Unofficial-4f1900142313bf92a82f48fc146bd8c806734d7a.zip |
Merge branch 'experimental'
Diffstat (limited to 'src/main/java/gregtech/common/render/GT_RenderUtil.java')
-rw-r--r-- | src/main/java/gregtech/common/render/GT_RenderUtil.java | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/main/java/gregtech/common/render/GT_RenderUtil.java b/src/main/java/gregtech/common/render/GT_RenderUtil.java index cba37972fe..1b674f440f 100644 --- a/src/main/java/gregtech/common/render/GT_RenderUtil.java +++ b/src/main/java/gregtech/common/render/GT_RenderUtil.java @@ -1,30 +1,30 @@ -package gregtech.common.render;
-
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.IIcon;
-
-public class GT_RenderUtil {
- public static void renderItemIcon(IIcon icon, double size, double z, float nx, float ny, float nz) {
- renderItemIcon(icon, 0.0D, 0.0D, size, size, z, nx, ny, nz);
- }
-
- public static void renderItemIcon(IIcon icon, double xStart, double yStart, double xEnd, double yEnd, double z, float nx, float ny, float nz) {
- if (icon == null) {
- return;
- }
- Tessellator.instance.startDrawingQuads();
- Tessellator.instance.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());
- } 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());
- }
- Tessellator.instance.draw();
- }
-}
+package gregtech.common.render; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; + +public class GT_RenderUtil { + public static void renderItemIcon(IIcon icon, double size, double z, float nx, float ny, float nz) { + renderItemIcon(icon, 0.0D, 0.0D, size, size, z, nx, ny, nz); + } + + public static void renderItemIcon(IIcon icon, double xStart, double yStart, double xEnd, double yEnd, double z, float nx, float ny, float nz) { + if (icon == null) { + return; + } + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.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()); + } 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()); + } + Tessellator.instance.draw(); + } +} |