Code cleanup

This commit is contained in:
LemADEC 2017-05-13 17:59:39 +02:00
parent 83f99a6d8d
commit 68e0606a62
2 changed files with 4 additions and 4 deletions

View file

@ -510,14 +510,14 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
} }
@Override @Override
public void setBeamFrequency(int parBeamFrequency) { public void setBeamFrequency(final int parBeamFrequency) {
if (beamFrequency != parBeamFrequency && (parBeamFrequency <= BEAM_FREQUENCY_MAX) && (parBeamFrequency > 0)) { if (beamFrequency != parBeamFrequency && (parBeamFrequency <= BEAM_FREQUENCY_MAX) && (parBeamFrequency > BEAM_FREQUENCY_MIN)) {
if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) { if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) {
WarpDrive.logger.info(this + " Beam frequency set from " + beamFrequency + " to " + parBeamFrequency); WarpDrive.logger.info(this + " Beam frequency set from " + beamFrequency + " to " + parBeamFrequency);
} }
beamFrequency = parBeamFrequency; beamFrequency = parBeamFrequency;
} }
Vector3 vRGB = IBeamFrequency.getBeamColor(beamFrequency); final Vector3 vRGB = IBeamFrequency.getBeamColor(beamFrequency);
r = (float)vRGB.x; r = (float)vRGB.x;
g = (float)vRGB.y; g = (float)vRGB.y;
b = (float)vRGB.z; b = (float)vRGB.z;

View file

@ -87,7 +87,7 @@ public class TileEntityAbstractForceField extends TileEntityAbstractEnergy imple
@Override @Override
public void setBeamFrequency(final int parBeamFrequency) { public void setBeamFrequency(final int parBeamFrequency) {
if (beamFrequency != parBeamFrequency && (parBeamFrequency <= BEAM_FREQUENCY_MAX) && (parBeamFrequency > 0)) { if (beamFrequency != parBeamFrequency && (parBeamFrequency <= BEAM_FREQUENCY_MAX) && (parBeamFrequency > BEAM_FREQUENCY_MIN)) {
if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) { if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) {
WarpDrive.logger.info(this + " Beam frequency set from " + beamFrequency + " to " + parBeamFrequency); WarpDrive.logger.info(this + " Beam frequency set from " + beamFrequency + " to " + parBeamFrequency);
} }