#900 different texture for quite clear glass. Fix outer corner render.

This commit is contained in:
tterrag1098 committed 2014-11-19 17:23:20 -05:00
1 parent 7ef320fa72
commit 3c781798f6
6 files changed
+26 -4

No files matched your search

@@ -369,6 +369,9 @@ public final class Config {
public static boolean enderRailTeleportPlayers = false;
public static int xpObeliskMaxXpLevel = Integer.MAX_VALUE;
public static boolean clearGlassSameTexture = false;
public static boolean clearGlassConnectToFusedQuartz = false;
public static void load(FMLPreInitializationEvent event) {
@@ -988,6 +991,9 @@ public final class Config {
"When set to true a list of all registered mobs will be dumped to config/enderio/mobTypes.txt The names are in the format required by EIOs mob blacklists.");
xpObeliskMaxXpLevel = config.get("xpObeliskMaxXpLevel", sectionMisc.name, xpObeliskMaxXpLevel, "Maximum level of XP the xp obelisk can contain.").getInt();
clearGlassSameTexture = config.get("clearGlassSameTexture", sectionMisc.name, clearGlassSameTexture, "If true, quite clear glass will use the fused quartz border texture for the block instead of the white border.").getBoolean();
clearGlassConnectToFusedQuartz = config.get("clearGlassConnectToFusedQuartz", sectionMisc.name, clearGlassConnectToFusedQuartz, "If true, quite clear glass will connect textures with fused quartz.").getBoolean();
}
private Config() {
@@ -22,6 +22,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import crazypants.enderio.BlockEio;
import crazypants.enderio.EnderIO;
import crazypants.enderio.ModObject;
import crazypants.enderio.config.Config;
import crazypants.enderio.machine.painter.PainterUtil;
import crazypants.enderio.machine.painter.TileEntityPaintedBlock;
@@ -32,9 +33,9 @@ public class BlockFusedQuartz extends BlockEio {
public enum Type {
FUSED_QUARTZ("fusedQuartz", "enderio:fusedQuartz", "enderio:fusedQuartzFrame", "enderio:fusedQuartzItem"),
GLASS("fusedGlass", "enderio:fusedGlass", "enderio:fusedGlassFrame", "enderio:fusedGlassItem"),
GLASS("fusedGlass", "enderio:fusedGlass", Config.clearGlassSameTexture ? "enderio:fusedQuartzFrame" : "enderio:fusedGlassFrame", "enderio:fusedGlassItem"),
ENLIGHTENED_FUSED_QUARTZ("enlightenedFusedQuartz", "enderio:fusedQuartz", "enderio:fusedQuartzFrame", "enderio:fusedQuartzItem"),
ENLIGHTENED_GLASS("enlightenedFusedGlass", "enderio:fusedGlass", "enderio:fusedGlassFrame", "enderio:fusedGlassItem");
ENLIGHTENED_GLASS("enlightenedFusedGlass", "enderio:fusedGlass", Config.clearGlassSameTexture ? "enderio:fusedQuartzFrame" : "enderio:fusedGlassFrame", "enderio:fusedGlassItem");
final String unlocalisedName;
final String blockIcon;
@@ -11,6 +11,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import crazypants.enderio.EnderIO;
import crazypants.enderio.config.Config;
import crazypants.enderio.machine.painter.PainterUtil;
import crazypants.enderio.machine.painter.TileEntityPaintedBlock;
import crazypants.render.ConnectedTextureRenderer;
@@ -24,6 +25,10 @@ public class FusedQuartzRenderer implements ISimpleBlockRenderingHandler {
private ConnectedTextureRenderer connectedTextureRenderer = new ConnectedTextureRenderer();
public FusedQuartzRenderer() {
connectedTextureRenderer.setMatchMeta(!Config.clearGlassConnectToFusedQuartz);
}
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
renderer.setOverrideBlockTexture(EnderIO.blockFusedQuartz.getItemIcon(metadata));
@@ -256,11 +256,11 @@ public class ConnectedTextureRenderer implements IRenderFace {
BlockCoord bc = new BlockCoord((int) x, (int) y, (int) z);
BlockCoord testLoc = bc.getLocation(dir);
if(RenderUtil.getNonConectedEdgesForFace(blockAccess, testLoc.x, testLoc.y, testLoc.z, face).contains(dir2)) {
if(RenderUtil.getNonConectedEdgesForFace(blockAccess, testLoc.x, testLoc.y, testLoc.z, face, matchMetaData).contains(dir2)) {
return true;
}
testLoc = bc.getLocation(dir2);
if(RenderUtil.getNonConectedEdgesForFace(blockAccess, testLoc.x, testLoc.y, testLoc.z, face).contains(dir)) {
if(RenderUtil.getNonConectedEdgesForFace(blockAccess, testLoc.x, testLoc.y, testLoc.z, face, matchMetaData).contains(dir)) {
return true;
}
return false;