aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
diff options
context:
space:
mode:
authorShawn Buckley <shawntbuckley@gmail.com>2015-10-21 22:15:09 -0400
committerShawn Buckley <shawntbuckley@gmail.com>2015-10-21 22:15:09 -0400
commit123aa6ed288b2f67b0d47177f4d27cd6893daf3a (patch)
tree358e3704182f5b6fda44fa8b20605ab63edca092 /src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
parent43ddecc7b9715d2038747566f89930b5db8d0181 (diff)
downloadGT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.tar.gz
GT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.tar.bz2
GT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.zip
Reformat code
Diffstat (limited to 'src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java')
-rw-r--r--src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java160
1 files changed, 79 insertions, 81 deletions
diff --git a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
index ffbbe09ec6..caf46b3980 100644
--- a/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
+++ b/src/main/java/gregtech/api/objects/GT_CopiedBlockTexture.java
@@ -8,89 +8,87 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.IIcon;
public class GT_CopiedBlockTexture implements ITexture {
- private final Block mBlock;
- private final byte mSide, mMeta;
-
- /**
- * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!!
- *
- * Just set this variable to another different Array instead.
- * Otherwise some colored things will get Problems.
- */
- public short[] mRGBa;
-
- private final boolean mAllowAlpha;
-
- public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean aAllowAlpha) {
- if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedBlockTexture");
- mBlock = aBlock;
- mRGBa = aRGBa;
- mSide = (byte)aSide;
- mMeta = (byte)aMeta;
- mAllowAlpha = aAllowAlpha;
- }
-
- public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa) {
- this(aBlock, aSide, aMeta, aRGBa, true);
- }
-
- public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta) {
- this(aBlock, aSide, aMeta, Dyes._NULL.mRGBa);
- }
-
- private IIcon getIcon(int aSide) {
- if (mSide == 6) return mBlock.getIcon(aSide, mMeta);
- return mBlock.getIcon(mSide, mMeta);
- }
-
- @Override
- public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(5);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
+ private final Block mBlock;
+ private final byte mSide, mMeta;
+ private final boolean mAllowAlpha;
+ /**
+ * DO NOT MANIPULATE THE VALUES INSIDE THIS ARRAY!!!
+ * <p/>
+ * Just set this variable to another different Array instead.
+ * Otherwise some colored things will get Problems.
+ */
+ public short[] mRGBa;
+
+ public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean aAllowAlpha) {
+ if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedBlockTexture");
+ mBlock = aBlock;
+ mRGBa = aRGBa;
+ mSide = (byte) aSide;
+ mMeta = (byte) aMeta;
+ mAllowAlpha = aAllowAlpha;
+ }
+
+ public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa) {
+ this(aBlock, aSide, aMeta, aRGBa, true);
+ }
+
+ public GT_CopiedBlockTexture(Block aBlock, int aSide, int aMeta) {
+ this(aBlock, aSide, aMeta, Dyes._NULL.mRGBa);
+ }
+
+ private IIcon getIcon(int aSide) {
+ if (mSide == 6) return mBlock.getIcon(aSide, mMeta);
+ return mBlock.getIcon(mSide, mMeta);
+ }
+
+ @Override
+ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(5);
+ Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255);
// aRenderer.flipTexture = !aRenderer.flipTexture;
- aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon);
+ aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon);
// aRenderer.flipTexture = !aRenderer.flipTexture;
- }
-
- @Override
- public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(4);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.6F), (int)(mRGBa[1] * 0.6F), (int)(mRGBa[2] * 0.6F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(1);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 1.0F), (int)(mRGBa[1] * 1.0F), (int)(mRGBa[2] * 1.0F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(0);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.5F), (int)(mRGBa[1] * 0.5F), (int)(mRGBa[2] * 0.5F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(3);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
- aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon);
- }
-
- @Override
- public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
- IIcon aIcon = getIcon(2);
- Tessellator.instance.setColorRGBA((int)(mRGBa[0] * 0.8F), (int)(mRGBa[1] * 0.8F), (int)(mRGBa[2] * 0.8F), mAllowAlpha?255-mRGBa[3]:255);
+ }
+
+ @Override
+ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(4);
+ Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.6F), (int) (mRGBa[1] * 0.6F), (int) (mRGBa[2] * 0.6F), mAllowAlpha ? 255 - mRGBa[3] : 255);
+ aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon);
+ }
+
+ @Override
+ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(1);
+ Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 1.0F), (int) (mRGBa[1] * 1.0F), (int) (mRGBa[2] * 1.0F), mAllowAlpha ? 255 - mRGBa[3] : 255);
+ aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon);
+ }
+
+ @Override
+ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(0);
+ Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.5F), (int) (mRGBa[1] * 0.5F), (int) (mRGBa[2] * 0.5F), mAllowAlpha ? 255 - mRGBa[3] : 255);
+ aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon);
+ }
+
+ @Override
+ public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(3);
+ Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255);
+ aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon);
+ }
+
+ @Override
+ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
+ IIcon aIcon = getIcon(2);
+ Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.8F), (int) (mRGBa[1] * 0.8F), (int) (mRGBa[2] * 0.8F), mAllowAlpha ? 255 - mRGBa[3] : 255);
// aRenderer.flipTexture = !aRenderer.flipTexture;
- aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon);
+ aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon);
// aRenderer.flipTexture = !aRenderer.flipTexture;
- }
-
- @Override
- public boolean isValidTexture() {
- return mBlock != null;
- }
+ }
+
+ @Override
+ public boolean isValidTexture() {
+ return mBlock != null;
+ }
} \ No newline at end of file