aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/render')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java127
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java184
3 files changed, 145 insertions, 176 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
index 384e264dcb..b8eb41274a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
@@ -1,21 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.render;
-import com.mojang.authlib.GameProfile;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.lib.CORE.ConfigSwitches;
-import gtPlusPlus.core.proxy.ClientProxy;
-import gtPlusPlus.core.util.data.AES;
-import gtPlusPlus.core.util.data.FileUtils;
-import gtPlusPlus.core.util.math.MathUtils;
import java.io.*;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.UUID;
+
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -25,18 +15,30 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
+
import org.apache.commons.io.IOUtils;
import org.lwjgl.opengl.GL11;
+import com.mojang.authlib.GameProfile;
+
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Pair;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.CORE.ConfigSwitches;
+import gtPlusPlus.core.proxy.ClientProxy;
+import gtPlusPlus.core.util.data.AES;
+import gtPlusPlus.core.util.data.FileUtils;
+import gtPlusPlus.core.util.math.MathUtils;
+
public class GTPP_CapeRenderer extends RenderPlayer {
- private static final ResourceLocation[] mCapes = {
- new ResourceLocation("miscutils:textures/OrangeHD.png"),
- new ResourceLocation("miscutils:textures/FancyCapeHD.png"),
- new ResourceLocation("miscutils:textures/TesterCapeHD.png"),
- new ResourceLocation("miscutils:textures/PatreonCapeHD.png"),
- new ResourceLocation("miscutils:textures/DevCapeHD.png"),
- };
+ private static final ResourceLocation[] mCapes = { new ResourceLocation("miscutils:textures/OrangeHD.png"),
+ new ResourceLocation("miscutils:textures/FancyCapeHD.png"),
+ new ResourceLocation("miscutils:textures/TesterCapeHD.png"),
+ new ResourceLocation("miscutils:textures/PatreonCapeHD.png"),
+ new ResourceLocation("miscutils:textures/DevCapeHD.png"), };
private final boolean mInit;
@@ -93,8 +95,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
if (!hasResourceChecked) {
// Get players UUID
- String aPlayerUUID =
- aPlayer != null ? aPlayer.getGameProfile().getId().toString() : "BAD";
+ String aPlayerUUID = aPlayer != null ? aPlayer.getGameProfile().getId().toString() : "BAD";
// If for whatever reason this fails, we just exit early.
if (aPlayerUUID.equals("BAD")) {
@@ -173,10 +174,8 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
// If player is invisible, don't render.
- if (GT_Utility.getFullInvisibility(aPlayer)
- || aPlayer.isInvisible()
- || GT_Utility.getPotion(
- aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
+ if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible()
+ || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
aEvent.setCanceled(true);
return false;
}
@@ -185,14 +184,11 @@ public class GTPP_CapeRenderer extends RenderPlayer {
bindTexture(tResource);
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- double d0 = aPlayer.field_71091_bM
- + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks
+ double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks
- (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
- double d1 = aPlayer.field_71096_bN
- + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks
+ double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks
- (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
- double d2 = aPlayer.field_71097_bO
- + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks
+ double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks
- (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
float f6 = aPlayer.prevRenderYawOffset
+ (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
@@ -211,9 +207,9 @@ public class GTPP_CapeRenderer extends RenderPlayer {
f8 = 0.0F;
}
float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks;
- f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified
- + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified)
- * aPartialTicks)
+ f7 += MathHelper.sin(
+ (aPlayer.prevDistanceWalkedModified
+ + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks)
* 6.0F)
* 32.0F
* f10;
@@ -238,6 +234,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
@Deprecated
/**
* Should be able to get the username from a UUID
+ *
* @param name - Players Name
* @param uuid - Players known UUID
* @return - The newest Player name
@@ -250,8 +247,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
UUID g = UUID.fromString(uuid);
if (g != null) {
Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + ".");
- GameProfile profile =
- MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
+ GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
if (profile != null) {
Logger.WARNING("[Capes++] Found for UUID check: " + profile.getName() + ".");
return profile.getName();
@@ -260,8 +256,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
g = UUID.fromString(uuid.replace("-", ""));
if (g != null) {
Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + ".");
- GameProfile profile =
- MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
+ GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
if (profile != null) {
Logger.WARNING("[Capes++] Found for UUID check 2: " + profile.getName() + ".");
return profile.getName();
@@ -273,8 +268,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
if (name != null) {
if (name.length() > 0) {
Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + ".");
- GameProfile profile =
- MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
+ GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
if (profile != null) {
Logger.WARNING("[Capes++] Found for name check: " + profile.getName() + ".");
return profile.getName();
@@ -282,8 +276,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
}
Logger.WORLD("[Capes++] Failed UUID check for " + name + ".");
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
return name;
}
@@ -356,8 +349,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
private static final boolean isDownloadedCapeListBigger(File aFile) {
- double aExistingFileSize =
- (doesCapeCacheExistLocally() ? getCapeCache().length() : 0);
+ double aExistingFileSize = (doesCapeCacheExistLocally() ? getCapeCache().length() : 0);
double aNewFileSize = aFile.length();
if (aNewFileSize > aExistingFileSize) {
return true;
@@ -405,8 +397,8 @@ public class GTPP_CapeRenderer extends RenderPlayer {
e.printStackTrace();
}
if (tempFile == null) {
- tempFile = FileUtils.createFile(
- "", "gtpp-" + MathUtils.randInt(Short.MAX_VALUE, (Integer.MAX_VALUE / 2)), "tmp");
+ tempFile = FileUtils
+ .createFile("", "gtpp-" + MathUtils.randInt(Short.MAX_VALUE, (Integer.MAX_VALUE / 2)), "tmp");
}
tempFile.deleteOnExit();
return tempFile;
@@ -439,36 +431,50 @@ public class GTPP_CapeRenderer extends RenderPlayer {
int aCapeTypeID = aCapeTypeID2;
Pair<String, String> aFinalString = new Pair<String, String>(
"UUID: " + aSplitData[1],
- "Username: "
- + (aSplitData[2] != null && aSplitData[0].length() > 0
- ? aSplitData[2]
- : "Not Specified"));
+ "Username: " + (aSplitData[2] != null && aSplitData[0].length() > 0
+ ? aSplitData[2]
+ : "Not Specified"));
Logger.INFO("Cape Type: " + aCapeTypeID);
switch (aCapeTypeID) {
case 0:
aCapeType1.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType1.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType1.size()
+ + " users.");
break;
case 1:
aCapeType2.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType2.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType2.size()
+ + " users.");
break;
case 2:
aCapeType3.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType3.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType3.size()
+ + " users.");
break;
case 3:
aCapeType4.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType4.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType4.size()
+ + " users.");
break;
case 4:
aCapeType5.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType5.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType5.size()
+ + " users.");
break;
default:
break;
@@ -477,8 +483,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
}
}
- if (!aCapeType1.isEmpty()
- || !aCapeType2.isEmpty()
+ if (!aCapeType1.isEmpty() || !aCapeType2.isEmpty()
|| !aCapeType3.isEmpty()
|| !aCapeType4.isEmpty()
|| !aCapeType5.isEmpty()) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java
index 1d4e367c4f..6267609aba 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java
@@ -1,9 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.render;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.common.items.GT_VolumetricFlask;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import ic2.core.util.DrawUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
@@ -13,8 +9,14 @@ import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.fluids.FluidStack;
+
import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.common.items.GT_VolumetricFlask;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import ic2.core.util.DrawUtil;
+
@SideOnly(cpw.mods.fml.relauncher.Side.CLIENT)
public final class GTPP_FlaskRenderer implements net.minecraftforge.client.IItemRenderer {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java
index 1a5117ac2e..5d7209b203 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.render;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
+
+import org.lwjgl.opengl.GL11;
+
import cpw.mods.fml.client.registry.RenderingRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
@@ -11,12 +19,6 @@ import gregtech.common.blocks.GT_Block_Machines;
import gregtech.common.render.GT_Renderer_Block;
import gtPlusPlus.xmod.gregtech.common.blocks.GTPP_Block_Machines;
import gtPlusPlus.xmod.gregtech.common.helpers.GT_MethodHelper;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import org.lwjgl.opengl.GL11;
public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
@@ -28,8 +30,8 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
RenderingRegistry.registerBlockHandler(this);
}
- private static ITexture[] getTexture(
- IMetaTileEntity arg0, int arg1, int arg2, int arg3, boolean arg4, boolean arg5) {
+ private static ITexture[] getTexture(IMetaTileEntity arg0, int arg1, int arg2, int arg3, boolean arg4,
+ boolean arg5) {
IGregTechTileEntity arg0b = arg0.getBaseMetaTileEntity();
return arg0.getTexture(arg0b, (byte) arg1, (byte) arg2, (byte) arg3, arg4, arg5);
}
@@ -43,8 +45,8 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
if (tMetaTileEntity.getBaseMetaTileEntity() instanceof IPipeRenderedTileEntity) {
- float tThickness =
- ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity()).getThickNess();
+ float tThickness = ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity())
+ .getThickNess();
float sp = (1.0F - tThickness) / 2.0F;
aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness);
aRenderer.setRenderBoundsFromBlock(aBlock);
@@ -202,24 +204,29 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
}
}
- public static boolean renderStandardBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
+ public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock,
+ RenderBlocks aRenderer) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof ITexturedTileEntity
- ? renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][] {
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 0),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 1),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 2),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 3),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 4),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 5)
- })
+ ? renderStandardBlock(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ aBlock,
+ aRenderer,
+ new ITexture[][] { GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 0),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 1),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 2),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 3),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 4),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 5) })
: false;
}
- public static boolean renderStandardBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) {
+ public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock,
+ RenderBlocks aRenderer, ITexture[][] aTextures) {
aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
aRenderer.setRenderBoundsFromBlock(aBlock);
renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true);
@@ -231,14 +238,8 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
return true;
}
- public static boolean renderPipeBlock(
- IBlockAccess aWorld,
- int aX,
- int aY,
- int aZ,
- Block aBlock,
- IPipeRenderedTileEntity aTileEntity,
- RenderBlocks aRenderer) {
+ public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock,
+ IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) {
byte aConnections = aTileEntity.getConnections();
if ((aConnections & 192) != 0) {
return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer);
@@ -564,22 +565,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
}
}
- public static void renderNegativeYFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ));
}
if (aIcon != null) {
@@ -593,22 +587,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderPositiveYFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ));
}
if (aIcon != null) {
@@ -622,22 +609,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderNegativeZFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ));
}
aRenderer.flipTexture = !aFullBlock;
@@ -652,22 +632,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderPositiveZFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ));
}
if (aIcon != null) {
@@ -681,22 +654,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderNegativeXFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ));
}
if (aIcon != null) {
@@ -710,22 +676,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderPositiveXFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ));
}
aRenderer.flipTexture = !aFullBlock;
@@ -743,8 +702,7 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) {
aMeta += 30400;
if (aBlock instanceof GT_Block_Machines || aBlock instanceof GTPP_Block_Machines) {
- if (aMeta > 0
- && aMeta < GregTech_API.METATILEENTITIES.length
+ if (aMeta > 0 && aMeta < GregTech_API.METATILEENTITIES.length
&& GregTech_API.METATILEENTITIES[aMeta] != null
&& !GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer)) {
renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer);
@@ -755,21 +713,25 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
}
- public boolean renderWorldBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) {
+ public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID,
+ RenderBlocks aRenderer) {
TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- return aTileEntity == null
- ? false
+ return aTileEntity == null ? false
: (aTileEntity instanceof IGregTechTileEntity
- && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null
- && ((IGregTechTileEntity) aTileEntity)
- .getMetaTileEntity()
- .renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)
- ? true
- : (aTileEntity instanceof IPipeRenderedTileEntity
- ? renderPipeBlock(
- aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) aTileEntity, aRenderer)
- : renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer)));
+ && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null
+ && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity()
+ .renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)
+ ? true
+ : (aTileEntity instanceof IPipeRenderedTileEntity
+ ? renderPipeBlock(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ aBlock,
+ (IPipeRenderedTileEntity) aTileEntity,
+ aRenderer)
+ : renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer)));
}
public boolean shouldRender3DInInventory(int aModel) {