diff --git a/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java b/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java index fdfd790b..345a96e9 100644 --- a/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java +++ b/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java @@ -510,14 +510,14 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre } @Override - public void setBeamFrequency(int parBeamFrequency) { - if (beamFrequency != parBeamFrequency && (parBeamFrequency <= BEAM_FREQUENCY_MAX) && (parBeamFrequency > 0)) { + public void setBeamFrequency(final int parBeamFrequency) { + if (beamFrequency != parBeamFrequency && (parBeamFrequency <= BEAM_FREQUENCY_MAX) && (parBeamFrequency > BEAM_FREQUENCY_MIN)) { if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) { WarpDrive.logger.info(this + " Beam frequency set from " + beamFrequency + " to " + parBeamFrequency); } beamFrequency = parBeamFrequency; } - Vector3 vRGB = IBeamFrequency.getBeamColor(beamFrequency); + final Vector3 vRGB = IBeamFrequency.getBeamColor(beamFrequency); r = (float)vRGB.x; g = (float)vRGB.y; b = (float)vRGB.z; diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityAbstractForceField.java b/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityAbstractForceField.java index 937e888d..fd5e116f 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityAbstractForceField.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/TileEntityAbstractForceField.java @@ -87,7 +87,7 @@ public class TileEntityAbstractForceField extends TileEntityAbstractEnergy imple @Override 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) { WarpDrive.logger.info(this + " Beam frequency set from " + beamFrequency + " to " + parBeamFrequency); }