Uninsulated cable Sound/Particle/Damage configs
This commit is contained in:
parent
29c43ddd99
commit
60ae28ad49
2 changed files with 31 additions and 4 deletions
|
@ -77,9 +77,13 @@ public class ConfigTechReborn {
|
||||||
public static boolean TinIngotsLoot;
|
public static boolean TinIngotsLoot;
|
||||||
|
|
||||||
public static boolean CopperIngotsLoot;
|
public static boolean CopperIngotsLoot;
|
||||||
|
|
||||||
public static boolean SteelIngotsLoot;
|
public static boolean SteelIngotsLoot;
|
||||||
|
|
||||||
|
public static boolean UninsulatedElectocutionSound;
|
||||||
|
public static boolean UninsulatedElectocutionParticle;
|
||||||
|
public static boolean UninsulatedElectocutionDamage;
|
||||||
|
|
||||||
// Power
|
// Power
|
||||||
public static int ThermalGenertaorOutput;
|
public static int ThermalGenertaorOutput;
|
||||||
public static int CentrifugeInputTick;
|
public static int CentrifugeInputTick;
|
||||||
|
@ -677,6 +681,22 @@ public class ConfigTechReborn {
|
||||||
oreUnifer = config.get(CATEGORY_INTEGRATION, "OreUnifer", false, "change all ores int TechReborn Ores")
|
oreUnifer = config.get(CATEGORY_INTEGRATION, "OreUnifer", false, "change all ores int TechReborn Ores")
|
||||||
.getBoolean(false);
|
.getBoolean(false);
|
||||||
|
|
||||||
|
|
||||||
|
UninsulatedElectocutionDamage = config
|
||||||
|
.get(CATEGORY_WORLD, "Uninsulated Electocution Damage", true, "Damage entities on contact with uninsulated cables")
|
||||||
|
.getBoolean(true);
|
||||||
|
UninsulatedElectocutionSound = config
|
||||||
|
.get(CATEGORY_WORLD, "Uninsulated Electocution Sound", true, "Play sound on contact with uninsulated cables")
|
||||||
|
.getBoolean(true);
|
||||||
|
UninsulatedElectocutionParticle = config
|
||||||
|
.get(CATEGORY_WORLD, "Uninsulated Electocution Particle", true, "Spawn particles on contact with uninsulated cables")
|
||||||
|
.getBoolean(true);
|
||||||
|
|
||||||
|
ExpensiveWatermill = config
|
||||||
|
.get(CATEGORY_CRAFTING, "Expensive Watermill", true, "Allow TechReborn to change the Watermill recipe")
|
||||||
|
.getBoolean(true);
|
||||||
|
|
||||||
|
|
||||||
// Integration
|
// Integration
|
||||||
AllowBOPRecipes = config.get(CATEGORY_INTEGRATION, "Allow Bop Recipes", true, "Add BOP suport")
|
AllowBOPRecipes = config.get(CATEGORY_INTEGRATION, "Allow Bop Recipes", true, "Add BOP suport")
|
||||||
.getBoolean(true);
|
.getBoolean(true);
|
||||||
|
|
|
@ -25,6 +25,7 @@ import net.minecraftforge.common.property.Properties;
|
||||||
import reborncore.api.power.IEnergyInterfaceTile;
|
import reborncore.api.power.IEnergyInterfaceTile;
|
||||||
import reborncore.common.misc.Functions;
|
import reborncore.common.misc.Functions;
|
||||||
import reborncore.common.misc.vecmath.Vecs3dCube;
|
import reborncore.common.misc.vecmath.Vecs3dCube;
|
||||||
|
import techreborn.config.ConfigTechReborn;
|
||||||
import techreborn.parts.walia.IPartWaliaProvider;
|
import techreborn.parts.walia.IPartWaliaProvider;
|
||||||
import techreborn.power.TRPowerNet;
|
import techreborn.power.TRPowerNet;
|
||||||
import techreborn.utils.damageSources.ElectrialShockSource;
|
import techreborn.utils.damageSources.ElectrialShockSource;
|
||||||
|
@ -307,9 +308,15 @@ public abstract class CableMultipart extends Multipart implements IOccludingPart
|
||||||
@Override
|
@Override
|
||||||
public void onEntityCollided(Entity entity) {
|
public void onEntityCollided(Entity entity) {
|
||||||
if (getCableType().canKill && entity instanceof EntityLivingBase) {
|
if (getCableType().canKill && entity instanceof EntityLivingBase) {
|
||||||
entity.attackEntityFrom(new ElectrialShockSource(), 1F);
|
if(ConfigTechReborn.UninsulatedElectocutionDamage){
|
||||||
getWorld().playSoundAtEntity(entity, "techreborn:cable_shock", 0.6F, 1F);
|
entity.attackEntityFrom(new ElectrialShockSource(), 1F);
|
||||||
getWorld().spawnParticle(EnumParticleTypes.CRIT, entity.posX, entity.posY, entity.posZ, 0, 0, 0);
|
}
|
||||||
|
if(ConfigTechReborn.UninsulatedElectocutionSound){
|
||||||
|
getWorld().playSoundAtEntity(entity, "techreborn:cable_shock", 0.6F, 1F);
|
||||||
|
}
|
||||||
|
if(ConfigTechReborn.UninsulatedElectocutionParticle){
|
||||||
|
getWorld().spawnParticle(EnumParticleTypes.CRIT, entity.posX, entity.posY, entity.posZ, 0, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue