mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-28 04:17:38 +00:00
Remove unnecessary code
- Remove unnecessary casts - Use the diamond operator where possible - Remove "throws" declarations that aren't actually thrown - Remove unused local variables - Remove unused imports - Remove redundant superinterfaces
This commit is contained in:
@@ -52,9 +52,9 @@ public enum Colour
|
||||
{
|
||||
m_hex = hex;
|
||||
m_rgb = new float[] {
|
||||
(float)((hex >> 16) & 0xFF) / 255.0f,
|
||||
(float)((hex >> 8 ) & 0xFF) / 255.0f,
|
||||
(float)((hex ) & 0xFF) / 255.0f,
|
||||
((hex >> 16) & 0xFF) / 255.0f,
|
||||
((hex >> 8 ) & 0xFF) / 255.0f,
|
||||
((hex ) & 0xFF) / 255.0f,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ColourTracker
|
||||
int avgB = totalB / count;
|
||||
|
||||
float avgTotal = (float) total / (float) count;
|
||||
float avgMax = (float) Math.max( avgR, Math.max( avgG, avgB ) );
|
||||
float avgMax = Math.max( avgR, Math.max( avgG, avgB ) );
|
||||
avgR = (int) (avgR * avgTotal / avgMax);
|
||||
avgG = (int) (avgG * avgTotal / avgMax);
|
||||
avgB = (int) (avgB * avgTotal / avgMax);
|
||||
|
||||
@@ -125,9 +125,9 @@ public class WorldUtil
|
||||
double zDir;
|
||||
if( direction != null )
|
||||
{
|
||||
xDir = (double)direction.getFrontOffsetX();
|
||||
yDir = (double)direction.getFrontOffsetY();
|
||||
zDir = (double)direction.getFrontOffsetZ();
|
||||
xDir = direction.getFrontOffsetX();
|
||||
yDir = direction.getFrontOffsetY();
|
||||
zDir = direction.getFrontOffsetZ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user