Added config for disabling connected textures

This commit is contained in:
modmuss50 2015-10-02 21:09:57 +01:00
parent 146deb0e8b
commit c30633b5d3
4 changed files with 25 additions and 2 deletions

View file

@ -18,6 +18,7 @@ import net.minecraft.world.World;
import techreborn.client.TechRebornCreativeTab;
import techreborn.client.texture.ConnectedTexture;
import techreborn.client.texture.CasingConnectedTextureGenerator;
import techreborn.config.ConfigTechReborn;
import techreborn.tiles.TileMachineCasing;
import java.util.List;
@ -70,6 +71,15 @@ public class BlockMachineCasing extends BlockMultiblockBase {
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.icons = new IIcon[types.length][16];
if(!ConfigTechReborn.useConnectedTextures){
for (int i = 0; i < types.length; i++) {
for (int j = 0; j < 15; j++) {
icons[i][j] = iconRegister.registerIcon("techreborn:" + "machine/casing"
+ types[i]);
}
}
return;
}
for (int i = 0; i < types.length; i++) {
// up down left right
icons[i][0] = genIcon(new ConnectedTexture(true, true, true, true), iconRegister, 0, i);

View file

@ -16,6 +16,7 @@ import net.minecraft.world.World;
import techreborn.blocks.BlockMachineBase;
import techreborn.client.texture.ConnectedTexture;
import techreborn.client.texture.LesuConnectedTextureGenerator;
import techreborn.config.ConfigTechReborn;
import techreborn.tiles.lesu.TileLesuStorage;
public class BlockLesuStorage extends BlockMachineBase {
@ -32,6 +33,13 @@ public class BlockLesuStorage extends BlockMachineBase {
public void registerBlockIcons(IIconRegister iconRegister) {
this.icons = new IIcon[1][16];
// up down left right
if(!ConfigTechReborn.useConnectedTextures){
for (int j = 0; j < 15; j++) {
icons[0][j] = iconRegister.registerIcon("techreborn:" + "machine/lesu_block");
}
return;
}
int i = 0;
icons[i][0] = genIcon(new ConnectedTexture(true, true, true, true), iconRegister, 0, i);
icons[i][1] = genIcon(new ConnectedTexture(true, false, true, true), iconRegister, 1, i);

View file

@ -15,7 +15,6 @@ public class ConfigTechReborn {
public static String CATEGORY_EMC = "emc";
public static String CATEGORY_INTEGRATION = "Integration";
// WORLDGEN
public static boolean GalenaOreTrue;
public static int GalenaOreRare;
@ -162,6 +161,7 @@ public class ConfigTechReborn {
// Client
public static boolean ShowChargeHud;
public static boolean useConnectedTextures;
public static Configuration config;
@ -663,11 +663,14 @@ public class ConfigTechReborn {
.getBoolean(true);
UUrecipesAluminumDust = config.get(CATEGORY_UU, StatCollector.translateToLocal("config.techreborn.allow.UUrecipesAluminumDust"),
true, StatCollector.translateToLocal("config.techreborn.allow.UUrecipesAluminumDust.tooltip")).getBoolean(true);
true, StatCollector.translateToLocal("config.techreborn.allow.UUrecipesAluminumDust.tooltip")).getBoolean(true);
ShowChargeHud = config.get(CATEGORY_POWER, StatCollector.translateToLocal("config.techreborn.showChargehud"),
true, StatCollector.translateToLocal("config.techreborn.showChargehud.tooltip")).getBoolean(true);
useConnectedTextures = config.get(CATEGORY_INTEGRATION, StatCollector.translateToLocal("config.techreborn.connectTextures"),
true, StatCollector.translateToLocal("config.techreborn.connectTextures.tooltip")).getBoolean(true);
//Integration
AllowBOPRecipes = config.get(CATEGORY_INTEGRATION, StatCollector.translateToLocal("config.techreborn.allowBopRecipes"),
true, StatCollector.translateToLocal("config.techreborn.allowBopRecipes.tooltip")).getBoolean(true);

View file

@ -802,6 +802,8 @@ config.techreborn.enableRF=Enable RF support
config.techreborn.enableRF.tooltip= Enable RF support for all machines.
config.techreborn.enableEU=Enable EU support
config.techreborn.enableEU.tooltip= Enable EU support for all machines.
config.techreborn.connectTextures=Enable Connected textures
config.techreborn.connectTextures.tooltip= Enable Connected textures
#ConfigGui
config.techreborn.category.general=General Configs