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) { private void playSoundCorrespondsEnergy(final int energy) {
if (energy <= 500000) { 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) { } 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 { } 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 randomY = shipCore.minY + world.rand.nextInt(shipCore.maxY - shipCore.minY + 1);
final int randomZ = shipCore.minZ + world.rand.nextInt(shipCore.maxZ - shipCore.minZ + 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 r = world.rand.nextFloat() - world.rand.nextFloat();
final float g = world.rand.nextFloat() - world.rand.nextFloat(); final float g = world.rand.nextFloat() - world.rand.nextFloat();
final float b = 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()) { 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; currentState = STATE_PLANTING;
tickCurrentTask = WarpDriveConfig.TREE_FARM_PLANT_DELAY_TICKS; tickCurrentTask = WarpDriveConfig.TREE_FARM_PLANT_DELAY_TICKS;
return; return;
} else if (!blockPosValuables.isEmpty()) { } 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; currentState = STATE_HARVESTING;
tickCurrentTask = WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS; tickCurrentTask = WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS;
return; return;
} else { } 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; currentState = STATE_WARMING_UP;
tickCurrentTask = WarpDriveConfig.TREE_FARM_WARM_UP_DELAY_TICKS; tickCurrentTask = WarpDriveConfig.TREE_FARM_WARM_UP_DELAY_TICKS;
return; 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)); 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), PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosPlant).translate(0.5D),
0.2F, 0.7F, 0.4F, age, 0, 50); 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); world.setBlockState(blockPosPlant, blockStatePlant, 3);
tickCurrentTask = WarpDriveConfig.TREE_FARM_PLANT_DELAY_TICKS; 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)); 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), PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
0.8F, 0.8F, 0.2F, age, 0, 50); 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); 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)); 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), PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
0.8F, 0.8F, 0.2F, age, 0, 50); 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); 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)); 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), PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
0.2F, 0.7F, 0.4F, age, 0, 50); 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); harvestBlock(blockPosValuable, blockStateValuable);

View file

@ -222,7 +222,7 @@ public class TileEntityMiningLaser extends TileEntityAbstractMiner {
// scan // scan
scanLayer(); scanLayer();
if (blockPosValuables.isEmpty()) { 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--; currentLayer--;
tickCurrentTask = WarpDriveConfig.MINING_LASER_SCAN_DELAY_TICKS; tickCurrentTask = WarpDriveConfig.MINING_LASER_SCAN_DELAY_TICKS;
return; return;
@ -242,7 +242,7 @@ public class TileEntityMiningLaser extends TileEntityAbstractMiner {
0.0F, 0.0F, 1.0F, age, 0, 50); 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), 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); 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 // 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)); 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), PacketHandler.sendBeamPacket(world, laserOutput, new Vector3(blockPosValuable).translate(0.5D),
1.0F, 1.0F, 0.0F, age, 0, 50); 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); harvestBlock(blockPosValuable, blockStateValuable);
break; break;

View file

@ -173,7 +173,7 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyCoreOrContro
minX, minY, minZ, maxX, maxY, maxZ); minX, minY, minZ, maxX, maxY, maxZ);
if (!soundPlayed) { if (!soundPlayed) {
soundPlayed = true; 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 // start cloaking
@ -535,7 +535,7 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyCoreOrContro
if (!soundPlayed) { if (!soundPlayed) {
soundPlayed = true; 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), new Vector3(pos.getX() + 0.5D, firstUncoveredY, pos.getZ() + 0.5D),
1.0F, 1.0F, 0.0F, 40, 0, 100); 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); energy_consume(WarpDriveConfig.LIFT_ENERGY_PER_ENTITY, false);
isTransferDone = true; isTransferDone = true;
} }