Skip to content

Commit 79fe302

Browse files
committed
Disabled translucent overlays with a config toggle until the FalseTweaks fix improves
- The implementation works fine (most of the time) But currently breaks with BSL. A fix is on the way, but the next nightly will ship without it until a fix is done and more textures are made.
1 parent 38052ad commit 79fe302

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

src/main/java/gregtech/GT_Mod.java

+2
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ public void onPreLoad(FMLPreInitializationEvent aEvent) {
378378
}
379379
);
380380
gregtechproxy.mRenderTileAmbientOcclusion = GregTech_API.sClientDataFile.get("render", "TileAmbientOcclusion", true);
381+
// TODO: [VEN] Currently disabled, set to 'true' once the FalseTweaks translucent block implementation is done.
382+
gregtechproxy.mRenderTileTranslucentPass = GregTech_API.sClientDataFile.get("render", "TileTranslucentPass", false);
381383
gregtechproxy.mRenderFlippedMachinesFlipped = GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true);
382384
gregtechproxy.mRenderIndicatorsOnHatch = GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true);
383385
gregtechproxy.mTooltipVerbosity = GregTech_API.sClientDataFile.get("interface", "TooltipVerbosity", 2);

src/main/java/gregtech/common/GT_Proxy.java

+7
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
228228
*/
229229
public boolean mRenderTileAmbientOcclusion = true;
230230

231+
/**
232+
* This enables rendering certain blocks in both an opaque and translucent pass
233+
* <p>
234+
* TODO: [VEN] Currently disabled, set to 'true' once the FalseTweaks translucent block implementation is done.
235+
*/
236+
public boolean mRenderTileTranslucentPass = false;
237+
231238
/**
232239
* Render flipped textures
233240
*/

src/main/java/gregtech/common/blocks/GT_Block_Machines.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import cpw.mods.fml.relauncher.Side;
44
import cpw.mods.fml.relauncher.SideOnly;
5+
import gregtech.GT_Mod;
56
import gregtech.api.GregTech_API;
67
import gregtech.api.enums.Textures;
78
import gregtech.api.interfaces.IDebugableBlock;
@@ -763,12 +764,16 @@ public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirectio
763764
@Override
764765
@SideOnly(Side.CLIENT)
765766
public int getRenderBlockPass() {
766-
return 1;// One here means both (more or less)
767+
if (GT_Mod.gregtechproxy.mRenderTileTranslucentPass)
768+
return 1;// One here means both (more or less)
769+
return super.getRenderBlockPass();
767770
}
768771

769772
@Override
770773
@SideOnly(Side.CLIENT)
771774
public boolean canRenderInPass(int pass) {
772-
return pass == 0 || pass == 1;
775+
if (GT_Mod.gregtechproxy.mRenderTileTranslucentPass)
776+
return pass == 0 || pass == 1;
777+
return super.canRenderInPass(pass);
773778
}
774779
}

src/main/java/gregtech/common/render/GT_Renderer_Block.java

+2
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ public boolean renderWorldBlock(IBlockAccess world,
128128
if (renderPass == 0) {
129129
isTranslucentPass = false;
130130
} else if (renderPass == 1) {
131+
if (!GT_Mod.gregtechproxy.mRenderTileTranslucentPass)
132+
return false;
131133
isTranslucentPass = true;
132134
} else {
133135
return false; // Don't render anything, something went wrong! Can't log either because it would do another A2 fr fr...

0 commit comments

Comments
 (0)