aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret
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/features/impl/secret
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/features/impl/secret')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureActions.java7
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java8
2 files changed, 6 insertions, 9 deletions
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()))) : "")