aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/utils
diff options
context:
space:
mode:
authorMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2021-05-03 21:53:00 -0400
committerMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2021-05-03 21:53:00 -0400
commit70785f7afa63a1fe682f6e9f3d03b72ecc24b803 (patch)
treea61891a6711887777c3f47e5f4e75486fdbb8119 /src/main/java/kr/syeyoung/dungeonsguide/utils
parentcc03ece233023c57118e9acfeca8103b3bb587e1 (diff)
downloadSkyblock-Dungeons-Guide-70785f7afa63a1fe682f6e9f3d03b72ecc24b803.tar.gz
Skyblock-Dungeons-Guide-70785f7afa63a1fe682f6e9f3d03b72ecc24b803.tar.bz2
Skyblock-Dungeons-Guide-70785f7afa63a1fe682f6e9f3d03b72ecc24b803.zip
IntelliJ's Code Clean Up
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/utils')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java60
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java6
2 files changed, 32 insertions, 34 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
index f8e05329..7a59d857 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
@@ -105,7 +105,7 @@ public class RenderUtils {
for (int k1 = 0; k1 < textLines.size(); ++k1)
{
- String s1 = (String)textLines.get(k1);
+ String s1 = textLines.get(k1);
font.drawStringWithShadow(s1, (float)l1, (float)i2, -1);
if (k1 == 0)
@@ -142,10 +142,10 @@ public class RenderUtils {
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
- worldrenderer.pos((double)right, (double)top, (double)zLevel).color(f1, f2, f3, f).endVertex();
- worldrenderer.pos((double)left, (double)top, (double)zLevel).color(f1, f2, f3, f).endVertex();
- worldrenderer.pos((double)left, (double)bottom, (double)zLevel).color(f5, f6, f7, f4).endVertex();
- worldrenderer.pos((double)right, (double)bottom, (double)zLevel).color(f5, f6, f7, f4).endVertex();
+ worldrenderer.pos(right, top, zLevel).color(f1, f2, f3, f).endVertex();
+ worldrenderer.pos(left, top, zLevel).color(f1, f2, f3, f).endVertex();
+ worldrenderer.pos(left, bottom, zLevel).color(f5, f6, f7, f4).endVertex();
+ worldrenderer.pos(right, bottom, zLevel).color(f5, f6, f7, f4).endVertex();
tessellator.draw();
GlStateManager.shadeModel(7424);
GlStateManager.disableBlend();
@@ -161,10 +161,10 @@ public class RenderUtils {
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
- worldrenderer.pos((double)x, (double)(y + height), 0.0D).tex((double)uMin, (double)vMax).endVertex();
- worldrenderer.pos((double)(x + width), (double)(y + height), 0.0D).tex((double)uMax, (double)vMax).endVertex();
- worldrenderer.pos((double)(x + width), (double)y, 0.0D).tex((double)uMax, (double)vMin).endVertex();
- worldrenderer.pos((double)x, (double)y, 0.0D).tex((double)uMin, (double)vMin).endVertex();
+ worldrenderer.pos(x, y + height, 0.0D).tex(uMin, vMax).endVertex();
+ worldrenderer.pos(x + width, y + height, 0.0D).tex(uMax, vMax).endVertex();
+ worldrenderer.pos(x + width, y, 0.0D).tex(uMax, vMin).endVertex();
+ worldrenderer.pos(x, y, 0.0D).tex(uMin, vMin).endVertex();
tessellator.draw();
GL11.glTexParameteri(3553, 10241, 9728);
GL11.glTexParameteri(3553, 10240, 9728);
@@ -228,19 +228,18 @@ public class RenderUtils {
if (!chroma) {
GlStateManager.color(f, f1, f2, f3);
worldrenderer.begin(GL11.GL_LINE_LOOP, DefaultVertexFormats.POSITION);
- worldrenderer.pos((double) left, (double) bottom, 0.0D).endVertex();
- worldrenderer.pos((double) right, (double) bottom, 0.0D).endVertex();
- worldrenderer.pos((double) right, (double) top, 0.0D).endVertex();
- worldrenderer.pos((double) left, (double) top, 0.0D).endVertex();
+ worldrenderer.pos(left, bottom, 0.0D).endVertex();
+ worldrenderer.pos(right, bottom, 0.0D).endVertex();
+ worldrenderer.pos(right, top, 0.0D).endVertex();
+ worldrenderer.pos(left, top, 0.0D).endVertex();
} else {
worldrenderer.begin(GL11.GL_LINE_LOOP, DefaultVertexFormats.POSITION_COLOR);
float blah = (System.currentTimeMillis() / 10) % 360;
- ;
GlStateManager.shadeModel(GL11.GL_SMOOTH);
- color(worldrenderer.pos((double) left, (double) bottom, 0.0D), Color.HSBtoRGB((((blah + 20) % 360) / 360.0f), 1, 1)).endVertex();
- color(worldrenderer.pos((double) right, (double) bottom, 0.0D), Color.HSBtoRGB((((blah + 40) % 360) / 360.0f), 1, 1)).endVertex();
- color(worldrenderer.pos((double) right, (double) top, 0.0D), Color.HSBtoRGB((((blah + 20) % 360) / 360.0f), 1, 1)).endVertex();
- color(worldrenderer.pos((double) left, (double) top, 0.0D), Color.HSBtoRGB(blah / 360.0f, 1, 1)).endVertex();
+ color(worldrenderer.pos(left, bottom, 0.0D), Color.HSBtoRGB((((blah + 20) % 360) / 360.0f), 1, 1)).endVertex();
+ color(worldrenderer.pos(right, bottom, 0.0D), Color.HSBtoRGB((((blah + 40) % 360) / 360.0f), 1, 1)).endVertex();
+ color(worldrenderer.pos(right, top, 0.0D), Color.HSBtoRGB((((blah + 20) % 360) / 360.0f), 1, 1)).endVertex();
+ color(worldrenderer.pos(left, top, 0.0D), Color.HSBtoRGB(blah / 360.0f, 1, 1)).endVertex();
}
tessellator.draw();
GlStateManager.enableTexture2D();
@@ -277,18 +276,17 @@ public class RenderUtils {
if (!color.isChroma()) {
GlStateManager.color(f, f1, f2, f3);
worldrenderer.begin(GL11.GL_LINE_LOOP, DefaultVertexFormats.POSITION);
- worldrenderer.pos((double) left, (double) bottom, 0.0D).endVertex();
- worldrenderer.pos((double) right, (double) bottom, 0.0D).endVertex();
- worldrenderer.pos((double) right, (double) top, 0.0D).endVertex();
- worldrenderer.pos((double) left, (double) top, 0.0D).endVertex();
+ worldrenderer.pos(left, bottom, 0.0D).endVertex();
+ worldrenderer.pos(right, bottom, 0.0D).endVertex();
+ worldrenderer.pos(right, top, 0.0D).endVertex();
+ worldrenderer.pos(left, top, 0.0D).endVertex();
} else {
worldrenderer.begin(GL11.GL_LINE_LOOP, DefaultVertexFormats.POSITION_COLOR);
- ;
GlStateManager.shadeModel(GL11.GL_SMOOTH);
- color(worldrenderer.pos((double) left, (double) bottom, 0.0D), getColorAt(left, bottom, color)).endVertex();
- color(worldrenderer.pos((double) right, (double) bottom, 0.0D), getColorAt(right, bottom, color)).endVertex();
- color(worldrenderer.pos((double) right, (double) top, 0.0D), getColorAt(right, top, color)).endVertex();
- color(worldrenderer.pos((double) left, (double) top, 0.0D), getColorAt(left, top, color)).endVertex();
+ color(worldrenderer.pos(left, bottom, 0.0D), getColorAt(left, bottom, color)).endVertex();
+ color(worldrenderer.pos(right, bottom, 0.0D), getColorAt(right, bottom, color)).endVertex();
+ color(worldrenderer.pos(right, top, 0.0D), getColorAt(right, top, color)).endVertex();
+ color(worldrenderer.pos(left, top, 0.0D), getColorAt(left, top, color)).endVertex();
}
tessellator.draw();
GlStateManager.enableTexture2D();
@@ -980,10 +978,10 @@ public class RenderUtils {
double j = textWidth / 2;
GlStateManager.disableTexture2D();
worldRenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
- worldRenderer.pos((double)(-j - 1), (double)(-1), 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
- worldRenderer.pos((double)(-j - 1), (double)8, 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
- worldRenderer.pos((double)(j + 1), (double)8, 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
- worldRenderer.pos((double)(j + 1), (double)(-1), 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
+ worldRenderer.pos(-j - 1, -1, 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
+ worldRenderer.pos(-j - 1, 8, 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
+ worldRenderer.pos(j + 1, 8, 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
+ worldRenderer.pos(j + 1, -1, 0.0).color(0.0f, 0.0f, 0.0f, 0.25f).endVertex();
tessellator.draw();
GlStateManager.enableTexture2D();
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java
index d06e0ccc..e3fd330b 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/XPUtils.java
@@ -14,9 +14,9 @@ public class XPUtils {
private double nextLvXp;
}
- private static TreeMap<Double, Integer> catacombXp = new TreeMap<>();
- private static TreeMap<Double, Integer> skillXp = new TreeMap<>();
- private static TreeMap<Double, Integer> skillXp2 = new TreeMap<>();
+ private static final TreeMap<Double, Integer> catacombXp = new TreeMap<>();
+ private static final TreeMap<Double, Integer> skillXp = new TreeMap<>();
+ private static final TreeMap<Double, Integer> skillXp2 = new TreeMap<>();
static {
catacombXp.put(50.0, 1);
catacombXp.put(125.0, 2);