Added sound configuration
This commit is contained in:
parent
05eca54839
commit
ba0494c624
2 changed files with 4 additions and 2 deletions
|
@ -81,6 +81,7 @@ public class ResonantInduction
|
||||||
*/
|
*/
|
||||||
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), NAME + ".cfg"));
|
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), NAME + ".cfg"));
|
||||||
public static float POWER_PER_COAL = 8;
|
public static float POWER_PER_COAL = 8;
|
||||||
|
public static boolean SOUND_FXS = true;
|
||||||
|
|
||||||
/** Block ID by Jyzarc */
|
/** Block ID by Jyzarc */
|
||||||
private static final int BLOCK_ID_PREFIX = 3200;
|
private static final int BLOCK_ID_PREFIX = 3200;
|
||||||
|
@ -116,6 +117,7 @@ public class ResonantInduction
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
POWER_PER_COAL = (float) CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Coal Wattage", POWER_PER_COAL).getDouble(POWER_PER_COAL);
|
POWER_PER_COAL = (float) CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Coal Wattage", POWER_PER_COAL).getDouble(POWER_PER_COAL);
|
||||||
|
SOUND_FXS = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Tesla Sound FXs", SOUND_FXS).getBoolean(SOUND_FXS);
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
itemQuantumEntangler = new ItemQuantumEntangler(getNextItemID());
|
itemQuantumEntangler = new ItemQuantumEntangler(getNextItemID());
|
||||||
|
|
|
@ -148,7 +148,7 @@ public class TileEntityTesla extends TileEntityBase implements ITesla, IPacketRe
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (ITesla tesla : transferTeslaCoils)
|
for (ITesla tesla : transferTeslaCoils)
|
||||||
{
|
{
|
||||||
if (this.zapCounter % 5 == 0)
|
if (this.zapCounter % 5 == 0 && ResonantInduction.SOUND_FXS)
|
||||||
{
|
{
|
||||||
this.worldObj.playSoundEffect(this.xCoord + 0.5, this.yCoord + 0.5, this.zCoord + 0.5, ResonantInduction.PREFIX + "electricshock", this.getEnergyStored() / 25, (float) (1.3f - 0.5f * ((float) this.dyeID / 16f)));
|
this.worldObj.playSoundEffect(this.xCoord + 0.5, this.yCoord + 0.5, this.zCoord + 0.5, ResonantInduction.PREFIX + "electricshock", this.getEnergyStored() / 25, (float) (1.3f - 0.5f * ((float) this.dyeID / 16f)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue