From 70785f7afa63a1fe682f6e9f3d03b72ecc24b803 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 3 May 2021 21:53:00 -0400 Subject: IntelliJ's Code Clean Up --- .../dungeonsguide/features/impl/secret/FeatureActions.java | 7 ++----- .../dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret') 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 dummyText= new ArrayList(); @@ -87,9 +86,7 @@ public class FeatureActions extends TextHUDFeature { @Override public List 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 possibleStates = new ArrayList(); - private List sortedMechanics = new ArrayList(); - private List sortedMechanicsName = new ArrayList(); + private final List sortedMechanics = new ArrayList(); + private final List sortedMechanicsName = new ArrayList(); 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()))) : "") -- cgit