Hard coded config path into blocks

Not really a reason why i had a var on the constructor to change the
config path.
This commit is contained in:
DarkGuardsman 2013-09-08 02:28:51 -04:00
parent a02246c163
commit c3730acf8e
5 changed files with 12 additions and 11 deletions

View file

@ -182,10 +182,10 @@ public class DarkMain extends ModPrefab
/* CONFIGS */ /* CONFIGS */
CONFIGURATION.load(); CONFIGURATION.load();
/* BLOCKS */ /* BLOCKS */
blockMulti = new BlockMulti(DarkMain.CONFIGURATION.getBlock("MultiBlock", getNextID()).getInt()); blockMulti = new BlockMulti(getNextID());
CoreRecipeLoader.blockOre = new BlockOre(getNextID(), CONFIGURATION); CoreRecipeLoader.blockOre = new BlockOre(getNextID());
CoreRecipeLoader.blockWire = new BlockWire(CONFIGURATION, getNextID()); CoreRecipeLoader.blockWire = new BlockWire(getNextID());
CoreRecipeLoader.blockDebug = new BlockDebug(getNextID(), CONFIGURATION); CoreRecipeLoader.blockDebug = new BlockDebug(getNextID());
CoreRecipeLoader.blockStainGlass = new BlockColorGlass(getNextID(), "StainedGlass"); CoreRecipeLoader.blockStainGlass = new BlockColorGlass(getNextID(), "StainedGlass");
CoreRecipeLoader.blockColorSand = new BlockColorSand(getNextID()); CoreRecipeLoader.blockColorSand = new BlockColorSand(getNextID());
CoreRecipeLoader.blockBasalt = new BlockBasalt(getNextID()); CoreRecipeLoader.blockBasalt = new BlockBasalt(getNextID());

View file

@ -24,9 +24,9 @@ public class BlockOre extends Block implements IExtraObjectInfo
{ {
Icon[] icons = new Icon[EnumMeterials.values().length]; Icon[] icons = new Icon[EnumMeterials.values().length];
public BlockOre(int par1, Configuration config) public BlockOre(int par1)
{ {
super(config.getBlock("Ore", par1).getInt(), Material.rock); super(DarkMain.CONFIGURATION.getBlock("Ore", par1).getInt(), Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock); this.setCreativeTab(CreativeTabs.tabBlock);
this.setUnlocalizedName(DarkMain.getInstance().PREFIX + "Ore"); this.setUnlocalizedName(DarkMain.getInstance().PREFIX + "Ore");
} }

View file

@ -22,9 +22,9 @@ public class BlockDebug extends BlockMachine implements IExtraObjectInfo
{ {
public static float DebugWattOut, DebugWattDemand; public static float DebugWattOut, DebugWattDemand;
public BlockDebug(int blockID, Configuration config) public BlockDebug(int blockID)
{ {
super("DebugBlock", config, blockID, Material.clay); super("DebugBlock", DarkMain.CONFIGURATION, blockID, Material.clay);
this.setCreativeTab(CreativeTabs.tabRedstone); this.setCreativeTab(CreativeTabs.tabRedstone);
} }

View file

@ -29,9 +29,9 @@ public class BlockWire extends BlockMachine implements IExtraObjectInfo
public Vector3 minVector = new Vector3(0.3, 0.3, 0.3); public Vector3 minVector = new Vector3(0.3, 0.3, 0.3);
public Vector3 maxVector = new Vector3(0.7, 0.7, 0.7); public Vector3 maxVector = new Vector3(0.7, 0.7, 0.7);
public BlockWire(Configuration config, int blockID) public BlockWire(int blockID)
{ {
super("DMWire", config, blockID, Material.cloth); super("DMWire", DarkMain.CONFIGURATION, blockID, Material.cloth);
this.setStepSound(soundClothFootstep); this.setStepSound(soundClothFootstep);
this.setResistance(0.2F); this.setResistance(0.2F);
this.setHardness(0.1f); this.setHardness(0.1f);

View file

@ -14,6 +14,7 @@ import universalelectricity.core.UniversalElectricity;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
public class BlockMulti extends BlockContainer public class BlockMulti extends BlockContainer
{ {
@ -22,7 +23,7 @@ public class BlockMulti extends BlockContainer
public BlockMulti(int id) public BlockMulti(int id)
{ {
super(id, UniversalElectricity.machine); super(DarkMain.CONFIGURATION.getBlock("MultiBlock", id).getInt(), UniversalElectricity.machine);
this.setHardness(0.8F); this.setHardness(0.8F);
this.setUnlocalizedName("multiBlock"); this.setUnlocalizedName("multiBlock");
} }