Better laserSend event
Added bream frequency and energy to laserSend event
This commit is contained in:
parent
a423c6d180
commit
687ced4225
1 changed files with 3 additions and 2 deletions
|
@ -92,9 +92,10 @@ public class TileEntityLaser extends WarpTE implements IPeripheral {
|
|||
if (isEmitting && ((beamFrequency != 1420 && delayTicks > WarpDriveConfig.LE_EMIT_DELAY_TICKS) || ((beamFrequency == 1420) && delayTicks > WarpDriveConfig.LE_EMIT_SCAN_DELAY_TICKS))) {
|
||||
delayTicks = 0;
|
||||
isEmitting = false;
|
||||
emitBeam(Math.min(this.consumeEnergyFromBoosters() + MathHelper.floor_double(energyFromOtherBeams * WarpDriveConfig.LE_COLLECT_ENERGY_MULTIPLIER), WarpDriveConfig.LE_MAX_LASER_ENERGY));
|
||||
int beamEnergy = Math.min(this.consumeEnergyFromBoosters() + MathHelper.floor_double(energyFromOtherBeams * WarpDriveConfig.LE_COLLECT_ENERGY_MULTIPLIER), WarpDriveConfig.LE_MAX_LASER_ENERGY);
|
||||
emitBeam(beamEnergy);
|
||||
energyFromOtherBeams = 0;
|
||||
sendEvent("laserSend", null);
|
||||
sendEvent("laserSend", new Object[] { beamFrequency, beamEnergy });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue