mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-25 06:24:24 +00:00
#447 Added some debug config options to help track down rendering issue.
This commit is contained in:
1 parent
002fbccb8f
commit
9f0937dac1
2 files changed
+26
-3
No files matched your search
@@ -59,6 +59,12 @@ public final class Config {
|
||||
|
||||
public static int fluidConduitMaxIoRate = 200;
|
||||
|
||||
public static boolean renderCapBankGauge = true;
|
||||
|
||||
public static boolean renderCapBankGaugeBackground = true;
|
||||
|
||||
public static boolean renderCapBankGaugeLevel = true;
|
||||
|
||||
public static void load(FMLPreInitializationEvent event) {
|
||||
configDirectory = new File(event.getModConfigurationDirectory(), "enderio");
|
||||
if(!configDirectory.exists()) {
|
||||
@@ -173,6 +179,16 @@ public final class Config {
|
||||
useSneakMouseWheelYetaWrench = true;
|
||||
}
|
||||
|
||||
//TODO: Debug
|
||||
renderCapBankGauge = config.get("Debug", "renderCapBankGauge", renderCapBankGauge, "If not true capacitor banks will not render the level gauge at all.")
|
||||
.getBoolean(renderCapBankGauge);
|
||||
renderCapBankGaugeBackground = config.get("Debug", "renderCapBankGaugeBackground", renderCapBankGaugeBackground,
|
||||
"If not true capacitor banks will not render the level gauge background.")
|
||||
.getBoolean(renderCapBankGaugeBackground);
|
||||
renderCapBankGaugeLevel = config.get("Debug", "renderCapBankGaugeLevel", renderCapBankGaugeLevel,
|
||||
"If not true capacitor banks will not render the level on the gauge.")
|
||||
.getBoolean(renderCapBankGaugeLevel);
|
||||
|
||||
}
|
||||
|
||||
private Config() {
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import crazypants.enderio.Config;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.machine.power.GaugeBounds.VPos;
|
||||
import crazypants.render.ConnectedTextureRenderer;
|
||||
@@ -41,7 +42,9 @@ public class CapBankRenderer2 implements ISimpleBlockRenderingHandler {
|
||||
|
||||
GaugueRenderer gaugeRenderer = new GaugueRenderer();
|
||||
renderers.add(connectedTexRenderer);
|
||||
renderers.add(gaugeRenderer);
|
||||
if(Config.renderCapBankGauge) {
|
||||
renderers.add(gaugeRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,8 +110,12 @@ public class CapBankRenderer2 implements ISimpleBlockRenderingHandler {
|
||||
col.scale(0.25);
|
||||
tes.setColorRGBA_F(col.x, col.y, col.z, col.w);
|
||||
}
|
||||
renderGaugeOnFace(gb, EnderIO.blockCapacitorBank.overlayIcon, refVertices, x, y, z);
|
||||
renderFillBarOnFace(gb, EnderIO.blockCapacitorBank.fillBarIcon, ((TileCapacitorBank) te).getEnergyStoredRatio(), refVertices, x, y, z);
|
||||
if(Config.renderCapBankGaugeBackground) {
|
||||
renderGaugeOnFace(gb, EnderIO.blockCapacitorBank.overlayIcon, refVertices, x, y, z);
|
||||
}
|
||||
if(Config.renderCapBankGaugeLevel) {
|
||||
renderFillBarOnFace(gb, EnderIO.blockCapacitorBank.fillBarIcon, ((TileCapacitorBank) te).getEnergyStoredRatio(), refVertices, x, y, z);
|
||||
}
|
||||
tes.addTranslation((float) -x, (float) -y, (float) -z);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user