Fix sounds

This commit is contained in:
modmuss50 2016-05-08 11:42:59 +01:00
parent 9c6e9aef64
commit caaa5a3e7f
6 changed files with 36 additions and 26 deletions

View file

@ -30,6 +30,7 @@ import reborncore.common.misc.Functions;
import reborncore.common.misc.vecmath.Vecs3dCube;
import reborncore.common.util.WorldUtils;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModSounds;
import techreborn.parts.walia.IPartWaliaProvider;
import techreborn.power.TRPowerNet;
import techreborn.utils.damageSources.ElectrialShockSource;
@ -305,9 +306,6 @@ public abstract class CableMultipart extends Multipart
@Override
public void onEntityCollided(Entity entity) {
if (getCableType().canKill && entity instanceof EntityLivingBase) {
if (entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode) {
} else {
if (network != null) {
if (network.getEnergy() != 0) {
if (ConfigTechReborn.UninsulatedElectocutionDamage) {
@ -318,9 +316,9 @@ public abstract class CableMultipart extends Multipart
entity.attackEntityFrom(new ElectrialShockSource(), 1F);
}
if (ConfigTechReborn.UninsulatedElectocutionSound) {
// getWorld().playSound(entity.posX, entity.posY,
// entity.posZ, ModSounds.shock,
// SoundCategory.BLOCKS, 0.6F, 1F, false);
getWorld().playSound(null, entity.posX, entity.posY,
entity.posZ, ModSounds.shock,
SoundCategory.BLOCKS, 0.6F, 1F);
}
if (ConfigTechReborn.UninsulatedElectocutionParticle) {
getWorld().spawnParticle(EnumParticleTypes.CRIT, entity.posX, entity.posY, entity.posZ, 0,
@ -328,7 +326,6 @@ public abstract class CableMultipart extends Multipart
}
}
}
}
}
}