diff options
author | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2021-05-03 21:53:00 -0400 |
---|---|---|
committer | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2021-05-03 21:53:00 -0400 |
commit | 70785f7afa63a1fe682f6e9f3d03b72ecc24b803 (patch) | |
tree | a61891a6711887777c3f47e5f4e75486fdbb8119 /src/main/java/kr/syeyoung/dungeonsguide/features/impl | |
parent | cc03ece233023c57118e9acfeca8103b3bb587e1 (diff) | |
download | Skyblock-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/features/impl')
39 files changed, 76 insertions, 106 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java index 0aa03a03..17ffbe8b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBossHealth.java @@ -56,9 +56,7 @@ public class FeatureBossHealth extends TextHUDFeature { @Override public java.util.List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "health", "separator2", "maxHealth" - }); + return Arrays.asList("title", "separator", "health", "separator2", "maxHealth"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java index 1464d397..5013c957 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java @@ -27,7 +27,7 @@ public class FeatureBoxRealLivid extends SimpleFeature implements WorldRenderLis } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override public void drawWorld(float partialTicks) { if (!isEnabled()) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java index 91572f80..112a9f82 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureCurrentPhase.java @@ -37,9 +37,7 @@ public class FeatureCurrentPhase extends TextHUDFeature { @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "phase" - }); + return Arrays.asList("title", "separator", "phase"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java index dfce6493..cec2ea0b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java @@ -28,7 +28,7 @@ public class FeatureHideAnimals extends SimpleFeature implements EntityLivingRen } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override public void onEntityRenderPre(RenderLivingEvent.Pre renderPlayerEvent) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureTerracotaTimer.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureTerracotaTimer.java index bb59419d..a79f1743 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureTerracotaTimer.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureTerracotaTimer.java @@ -40,9 +40,7 @@ public class FeatureTerracotaTimer extends TextHUDFeature { @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "number", "unit" - }); + return Arrays.asList("title", "separator", "number", "unit"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java index afce2cd5..63e768c7 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornBearPercentage.java @@ -45,9 +45,7 @@ public class FeatureThornBearPercentage extends TextHUDFeature { @Override public java.util.List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "number", "unit" - }); + return Arrays.asList("title", "separator", "number", "unit"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornSpiritBowTimer.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornSpiritBowTimer.java index 26ccaa1b..8f61d3b2 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornSpiritBowTimer.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureThornSpiritBowTimer.java @@ -40,9 +40,7 @@ public class FeatureThornSpiritBowTimer extends TextHUDFeature implements ChatLi @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "time" - }); + return Arrays.asList("title", "separator", "time"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java index 2f92873e..687e0cf0 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureSimonSaysSolver.java @@ -24,9 +24,9 @@ public class FeatureSimonSaysSolver extends SimpleFeature implements WorldRender super("Bossfight","Simon Says Solver","Solver for Simon says puzzle", "bossfight.simonsays2"); } - private SkyblockStatus ss = e.getDungeonsGuide().getSkyblockStatus(); - private List<BlockPos> orderbuild = new ArrayList<BlockPos>(); - private LinkedList<BlockPos> orderclick = new LinkedList<BlockPos>(); + private final SkyblockStatus ss = e.getDungeonsGuide().getSkyblockStatus(); + private final List<BlockPos> orderbuild = new ArrayList<BlockPos>(); + private final LinkedList<BlockPos> orderclick = new LinkedList<BlockPos>(); @Override public void drawWorld(float partialTicks) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java index d069c84d..7f415f78 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java @@ -35,7 +35,7 @@ public class FeatureTerminalSolvers extends SimpleFeature implements GuiOpenList private TerminalSolutionProvider solutionProvider; private TerminalSolution solution; - private List<Slot> clicked = new ArrayList<Slot>(); + private final List<Slot> clicked = new ArrayList<Slot>(); @Override public void onGuiOpen(GuiOpenEvent event) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java index 92df3989..509bdfa3 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxBats.java @@ -26,7 +26,7 @@ public class FeatureBoxBats extends SimpleFeature implements WorldRenderListener } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override public void drawWorld(float partialTicks) { if (!isEnabled()) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java index 545a5449..7fb95532 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxSkelemaster.java @@ -26,7 +26,7 @@ public class FeatureBoxSkelemaster extends SimpleFeature implements WorldRenderL } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override public void drawWorld(float partialTicks) { if (!isEnabled()) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java index e647e0de..881773af 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureBoxStarMobs.java @@ -25,7 +25,7 @@ public class FeatureBoxStarMobs extends SimpleFeature implements WorldRenderList } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override public void drawWorld(float partialTicks) { if (!isEnabled()) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonCurrentRoomSecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonCurrentRoomSecrets.java index 667ce16d..ca9cbb8f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonCurrentRoomSecrets.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonCurrentRoomSecrets.java @@ -51,9 +51,7 @@ public class FeatureDungeonCurrentRoomSecrets extends TextHUDFeature implements @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "currentSecrets", "separator2", "totalSecrets" - }); + return Arrays.asList("title", "separator", "currentSecrets", "separator2", "totalSecrets"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java index c50333b3..abd03765 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonDeaths.java @@ -46,8 +46,7 @@ public class FeatureDungeonDeaths extends TextHUDFeature implements ChatListener public boolean isHUDViewable() { if (!skyblockStatus.isOnDungeon()) return false; DungeonContext context = skyblockStatus.getContext(); - if (context == null) return false; - return true; + return context != null; } @Override @@ -57,9 +56,7 @@ public class FeatureDungeonDeaths extends TextHUDFeature implements ChatListener @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "username", "separator", "deaths", "total", "totalDeaths" - }); + return Arrays.asList("username", "separator", "deaths", "total", "totalDeaths"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java index 1cfb204b..067f4ad8 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java @@ -105,7 +105,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, public void drawHUD(float partialTicks) { if (!skyblockStatus.isOnDungeon()) return; if (skyblockStatus.getContext() == null || !skyblockStatus.getContext().getMapProcessor().isInitialized()) return; - if (!on) return;; + if (!on) return; DungeonContext context = skyblockStatus.getContext(); MapProcessor mapProcessor = context.getMapProcessor(); @@ -113,7 +113,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, Rectangle featureRect =getFeatureRect().getRectangle(); Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue())); GlStateManager.color(1,1,1,1); - GlStateManager.pushMatrix();; + GlStateManager.pushMatrix(); if (mapData == null) { Gui.drawRect(0,0,featureRect.width, featureRect.height, 0xFFFF0000); } else { @@ -209,9 +209,9 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, - private DynamicTexture mapTexture = new DynamicTexture(128, 128); - private ResourceLocation location = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("dungeonmap/map", mapTexture); - private int[] mapTextureData = mapTexture.getTextureData(); + private final DynamicTexture mapTexture = new DynamicTexture(128, 128); + private final ResourceLocation location = Minecraft.getMinecraft().getTextureManager().getDynamicTextureLocation("dungeonmap/map", mapTexture); + private final int[] mapTextureData = mapTexture.getTextureData(); private void updateMapTexture(byte[] colors, MapProcessor mapProcessor, List<DungeonRoom> dungeonRooms) { for (int i = 0; i < 16384; ++i) { @@ -327,10 +327,10 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, float f4 = (float)(b0 / 4 + 1) / 4.0F; worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); float f5 = -0.001F; - worldrenderer.pos(-1.0D, 1.0D, (double)((float)k * -0.001F)).tex((double)f1, (double)f2).endVertex(); - worldrenderer.pos(1.0D, 1.0D, (double)((float)k * -0.001F)).tex((double)f3, (double)f2).endVertex(); - worldrenderer.pos(1.0D, -1.0D, (double)((float)k * -0.001F)).tex((double)f3, (double)f4).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, (double)((float)k * -0.001F)).tex((double)f1, (double)f4).endVertex(); + worldrenderer.pos(-1.0D, 1.0D, (float)k * -0.001F).tex(f1, f2).endVertex(); + worldrenderer.pos(1.0D, 1.0D, (float)k * -0.001F).tex(f3, f2).endVertex(); + worldrenderer.pos(1.0D, -1.0D, (float)k * -0.001F).tex(f3, f4).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, (float)k * -0.001F).tex(f1, f4).endVertex(); tessellator.draw(); GlStateManager.popMatrix(); ++k; @@ -349,10 +349,10 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, GlStateManager.tryBlendFuncSeparate(1, 771, 0, 1); GlStateManager.disableAlpha(); worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos((float)(i) + f, (double)((float)(j + 128) - f), -0.009999999776482582D).tex(0.0D, 1.0D).endVertex(); - worldrenderer.pos((float)(i + 128) - f, (double)((float)(j + 128) - f), -0.009999999776482582D).tex(1.0D, 1.0D).endVertex(); - worldrenderer.pos((float)(i + 128) - f, (double)((float)(j) + f), -0.009999999776482582D).tex(1.0D, 0.0D).endVertex(); - worldrenderer.pos((float)(i) + f, (double)((float)(j) + f), -0.009999999776482582D).tex(0.0D, 0.0D).endVertex(); + worldrenderer.pos((float)(i) + f, (float)(j + 128) - f, -0.009999999776482582D).tex(0.0D, 1.0D).endVertex(); + worldrenderer.pos((float)(i + 128) - f, (float)(j + 128) - f, -0.009999999776482582D).tex(1.0D, 1.0D).endVertex(); + worldrenderer.pos((float)(i + 128) - f, (float)(j) + f, -0.009999999776482582D).tex(1.0D, 0.0D).endVertex(); + worldrenderer.pos((float)(i) + f, (float)(j) + f, -0.009999999776482582D).tex(0.0D, 0.0D).endVertex(); tessellator.draw(); GlStateManager.enableAlpha(); GlStateManager.disableBlend(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMilestone.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMilestone.java index 45f0f016..fcd0ac14 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMilestone.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMilestone.java @@ -53,9 +53,7 @@ public class FeatureDungeonMilestone extends TextHUDFeature implements ChatListe @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "number" - }); + return Arrays.asList("title", "separator", "number"); } @Override @@ -84,7 +82,7 @@ public class FeatureDungeonMilestone extends TextHUDFeature implements ChatListe @Override public void onChat(ClientChatReceivedEvent clientChatReceivedEvent) { - if (clientChatReceivedEvent.type == 2) return;; + if (clientChatReceivedEvent.type == 2) return; if (!skyblockStatus.isOnDungeon()) return; DungeonContext context = skyblockStatus.getContext(); if (context == null) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java index 416db257..85873e4b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java @@ -58,9 +58,7 @@ public class FeatureDungeonRealTime extends TextHUDFeature implements DungeonSta @Override public java.util.List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "discriminator", "separator", "number" - }); + return Arrays.asList("title", "discriminator", "separator", "number"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSBTime.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSBTime.java index 69626269..380aba67 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSBTime.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSBTime.java @@ -29,7 +29,7 @@ import java.util.List; public class FeatureDungeonSBTime extends TextHUDFeature { - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); public FeatureDungeonSBTime() { super("Dungeon", "Display Ingame Dungeon Time", "Display how much time skyblock thinks has passed since dungeon run started", "dungeon.stats.igtime", true, getFontRenderer().getStringWidth("Time(IG): 1h 59m 59s"), getFontRenderer().FONT_HEIGHT); @@ -78,9 +78,7 @@ public class FeatureDungeonSBTime extends TextHUDFeature { @Override public java.util.List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "discriminator", "separator", "number" - }); + return Arrays.asList("title", "discriminator", "separator", "number"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java index c5b9618e..842ece7d 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java @@ -93,7 +93,7 @@ public class FeatureDungeonScore extends TextHUDFeature implements StompConnecte dummyText2.add(new StyledText("S","currentScore")); dummyText2.add(new StyledText("->","arrow")); dummyText2.add(new StyledText("S+ ","nextScore")); - dummyText2.add(new StyledText("(","brackets"));; + dummyText2.add(new StyledText("(","brackets")); dummyText2.add(new StyledText("1 Required 1 crypt","required")); dummyText2.add(new StyledText(")","brackets")); @@ -101,9 +101,7 @@ public class FeatureDungeonScore extends TextHUDFeature implements StompConnecte @Override public java.util.List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "scorename", "separator", "score", "brackets", "etc", "currentScore", "arrow", "nextScore", "required" - }); + return Arrays.asList("scorename", "separator", "score", "brackets", "etc", "currentScore", "arrow", "nextScore", "required"); } @@ -351,7 +349,7 @@ public class FeatureDungeonScore extends TextHUDFeature implements StompConnecte actualBit.add(new StyledText(currentLetter,"currentScore")); actualBit.add(new StyledText("->","arrow")); actualBit.add(new StyledText(nextLetter+" ","nextScore")); - actualBit.add(new StyledText("(","brackets"));; + actualBit.add(new StyledText("(","brackets")); actualBit.add(new StyledText(reqPT2+" required "+tombsBreakable+" crypt "+secrets+" secrets","required")); actualBit.add(new StyledText(")","brackets")); return actualBit; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java index b6c4bde7..7ef9dfce 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java @@ -103,9 +103,7 @@ public class FeatureDungeonSecrets extends TextHUDFeature { @Override public java.util.List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "currentSecrets", "separator2", "totalSecrets", "unknown" - }); + return Arrays.asList("title", "separator", "currentSecrets", "separator2", "totalSecrets", "unknown"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java index d5476bc8..63f9bd58 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java @@ -17,7 +17,7 @@ public class FeatureHideNameTags extends SimpleFeature implements EntityLivingRe } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override public void onEntityRenderPre(RenderLivingEvent.Pre renderPlayerEvent) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeaturePlayerESP.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeaturePlayerESP.java index 490f4c18..d464d6d6 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeaturePlayerESP.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeaturePlayerESP.java @@ -37,7 +37,7 @@ public class FeaturePlayerESP extends SimpleFeature implements PlayerRenderListe } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); private boolean preCalled = false; @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java index aafca543..527106db 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWarnLowHealth.java @@ -43,7 +43,7 @@ public class FeatureWarnLowHealth extends TextHUDFeature { } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); @Override @@ -53,9 +53,7 @@ public class FeatureWarnLowHealth extends TextHUDFeature { @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "title", "separator", "number", "unit" - }); + return Arrays.asList("title", "separator", "number", "unit"); } private static final java.util.List<StyledText> dummyText= new ArrayList<StyledText>(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWatcherWarning.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWatcherWarning.java index b5a93f1b..d2b50f3a 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWatcherWarning.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureWatcherWarning.java @@ -43,7 +43,7 @@ public class FeatureWatcherWarning extends TextHUDFeature implements ChatListene return Collections.singletonList("warning"); } - private UUID lastRoomUID = UUID.randomUUID(); + private final UUID lastRoomUID = UUID.randomUUID(); private long warning = 0; private static final List<StyledText> text = new ArrayList<StyledText>(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCooldownCounter.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCooldownCounter.java index 9534f68f..c9e1626e 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCooldownCounter.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureCooldownCounter.java @@ -24,7 +24,7 @@ public class FeatureCooldownCounter extends GuiFeature implements DungeonQuitLis } private long leftDungeonTime = 0L; - private boolean wasInDungeon = false; + private final boolean wasInDungeon = false; @Override public void drawHUD(float partialTicks) { if (System.currentTimeMillis() - leftDungeonTime > 20000) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java index 4e16781e..3fac6a98 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java @@ -29,8 +29,8 @@ public class FeaturePenguins extends SimpleFeature implements PlayerRenderListen } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); - private ResourceLocation penguin = new ResourceLocation("dungeonsguide:penguin.png"); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final ResourceLocation penguin = new ResourceLocation("dungeonsguide:penguin.png"); @Override public void onEntityRenderPre(RenderPlayerEvent.Pre renderPlayerEvent) { @@ -70,7 +70,7 @@ public class FeaturePenguins extends SimpleFeature implements PlayerRenderListen GlStateManager.scale(0.8,0.8,0.8); - if (((EntityPlayer) entitylivingbaseIn).fishEntity != null) + if (entitylivingbaseIn.fishEntity != null) { itemstack = new ItemStack(Items.fishing_rod, 0); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/ability/FeatureAbilityCooldown.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/ability/FeatureAbilityCooldown.java index 469290e4..c228d24b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/ability/FeatureAbilityCooldown.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/ability/FeatureAbilityCooldown.java @@ -226,7 +226,7 @@ public class FeatureAbilityCooldown extends TextHUDFeature implements ChatListen } } - private TreeSet<UsedAbility> usedAbilities = new TreeSet<UsedAbility>((c1,c2) -> { + private final TreeSet<UsedAbility> usedAbilities = new TreeSet<UsedAbility>((c1, c2) -> { int a = Comparator.comparingLong(UsedAbility::getCooldownEnd).compare(c1,c2); return c1.getAbility().getName().equals(c2.getAbility().getName()) ? 0 : a; }); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/ClassSpecificData.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/ClassSpecificData.java index e7b7abc4..34795357 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/ClassSpecificData.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/ClassSpecificData.java @@ -6,6 +6,6 @@ import lombok.Getter; @AllArgsConstructor @Getter public class ClassSpecificData<T> { - private DungeonClass dungeonClass; - private T data; + private final DungeonClass dungeonClass; + private final T data; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/DungeonClass.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/DungeonClass.java index 6f2a2d71..244459e1 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/DungeonClass.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/DungeonClass.java @@ -12,8 +12,8 @@ public enum DungeonClass { MAGE("mage", "Mage"), ARCHER("archer","Archer"), HEALER("healer", "Healer"), TANK("tank", "Tank"), BERSERK("berserk", "Berserk"); - private String jsonName; - private String familarName; + private final String jsonName; + private final String familarName; private static final Map<String, DungeonClass> jsonNameToClazz = new HashMap<>(); static { for (DungeonClass value : values()) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/SkinFetchur.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/SkinFetchur.java index 977aec47..d54ac40d 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/SkinFetchur.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/api/SkinFetchur.java @@ -18,9 +18,9 @@ import java.util.concurrent.ConcurrentHashMap; public class SkinFetchur { - private static Map<String, CachedData<SkinSet>> skinSetMap = new ConcurrentHashMap<>(); + private static final Map<String, CachedData<SkinSet>> skinSetMap = new ConcurrentHashMap<>(); - private static Map<String, CompletableFuture<SkinSet>> currentReq = new HashMap<>(); + private static final Map<String, CompletableFuture<SkinSet>> currentReq = new HashMap<>(); public static CompletableFuture<SkinSet> getSkinSet(GameProfile gameProfile) { if (gameProfile == null) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java index 249e43c6..f48aedf4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java @@ -11,8 +11,8 @@ import java.awt.*; import java.util.Arrays; public class DataRenderDungeonFloorStat implements DataRenderer { - private DungeonType dungeonType; - private int floor; + private final DungeonType dungeonType; + private final int floor; public DataRenderDungeonFloorStat(DungeonType dungeonType, int floor) { this.dungeonType = dungeonType; this.floor = floor; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java index 561da4e4..ee317feb 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java @@ -11,7 +11,7 @@ import java.awt.*; import java.util.Arrays; public class DataRenderDungeonHighestFloorStat implements DataRenderer { - private DungeonType dungeonType; + private final DungeonType dungeonType; public DataRenderDungeonHighestFloorStat(DungeonType dungeonType) { this.dungeonType = dungeonType; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java index 950ddbe9..c2f078b2 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java @@ -12,7 +12,7 @@ import java.awt.*; import java.util.Arrays; public class DataRendererClassLv implements DataRenderer { - private DungeonClass dungeonClass; + private final DungeonClass dungeonClass; public DataRendererClassLv(DungeonClass dungeonClass) { this.dungeonClass = dungeonClass; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java index 580b1761..36a5c341 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java @@ -15,7 +15,7 @@ import java.awt.*; import java.util.Arrays; public class DataRendererDungeonLv implements DataRenderer { - private DungeonType dungeonType; + private final DungeonType dungeonType; public DataRendererDungeonLv(DungeonType dungeonType) { this.dungeonType = dungeonType; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java index 29c728ce..c5b35988 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java @@ -14,8 +14,8 @@ import java.util.List; import java.util.Set; public class DataRendererEditor extends MPanel { - private FeatureViewPlayerOnJoin feature; - private GuiConfig config; + private final FeatureViewPlayerOnJoin feature; + private final GuiConfig config; public DataRendererEditor(GuiConfig config, FeatureViewPlayerOnJoin featureViewPlayerOnJoin) { this.config = config; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java index 81f4c59a..b0f3ab55 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java @@ -15,7 +15,7 @@ import java.awt.*; import java.util.Arrays; public class DataRendererSkillLv implements DataRenderer { - private Skill skill; + private final Skill skill; public DataRendererSkillLv(Skill skill) { this.skill = skill; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java index 263aaf35..adb3fe8b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java @@ -250,9 +250,9 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen List<String> list = toHover.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); for (int i = 0; i < list.size(); ++i) { if (i == 0) { - list.set(i, toHover.getRarity().rarityColor + (String)list.get(i)); + list.set(i, toHover.getRarity().rarityColor + list.get(i)); } else { - list.set(i, EnumChatFormatting.GRAY + (String)list.get(i)); + list.set(i, EnumChatFormatting.GRAY + list.get(i)); } } FontRenderer font = toHover.getItem().getFontRenderer(toHover); @@ -305,9 +305,9 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen List<String> list = toHover.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); for (int i = 0; i < list.size(); ++i) { if (i == 0) { - list.set(i, toHover.getRarity().rarityColor + (String)list.get(i)); + list.set(i, toHover.getRarity().rarityColor + list.get(i)); } else { - list.set(i, EnumChatFormatting.GRAY + (String)list.get(i)); + list.set(i, EnumChatFormatting.GRAY + list.get(i)); } } FontRenderer font = toHover.getItem().getFontRenderer(toHover); @@ -411,7 +411,7 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen public static class HoverEventRenderPlayer extends HoverEvent { @Getter - private String uuid; + private final String uuid; public HoverEventRenderPlayer(String uuid) { super(Action.SHOW_TEXT, new ChatComponentText("")); this.uuid = uuid; @@ -445,8 +445,8 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen @Setter @Getter private PlayerProfile skyblockProfile; - private SkinFetchur.SkinSet skinSet; - private PlayerProfile.Armor armor; + private final SkinFetchur.SkinSet skinSet; + private final PlayerProfile.Armor armor; private FakePlayer(World w) { super(w, null); throw new UnsupportedOperationException("what"); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java index 5747af74..799665e8 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java @@ -59,8 +59,7 @@ public class FeatureActions extends TextHUDFeature { Point roomPt = context.getMapProcessor().worldPointToRoomPoint(thePlayer.getPosition()); DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt); if (dungeonRoom == null) return false; - if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return false; - return true; + return dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor; } private static final List<StyledText> dummyText= new ArrayList<StyledText>(); @@ -87,9 +86,7 @@ public class FeatureActions extends TextHUDFeature { @Override public List<String> getUsedTextStyle() { - return Arrays.asList(new String[] { - "pathfinding","mechanic","separator","state","current", "number", "dot", "action", "afterline" - }); + return Arrays.asList("pathfinding","mechanic","separator","state","current", "number", "dot", "action", "afterline"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java index 19f39b1f..06729c72 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java @@ -182,7 +182,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis fr.drawString((String)obj, 3, i * fr.FONT_HEIGHT, 0xFFEEEEEE); } } - GlStateManager.popMatrix();; + GlStateManager.popMatrix(); if (selected != -1) { clip(new ScaledResolution(Minecraft.getMinecraft()), feature.x + feature.width, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6); @@ -215,8 +215,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis private int selected = -1; private int selectedState = -1; private List<String> possibleStates = new ArrayList<String>(); - private List<Object> sortedMechanics = new ArrayList<Object>(); - private List<String> sortedMechanicsName = new ArrayList<String>(); + private final List<Object> sortedMechanics = new ArrayList<Object>(); + private final List<String> sortedMechanicsName = new ArrayList<String>(); private void setupMechanics() { sortedMechanics.clear(); sortedMechanicsName.clear(); @@ -417,7 +417,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis if (dungeonRoom == null) return; if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return; if (selected != -1) { - if (sortedMechanics.size() <= selected) return;; + if (sortedMechanics.size() <= selected) return; ((DungeonMechanic)sortedMechanics.get(selected)).highlight(new Color(0,255,255,50), sortedMechanicsName.get(selected) +" ("+(((DungeonMechanic) sortedMechanics.get(selected)).getRepresentingPoint(dungeonRoom) != null ? String.format("%.1f", MathHelper.sqrt_double(((DungeonMechanic) sortedMechanics.get(selected)).getRepresentingPoint(dungeonRoom).getBlockPos(dungeonRoom).distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()))) : "") |