1
0
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:
Joseph C. Sible
2017-09-24 01:18:20 -04:00
parent 19e4c03d3a
commit 80ec54eaf6
33 changed files with 101 additions and 109 deletions

View File

@@ -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,
};
}

View File

@@ -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);

View File

@@ -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
{