mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-28 07:56:01 +00:00
Fix bottom face logic with Hodgepodge fix
This commit is contained in:
1 parent
2459e4305b
commit
b17a93f08c
1 file changed
+13
@@ -3,6 +3,7 @@ package tconstruct.smeltery.blocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -19,6 +20,8 @@ import tconstruct.util.config.PHConstruct;
|
||||
*/
|
||||
public class GlassBlockConnected extends MantleBlock {
|
||||
|
||||
private static final String HODGEPODGE_FIX_BOTTOM_FACE_UV = "hodgepodge.FixesConfig.fixBottomFaceUV";
|
||||
|
||||
protected IIcon[] icons = new IIcon[16];
|
||||
protected String folder;
|
||||
private final int renderPass;
|
||||
@@ -107,6 +110,12 @@ public class GlassBlockConnected extends MantleBlock {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (side == 0 && isHodgepodgeFixingBottomFaceUV()) {
|
||||
boolean isOpenLeftCopy = isOpenLeft;
|
||||
isOpenLeft = isOpenRight;
|
||||
isOpenRight = isOpenLeftCopy;
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
if (shouldConnectToBlock(
|
||||
@@ -281,6 +290,10 @@ public class GlassBlockConnected extends MantleBlock {
|
||||
return getConnectedTexture(icons, isOpenUp, isOpenDown, isOpenLeft, isOpenRight);
|
||||
}
|
||||
|
||||
private static boolean isHodgepodgeFixingBottomFaceUV() {
|
||||
return Boolean.TRUE.equals(Launch.blackboard.get(HODGEPODGE_FIX_BOTTOM_FACE_UV));
|
||||
}
|
||||
|
||||
protected IIcon getConnectedTexture(IIcon[] icons, boolean isOpenUp, boolean isOpenDown, boolean isOpenLeft,
|
||||
boolean isOpenRight) {
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) return icons[15];
|
||||
|
||||
Reference in new issue
Block a user