Removed volume boost from laser effects

This commit is contained in:
LemADEC 2022-04-14 12:23:13 +02:00
parent 50072e4469
commit 73fe06830c
6 changed files with 17 additions and 17 deletions

View file

@ -719,11 +719,11 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
private void playSoundCorrespondsEnergy(final int energy) {
if (energy <= 500000) {
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.HOSTILE, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.HOSTILE, 1.0F, 1.0F);
} else if (energy <= 1000000) {
world.playSound(null, pos, SoundEvents.LASER_MEDIUM, SoundCategory.HOSTILE, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_MEDIUM, SoundCategory.HOSTILE, 1.0F, 1.0F);
} else {
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.HOSTILE, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.HOSTILE, 1.0F, 1.0F);
}
}

View file

@ -169,7 +169,7 @@ public class TileEntityShipScanner extends TileEntityAbstractMachine implements
final int randomY = shipCore.minY + world.rand.nextInt(shipCore.maxY - shipCore.minY + 1);
final int randomZ = shipCore.minZ + world.rand.nextInt(shipCore.maxZ - shipCore.minZ + 1);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 1F);
final float r = world.rand.nextFloat() - world.rand.nextFloat();
final float g = world.rand.nextFloat() - world.rand.nextFloat();
final float b = world.rand.nextFloat() - world.rand.nextFloat();

View file

@ -257,19 +257,19 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
}
if (!blockPosSoils.isEmpty() && !InventoryWrapper.getConnectedInventories(world, pos).isEmpty()) {
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
currentState = STATE_PLANTING;
tickCurrentTask = WarpDriveConfig.TREE_FARM_PLANT_DELAY_TICKS;
return;
} else if (!blockPosValuables.isEmpty()) {
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
currentState = STATE_HARVESTING;
tickCurrentTask = WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS;
return;
} else {
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
currentState = STATE_WARMING_UP;
tickCurrentTask = WarpDriveConfig.TREE_FARM_WARM_UP_DELAY_TICKS;
return;
@ -466,7 +466,7 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
final int age = Math.max(10, Math.round((4 + world.rand.nextFloat()) * WarpDriveConfig.MINING_LASER_MINE_DELAY_TICKS));
PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosPlant).translate(0.5D),
0.2F, 0.7F, 0.4F, age, 0, 50);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.35F + 0.30F * world.rand.nextFloat());
world.setBlockState(blockPosPlant, blockStatePlant, 3);
tickCurrentTask = WarpDriveConfig.TREE_FARM_PLANT_DELAY_TICKS;
@ -510,7 +510,7 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
final int age = Math.max(10, Math.round((4 + world.rand.nextFloat()) * WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS));
PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
0.8F, 0.8F, 0.2F, age, 0, 50);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4F, 0.5F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.35F + 0.30F * world.rand.nextFloat());
world.setBlockState(blockPosValuable, blockStateValuable.getBlock().getStateFromMeta(metadata + 6), 3);
@ -545,7 +545,7 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
final int age = Math.max(10, Math.round((4 + world.rand.nextFloat()) * WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS));
PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
0.8F, 0.8F, 0.2F, age, 0, 50);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4F, 0.5F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.35F + 0.30F * world.rand.nextFloat());
world.setBlockToAir(blockPosValuable);
@ -568,7 +568,7 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
final int age = Math.max(10, Math.round((4 + world.rand.nextFloat()) * WarpDriveConfig.MINING_LASER_MINE_DELAY_TICKS));
PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
0.2F, 0.7F, 0.4F, age, 0, 50);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
harvestBlock(blockPosValuable, blockStateValuable);

View file

@ -222,7 +222,7 @@ public class TileEntityMiningLaser extends TileEntityAbstractMiner {
// scan
scanLayer();
if (blockPosValuables.isEmpty()) {
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
currentLayer--;
tickCurrentTask = WarpDriveConfig.MINING_LASER_SCAN_DELAY_TICKS;
return;
@ -242,7 +242,7 @@ public class TileEntityMiningLaser extends TileEntityAbstractMiner {
0.0F, 0.0F, 1.0F, age, 0, 50);
PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(pos.getX() - r, y, pos.getZ() - r + offset).translate(0.3D),
0.0F, 0.0F, 1.0F, age, 0, 50);
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.BLOCKS, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
}
// switch to mining
@ -294,7 +294,7 @@ public class TileEntityMiningLaser extends TileEntityAbstractMiner {
final int age = Math.max(10, Math.round((4 + world.rand.nextFloat()) * WarpDriveConfig.MINING_LASER_MINE_DELAY_TICKS));
PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
1.0F, 1.0F, 0.0F, age, 0, 50);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_LOW, SoundCategory.BLOCKS, 1.0F, 0.85F + 0.30F * world.rand.nextFloat());
}
harvestBlock(blockPosValuable, blockStateValuable);
break;

View file

@ -173,7 +173,7 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyCoreOrContro
minX, minY, minZ, maxX, maxY, maxZ);
if (!soundPlayed) {
soundPlayed = true;
world.playSound(null, pos, SoundEvents.CLOAK, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.CLOAK, SoundCategory.BLOCKS, 4.0F, 1F);
}
// start cloaking
@ -535,7 +535,7 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyCoreOrContro
if (!soundPlayed) {
soundPlayed = true;
world.playSound(null, pos, SoundEvents.DECLOAK, SoundCategory.BLOCKS, 4F, 1F);
world.playSound(null, pos, SoundEvents.DECLOAK, SoundCategory.BLOCKS, 4.0F, 1F);
}
}
}

View file

@ -235,7 +235,7 @@ public class TileEntityLift extends TileEntityAbstractEnergyConsumer implements
new Vector3(pos.getX() + 0.5D, firstUncoveredY, pos.getZ() + 0.5D),
1.0F, 1.0F, 0.0F, 40, 0, 100);
}
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.AMBIENT, 4.0F, 1.0F);
world.playSound(null, pos, SoundEvents.LASER_HIGH, SoundCategory.AMBIENT, 1.0F, 1.0F);
energy_consume(WarpDriveConfig.LIFT_ENERGY_PER_ENTITY, false);
isTransferDone = true;
}