diff options
Diffstat (limited to 'src/main/java/kr/syeyoung')
156 files changed, 470 insertions, 506 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java b/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java index ec7a9ce5..a1003ec5 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java @@ -56,7 +56,7 @@ public class RichPresenceManager implements Runnable { }).build(), true); } - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); public void updatePresence() { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java index d2635c89..c43ed955 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/SkyblockStatus.java @@ -46,7 +46,7 @@ public class SkyblockStatus { Minecraft mc = Minecraft.getMinecraft(); if (mc == null || mc.thePlayer == null) return false; if (!mc.isSingleplayer() && mc.thePlayer.getClientBrand() != null) { - if (mc.thePlayer.getClientBrand().startsWith("Hypixel BungeeCord")) return true; + return mc.thePlayer.getClientBrand().startsWith("Hypixel BungeeCord"); } return false; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/a.java b/src/main/java/kr/syeyoung/dungeonsguide/a.java index 2fc4bb4d..dd4f7562 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/a.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/a.java @@ -38,7 +38,7 @@ public class a public void a(FMLInitializationEvent a) { - this.a = this; + kr.syeyoung.dungeonsguide.a.a = this; d.init(a); } @@ -50,7 +50,7 @@ public class a try { c = b.b(this.getClass().getResourceAsStream("/kr/syeyoung/dungeonsguide/e.class") == null ? System.getProperty("dg.version") == null ? "latest" : System.getProperty("dg.version") : null); if (c != null) { - this.a = this; + kr.syeyoung.dungeonsguide.a.a = this; URL.setURLStreamHandlerFactory(new c(b)); LaunchClassLoader d = (LaunchClassLoader) a.class.getClassLoader(); d.addURL(new URL("z:///")); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/b.java b/src/main/java/kr/syeyoung/dungeonsguide/b.java index 9e350d69..d914878c 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/b.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/b.java @@ -29,7 +29,7 @@ import java.util.zip.ZipInputStream; public class b { private KeyPair a; private String b; - private ProgressManager.ProgressBar p; + private final ProgressManager.ProgressBar p; public String c() { return b; @@ -132,7 +132,7 @@ public class b { return e.get("data").getAsString(); } - private HashMap<String, byte[]> c = new HashMap<String, byte[]>(); + private final HashMap<String, byte[]> c = new HashMap<String, byte[]>(); public HashMap<String, byte[]> d() { return c; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/c.java b/src/main/java/kr/syeyoung/dungeonsguide/c.java index 6e2d8023..dbef9503 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/c.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/c.java @@ -4,7 +4,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public interface c { - public void init(FMLInitializationEvent event); + void init(FMLInitializationEvent event); - public void pre(FMLPreInitializationEvent event); + void pre(FMLPreInitializationEvent event); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java index c4e006bb..c175572a 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java @@ -305,7 +305,7 @@ public class CommandDungeonsGuide extends CommandBase { File runDir = new File(f, "dungeonruns"); runDir.mkdirs(); - File runFile = new File(runDir, UUID.randomUUID().toString()+".dgrun"); + File runFile = new File(runDir, UUID.randomUUID() +".dgrun"); DungeonContext dungeonContext = e.getDungeonsGuide().getSkyblockStatus().getContext(); if (dungeonContext == null) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java index 78a3bb9d..02ef7fd3 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java @@ -1,25 +1,14 @@ package kr.syeyoung.dungeonsguide.commands; -import kr.syeyoung.dungeonsguide.config.guiconfig.GuiConfig; -import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry; -import kr.syeyoung.dungeonsguide.e; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; -import net.minecraft.util.ChatComponentText; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; -import javax.crypto.BadPaddingException; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; -import java.io.IOException; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; @@ -45,7 +34,7 @@ public class CommandReparty extends CommandBase { requestReparty(); } - public static enum Phase { + public enum Phase { NOT, REQUESTED, RECEIVE_PARTYMEMBERS, @@ -53,7 +42,7 @@ public class CommandReparty extends CommandBase { REPARTY } - private List<String> players = new ArrayList<String>(); + private final List<String> players = new ArrayList<String>(); private long nextTrigger = Long.MAX_VALUE; private Phase phase = Phase.NOT; @SubscribeEvent diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/FeatureEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/FeatureEditPane.java index 0ab6761f..4f641f53 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/FeatureEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/FeatureEditPane.java @@ -20,11 +20,11 @@ import java.util.*; import java.util.List; public class FeatureEditPane extends MPanel { - private List<AbstractFeature> features; + private final List<AbstractFeature> features; - private List<MFeature> le = new ArrayList<MFeature>(); + private final List<MFeature> le = new ArrayList<MFeature>(); - private GuiConfig config; + private final GuiConfig config; private MTextField textField; private String search = ""; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java index 406046d9..8c18c77e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiConfig.java @@ -24,12 +24,12 @@ import java.util.Stack; public class GuiConfig extends GuiScreen { - private MPanel mainPanel = new MPanel(); + private final MPanel mainPanel = new MPanel(); @Getter - private MNavigatingPane tabbedPane; + private final MNavigatingPane tabbedPane; - private Stack<String> history = new Stack(); + private final Stack<String> history = new Stack(); public GuiConfig() { MNavigatingPane tabbedPane = new MNavigatingPane(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java index 93ae3a22..6e0ac495 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java @@ -17,8 +17,8 @@ import java.io.IOException; public class GuiGuiLocationConfig extends GuiScreen { - private MPanel mainPanel = new MPanel(); - private GuiScreen before; + private final MPanel mainPanel = new MPanel(); + private final GuiScreen before; public GuiGuiLocationConfig(final GuiScreen before, AbstractFeature featureWhitelist) { this.before = before; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java index 8b229656..177f2545 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterValueEdit.java @@ -21,7 +21,7 @@ import java.io.IOException; public class GuiParameterValueEdit extends GuiScreen { - private MPanel mainPanel = new MPanel() { + private final MPanel mainPanel = new MPanel() { @Override public void onBoundsUpdate() { save.setBounds(new Rectangle(0 ,getBounds().height - 20, getBounds().width, 20)); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java index fa6f2312..be03b5b8 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java @@ -24,14 +24,14 @@ import java.util.ArrayList; public class MFeature extends MPanel { @Getter - private AbstractFeature feature; + private final AbstractFeature feature; - private List<MPanel> addons = new ArrayList<MPanel>(); + private final List<MPanel> addons = new ArrayList<MPanel>(); @Getter @Setter private Color hover; - private GuiConfig config; + private final GuiConfig config; public MFeature(final AbstractFeature abstractFeature, final GuiConfig config) { this.config = config; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java index f9913f00..d2abc0ad 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java @@ -20,21 +20,21 @@ import java.util.ArrayList; import java.util.List; public class MParameter extends MPanel { - private MLabel label; + private final MLabel label; @Getter - private AbstractFeature feature; + private final AbstractFeature feature; @Getter - private FeatureParameter parameter; + private final FeatureParameter parameter; - private List<MPanel> addons = new ArrayList<MPanel>(); + private final List<MPanel> addons = new ArrayList<MPanel>(); @Getter @Setter private Color hover; private PanelDefaultParameterConfig config; - private MLabel label2; + private final MLabel label2; public MParameter(AbstractFeature abstractFeature, final FeatureParameter parameter, final GuiConfig config2) { this.config = config; this.parameter = parameter; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDefaultParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDefaultParameterConfig.java index 75b6e881..34927fd6 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDefaultParameterConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDefaultParameterConfig.java @@ -35,7 +35,7 @@ public class PanelDefaultParameterConfig extends MPanel { this.setBounds(new Rectangle(0,0,parentWidth, parentHeight)); } - private GuiConfig config; + private final GuiConfig config; public PanelDefaultParameterConfig(final GuiConfig config, AbstractFeature feature, List<MPanel> pre, Set<String> ignore) { this.config = config; for (MPanel mPanel : pre) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java index 23da3206..32312d78 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java @@ -12,7 +12,7 @@ import net.minecraft.client.renderer.GlStateManager; import java.awt.*; public class PanelDelegate extends MPanel { - private GuiFeature guiFeature; + private final GuiFeature guiFeature; private boolean draggable = false; public PanelDelegate(GuiFeature guiFeature, boolean draggable) { this.guiFeature = guiFeature; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/types/TypeConverterRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/config/types/TypeConverterRegistry.java index cce82ea3..967c1a11 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/types/TypeConverterRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/types/TypeConverterRegistry.java @@ -6,7 +6,7 @@ import java.util.HashMap; import java.util.Map; public class TypeConverterRegistry { - private static Map<String, TypeConverter> typeConverterMap = new HashMap<String, TypeConverter>(); + private static final Map<String, TypeConverter> typeConverterMap = new HashMap<String, TypeConverter>(); public static void register(TypeConverter typeConverter) { typeConverterMap.put(typeConverter.getTypeString(), typeConverter); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/d/a.java b/src/main/java/kr/syeyoung/dungeonsguide/d/a.java index 58c89ba8..7cab89ae 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/d/a.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/d/a.java @@ -7,7 +7,7 @@ import java.net.URL; import java.net.URLConnection; public class a extends URLConnection { - private b a; + private final b a; protected a(URL b, b a) { super(b); connected = false; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/d/b.java b/src/main/java/kr/syeyoung/dungeonsguide/d/b.java index 80f69af9..fa674b59 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/d/b.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/d/b.java @@ -9,7 +9,7 @@ import java.net.URLStreamHandler; @AllArgsConstructor public class b extends URLStreamHandler { - private kr.syeyoung.dungeonsguide.b a; + private final kr.syeyoung.dungeonsguide.b a; @Override protected URLConnection openConnection(URL a) throws IOException { return new a(a, this.a); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/d/c.java b/src/main/java/kr/syeyoung/dungeonsguide/d/c.java index 5b3a47e3..16977501 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/d/c.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/d/c.java @@ -7,7 +7,7 @@ import java.net.URLStreamHandlerFactory; @AllArgsConstructor public class c implements URLStreamHandlerFactory { - private kr.syeyoung.dungeonsguide.b a; + private final kr.syeyoung.dungeonsguide.b a; @Override public URLStreamHandler createURLStreamHandler(String a) { if ("z".equals(a)) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java index 99517134..cc3b1617 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java @@ -30,26 +30,26 @@ import java.util.List; public class DungeonContext { @Getter - private World world; + private final World world; @Getter - private MapProcessor mapProcessor; + private final MapProcessor mapProcessor; @Getter @Setter private BlockPos dungeonMin; @Getter - private Map<Point, DungeonRoom> roomMapper = new HashMap<Point, DungeonRoom>(); + private final Map<Point, DungeonRoom> roomMapper = new HashMap<Point, DungeonRoom>(); @Getter - private List<DungeonRoom> dungeonRoomList = new ArrayList<DungeonRoom>(); + private final List<DungeonRoom> dungeonRoomList = new ArrayList<DungeonRoom>(); @Getter - private List<RoomProcessor> globalRoomProcessors = new ArrayList<RoomProcessor>(); + private final List<RoomProcessor> globalRoomProcessors = new ArrayList<RoomProcessor>(); @Getter - private Map<String, Integer> deaths = new HashMap<String, Integer>(); + private final Map<String, Integer> deaths = new HashMap<String, Integer>(); @Getter - private List<String[]> milestoneReached = new ArrayList<String[]>(); + private final List<String[]> milestoneReached = new ArrayList<String[]>(); @Getter @Setter private long BossRoomEnterSeconds = -1; @@ -81,16 +81,16 @@ public class DungeonContext { private BossfightProcessor bossfightProcessor; @Getter - private Set<String> players = new HashSet<String>(); + private final Set<String> players = new HashSet<String>(); @Getter - private List<DungeonEvent> events = new ArrayList<DungeonEvent>(); + private final List<DungeonEvent> events = new ArrayList<DungeonEvent>(); public DungeonContext(World world) { this.world = world; createEvent(new DungeonNodataEvent("DUNGEON_CONTEXT_CREATION")); mapProcessor = new MapProcessor(this); - DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(((SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus()).getDungeonName()); + DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(e.getDungeonsGuide().getSkyblockStatus().getDungeonName()); if (doorFinder != null) trapRoomGen = doorFinder.isTrapSpawn(e.getDungeonsGuide().getSkyblockStatus().getDungeonName()); else mapProcessor.setBugged(true); @@ -112,7 +112,7 @@ public class DungeonContext { bossroomSpawnPos = Minecraft.getMinecraft().thePlayer.getPosition(); MinecraftForge.EVENT_BUS.post(new BossroomEnterEvent()); createEvent(new DungeonNodataEvent("BOSSROOM_ENTER")); - DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(((SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus()).getDungeonName()); + DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(e.getDungeonsGuide().getSkyblockStatus().getDungeonName()); if (doorFinder != null) { bossfightProcessor = doorFinder.createBossfightProcessor(world, e.getDungeonsGuide().getSkyblockStatus().getDungeonName()); } else { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java index e3ec00c6..51442cf1 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java @@ -42,7 +42,7 @@ public class MapProcessor { private MapData lastMapData2; @Getter - private BiMap<String, String> mapIconToPlayerMap = HashBiMap.create(); + private final BiMap<String, String> mapIconToPlayerMap = HashBiMap.create(); @Getter private Dimension unitRoomDimension; @@ -54,7 +54,7 @@ public class MapProcessor { @Setter private boolean bugged = false; - private List<Point> roomsFound = new ArrayList<Point>(); + private final List<Point> roomsFound = new ArrayList<Point>(); private boolean axisMatch = false; @@ -127,7 +127,7 @@ public class MapProcessor { } // determine door location based on npc, and determine map min from there { - DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(((SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus()).getDungeonName()); + DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(e.getDungeonsGuide().getSkyblockStatus().getDungeonName()); if (doorFinder == null) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cCouldn't find door processor for "+e.getDungeonsGuide().getSkyblockStatus().getDungeonName())); bugged = true; @@ -245,7 +245,7 @@ public class MapProcessor { builder.append(isSet ? "O" : "X"); } } - e.sendDebugChat(new ChatComponentText("Shape visual: "+builder.toString())); + e.sendDebugChat(new ChatComponentText("Shape visual: "+ builder)); context.getDungeonRoomList().add(rooms); for (Point p:rooms.getUnitPoints()) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java index 2a7ebd38..f8071fd5 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java @@ -47,7 +47,7 @@ public class ActionMove extends AbstractAction { float multiplier = distance / 120f; //mobs only render ~120 blocks away float scale = 0.45f * multiplier; scale *= 25.0 / 6.0; - RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, (float) (pos.getY() + 0.5f + scale), pos.getZ() + 0.5f, 0xFF00FF00, 1f, true, false, partialTicks); + RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, pos.getY() + 0.5f + scale, pos.getZ() + 0.5f, 0xFF00FF00, 1f, true, false, partialTicks); RenderUtils.drawTextAtWorld(String.format("%.2f",MathHelper.sqrt_double(pos.distanceSq(Minecraft.getMinecraft().thePlayer.getPosition())))+"m", pos.getX() + 0.5f, pos.getY() + 0.5f - scale, pos.getZ() + 0.5f, 0xFFFFFF00, 1f, true, false, partialTicks); if (FeatureRegistry.SECRET_TOGGLE_KEY.isEnabled() && Keybinds.togglePathfindStatus) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java index 3a49005d..a149e129 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java @@ -46,7 +46,7 @@ public class ActionMoveNearestAir extends AbstractAction { float multiplier = distance / 120f; //mobs only render ~120 blocks away float scale = 0.45f * multiplier; scale *= 25.0 / 6.0; - RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, (float) (pos.getY() + 0.5f + scale), pos.getZ() + 0.5f, 0xFF00FF00, 1f, true, false, partialTicks); + RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, pos.getY() + 0.5f + scale, pos.getZ() + 0.5f, 0xFF00FF00, 1f, true, false, partialTicks); RenderUtils.drawTextAtWorld(String.format("%.2f",MathHelper.sqrt_double(pos.distanceSq(Minecraft.getMinecraft().thePlayer.getPosition())))+"m", pos.getX() + 0.5f, pos.getY() + 0.5f - scale, pos.getZ() + 0.5f, 0xFFFFFF00, 1f, true, false, partialTicks); if (FeatureRegistry.SECRET_TOGGLE_KEY.isEnabled() && Keybinds.togglePathfindStatus) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java index d5c99c8a..ce4ba4df 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionRoute.java @@ -13,16 +13,16 @@ import java.util.List; public class ActionRoute { @Getter - private String mechanic; + private final String mechanic; @Getter - private String state; + private final String state; @Getter private int current; @Getter - private List<Action> actions; + private final List<Action> actions; - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; public ActionRoute(DungeonRoom dungeonRoom, String mechanic, String state) { this.mechanic = mechanic; @@ -62,10 +62,12 @@ public class ActionRoute { } public void onRenderWorld(float partialTicks) { getCurrentAction().onRenderWorld(dungeonRoom, partialTicks); - }; + } + public void onRenderScreen(float partialTicks) { getCurrentAction().onRenderScreen(dungeonRoom, partialTicks); - }; + } + public void onTick() { Action current = getCurrentAction(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java index 0c874458..50955ba9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java @@ -104,9 +104,6 @@ public class CatacombDataProvider implements DungeonSpecificDataProvider { return true; } else if (floor.equals("F6")) { return true; - } else if (floor.equals("F7")) { - return true; - } - return false; + } else return floor.equals("F7"); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombMasterDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombMasterDataProvider.java index f41bcf03..0e8e67b2 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombMasterDataProvider.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombMasterDataProvider.java @@ -89,9 +89,6 @@ public class CatacombMasterDataProvider implements DungeonSpecificDataProvider { return true; } else if (floor.equals("M6")) { return true; - } else if (floor.equals("M7")) { - return true; - } - return false; + } else return floor.equals("M7"); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonRoomDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonRoomDoor.java index d9e8cd2d..b7760327 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonRoomDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonRoomDoor.java @@ -14,7 +14,7 @@ import java.util.HashSet; import java.util.Set; public class DungeonRoomDoor implements DungeonMechanic { - private DungeonDoor doorfinder; + private final DungeonDoor doorfinder; public DungeonRoomDoor(DungeonDoor doorfinder) { this.doorfinder = doorfinder; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java index b7a3eee9..6966fd65 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java @@ -58,7 +58,7 @@ public class DungeonSecret implements DungeonMechanic { if (!NodeProcessorDungeonRoom.isValidBlock(blockState)) return; } - dungeonRoom.getRoomContext().put("i-" + pos.toString(), true); + dungeonRoom.getRoomContext().put("i-" + pos, true); } } } @@ -104,7 +104,7 @@ public class DungeonSecret implements DungeonMechanic { return SecretStatus.NOT_SURE; } else { Vec3 pos = new Vec3(secretPoint.getBlockPos(dungeonRoom)); - if (dungeonRoom.getRoomContext().containsKey("i-"+pos.toString())) + if (dungeonRoom.getRoomContext().containsKey("i-"+ pos)) return SecretStatus.FOUND; Vec3 player = Minecraft.getMinecraft().thePlayer.getPositionVector(); if (player.squareDistanceTo(pos) < 16) { @@ -116,7 +116,7 @@ public class DungeonSecret implements DungeonMechanic { if (!NodeProcessorDungeonRoom.isValidBlock(blockState)) return SecretStatus.NOT_SURE; } - dungeonRoom.getRoomContext().put("i-" + pos.toString(), true); + dungeonRoom.getRoomContext().put("i-" + pos, true); } return SecretStatus.NOT_SURE; } @@ -175,16 +175,16 @@ public class DungeonSecret implements DungeonMechanic { RenderUtils.drawTextAtWorld(getCurrentState(dungeonRoom), pos.getX() +0.5f, pos.getY()+0f, pos.getZ()+0.5f, 0xFFFFFFFF, 0.03f, false, true, partialTicks); } - public static enum SecretType { + public enum SecretType { BAT, CHEST, ITEM_DROP, ESSENCE } @AllArgsConstructor @Getter - public static enum SecretStatus { + public enum SecretStatus { DEFINITELY_NOT("definitely_not"), NOT_SURE("not_sure"), CREATED("created"), FOUND("found"), ERROR("error"); - private String stateName; + private final String stateName; } public DungeonSecret clone() throws CloneNotSupportedException { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java index ffc9ca6d..c77e8056 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java @@ -74,7 +74,7 @@ public class DungeonRoom { } @Getter - private PathFinder pathFinder; + private final PathFinder pathFinder; public ScheduledFuture<List<BlockPos>> createEntityPathTo(IBlockAccess blockaccess, Entity entityIn, BlockPos targetPos, float dist) { return asyncPathFinder.schedule(() -> { @@ -93,16 +93,16 @@ public class DungeonRoom { private static final ScheduledExecutorService asyncPathFinder = Executors.newScheduledThreadPool(2); @Getter - private NodeProcessorDungeonRoom nodeProcessorDungeonRoom; + private final NodeProcessorDungeonRoom nodeProcessorDungeonRoom; @Getter private final Map<String, Object> roomContext = new HashMap<String, Object>(); @AllArgsConstructor @Getter - public static enum RoomState { + public enum RoomState { DISCOVERED(0), COMPLETE_WITHOUT_SECRETS(0), FINISHED(0), FAILED(-14); - private int scoreModifier; + private final int scoreModifier; } private RoomProcessor roomProcessor; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java index 19f2fd3c..e0bfe0f3 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java @@ -18,9 +18,9 @@ import java.security.NoSuchAlgorithmException; import java.util.*; public class DungeonRoomInfoRegistry { - private static List<DungeonRoomInfo> registered = new ArrayList<DungeonRoomInfo>(); - private static Map<Short, List<DungeonRoomInfo>> shapeMap = new HashMap<Short, List<DungeonRoomInfo>>(); - private static Map<UUID, DungeonRoomInfo> uuidMap = new HashMap<UUID, DungeonRoomInfo>(); + private static final List<DungeonRoomInfo> registered = new ArrayList<DungeonRoomInfo>(); + private static final Map<Short, List<DungeonRoomInfo>> shapeMap = new HashMap<Short, List<DungeonRoomInfo>>(); + private static final Map<UUID, DungeonRoomInfo> uuidMap = new HashMap<UUID, DungeonRoomInfo>(); public static void register(DungeonRoomInfo dungeonRoomInfo) { if (dungeonRoomInfo == null) throw new NullPointerException("what the fak parameter is noll?"); @@ -42,7 +42,7 @@ public class DungeonRoomInfoRegistry { public static List<DungeonRoomInfo> getByShape(Short shape) { List<DungeonRoomInfo> dungeonRoomInfos = shapeMap.get(shape); - return dungeonRoomInfos == null ? Collections.<DungeonRoomInfo>emptyList() : dungeonRoomInfos; + return dungeonRoomInfos == null ? Collections.emptyList() : dungeonRoomInfos; } public static DungeonRoomInfo getByUUID(UUID uid) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java index cf846b20..c3e3706b 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java @@ -12,7 +12,7 @@ import net.minecraft.world.World; import java.util.List; public class RoomMatcher { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; @Getter private DungeonRoomInfo match; @@ -20,7 +20,7 @@ public class RoomMatcher { private int rotation; // how much the "found room" has to rotate clockwise to match the given dungeon room info. ! private boolean triedMatch = false; - private World w; + private final World w; public RoomMatcher(DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/e.java b/src/main/java/kr/syeyoung/dungeonsguide/e.java index 5a011e9e..b6cea8ce 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/e.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/e.java @@ -62,7 +62,7 @@ public class e implements c, CloseListener { @Getter - private b authenticator; + private final b authenticator; @Getter private StompInterface stompConnection; @@ -79,7 +79,7 @@ public class e implements c, CloseListener { CommandReparty commandReparty; - private String stompURL = "wss://dungeons.guide/ws"; + private final String stompURL = "wss://dungeons.guide/ws"; // private String stompURL = "ws://localhost/ws"; public void init(FMLInitializationEvent event) { ProgressManager.ProgressBar progressbar = ProgressManager.push("DungeonsGuide", 4); @@ -180,7 +180,7 @@ public class e implements c, CloseListener { public SkyblockStatus getSkyblockStatus() { - return (SkyblockStatus) skyblockStatus; + return skyblockStatus; } public static e getDungeonsGuide() { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java index 2bb6f72b..ca724f9e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java @@ -67,7 +67,7 @@ public class DungeonListener { @SubscribeEvent public void onPostDraw(GuiScreenEvent.DrawScreenEvent.Post e) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) kr.syeyoung.dungeonsguide.e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = kr.syeyoung.dungeonsguide.e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; @@ -89,7 +89,7 @@ public class DungeonListener { @SubscribeEvent public void onEntityUpdate(LivingEvent.LivingUpdateEvent e) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) kr.syeyoung.dungeonsguide.e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = kr.syeyoung.dungeonsguide.e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; @@ -150,7 +150,7 @@ public class DungeonListener { - SkyblockStatus skyblockStatus = (SkyblockStatus) kr.syeyoung.dungeonsguide.e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); { boolean isOnDungeon = skyblockStatus.isOnDungeon(); boolean isOnSkyblock = skyblockStatus.isOnSkyblock(); @@ -217,7 +217,7 @@ public class DungeonListener { } - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; if (skyblockStatus.getContext() != null) { @@ -243,7 +243,7 @@ public class DungeonListener { @SubscribeEvent(receiveCanceled = true, priority = EventPriority.HIGHEST) public void onChatReceived(ClientChatReceivedEvent clientChatReceivedEvent) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; if (clientChatReceivedEvent.type != 2 && clientChatReceivedEvent.message.getFormattedText().contains("§6> §e§lEXTRA STATS §6<")) { @@ -287,7 +287,7 @@ public class DungeonListener { } if (clientChatReceivedEvent.type == 2) return; for (RoomProcessor globalRoomProcessor : context.getGlobalRoomProcessors()) { - if (globalRoomProcessor == roomProcessor) continue;; + if (globalRoomProcessor == roomProcessor) continue; try { globalRoomProcessor.chatReceived(clientChatReceivedEvent.message); } catch (Throwable t) { @@ -304,7 +304,7 @@ public class DungeonListener { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent renderWorldLastEvent) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; DungeonContext context = skyblockStatus.getContext(); @@ -360,7 +360,7 @@ public class DungeonListener { @SubscribeEvent() public void onKey2(InputEvent.KeyInputEvent keyInputEvent) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; DungeonContext context = skyblockStatus.getContext(); @@ -391,7 +391,7 @@ public class DungeonListener { @SubscribeEvent() public void onInteract(PlayerInteractEntityEvent interact) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; DungeonContext context = skyblockStatus.getContext(); @@ -452,7 +452,7 @@ public class DungeonListener { @SubscribeEvent public void onInteract(PlayerInteractEvent keyInputEvent) { try { - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; DungeonContext context = skyblockStatus.getContext(); @@ -482,7 +482,7 @@ public class DungeonListener { } @Getter - private Map<Integer, Vec3> entityIdToPosMap = new HashMap<Integer, Vec3>(); + private final Map<Integer, Vec3> entityIdToPosMap = new HashMap<Integer, Vec3>(); @SubscribeEvent public void onEntitySpawn(EntityJoinWorldEvent spawn) { DungeonActionManager.getSpawnLocation().put(spawn.entity.getEntityId(), new Vec3(spawn.entity.posX, spawn.entity.posY, spawn.entity.posZ)); @@ -495,7 +495,7 @@ public class DungeonListener { DungeonActionManager.getKilleds().add(deathEvent.entity.getEntityId()); try { - SkyblockStatus skyblockStatus = (SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus(); + SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); if (!skyblockStatus.isOnDungeon()) return; DungeonContext context = skyblockStatus.getContext(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java index 9cb62929..4dab60ed 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java @@ -23,7 +23,8 @@ import java.lang.reflect.Field; @ChannelHandler.Sharable public class PacketListener extends ChannelDuplexHandler { - private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus();; + private final SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { Packet packet = (Packet) msg; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java index cb7468ee..c0724573 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java @@ -71,7 +71,7 @@ public abstract class AbstractFeature { ConfigPanelCreator.map.put("base." + key , new Supplier<MPanel>() { @Override public MPanel get() { - return new PanelDefaultParameterConfig(config, AbstractFeature.this, Collections.<MPanel>emptyList(), Collections.<String>emptySet()); + return new PanelDefaultParameterConfig(config, AbstractFeature.this, Collections.emptyList(), Collections.emptySet()); } }); return "base." + key ; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java index b38bf1b7..92b2c52e 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java @@ -26,10 +26,10 @@ import java.util.Map; public class FeatureRegistry { @Getter - private static List<AbstractFeature> featureList = new ArrayList<AbstractFeature>(); - private static Map<String, AbstractFeature> featureByKey = new HashMap<String, AbstractFeature>(); + private static final List<AbstractFeature> featureList = new ArrayList<AbstractFeature>(); + private static final Map<String, AbstractFeature> featureByKey = new HashMap<String, AbstractFeature>(); @Getter - private static Map<String, List<AbstractFeature>> featuresByCategory = new HashMap<String, List<AbstractFeature>>(); + private static final Map<String, List<AbstractFeature>> featuresByCategory = new HashMap<String, List<AbstractFeature>>(); public static AbstractFeature getFeatureByKey(String key) { return featureByKey.get(key); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java index a1a8fb7a..3b735225 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java @@ -28,14 +28,14 @@ public abstract class GuiFeature extends AbstractFeature implements ScreenRender private double defaultWidth; @Setter(value = AccessLevel.PROTECTED) private double defaultHeight; - private double defaultRatio; + private final double defaultRatio; protected GuiFeature(String category, String name, String description, String key, boolean keepRatio, int width, int height) { super(category, name, description, key); this.keepRatio = keepRatio; this.defaultWidth = width; this.defaultHeight = height; - this.defaultRatio = defaultWidth / (double)defaultHeight; + this.defaultRatio = defaultWidth / defaultHeight; this.featureRect = new GUIRectangle(0, 0, width, height); } 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()))) : "") diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java index adab8bd0..6f3385d4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java @@ -33,11 +33,11 @@ import java.util.List; public class PanelTextParameterConfig extends MPanel { - private StyledTextProvider feature; + private final StyledTextProvider feature; - private MEditableAColor currentColor; - private MEditableAColor backgroundColor; - private MToggleButton shadow; + private final MEditableAColor currentColor; + private final MEditableAColor backgroundColor; + private final MToggleButton shadow; @Override public void onBoundsUpdate() { @@ -48,7 +48,7 @@ public class PanelTextParameterConfig extends MPanel { this.setBounds(new Rectangle(5,5,parentWidth-10, 120)); } - private GuiConfig config; + private final GuiConfig config; public PanelTextParameterConfig(final GuiConfig config, final StyledTextProvider feature) { this.config = config; this.feature = feature; @@ -95,7 +95,7 @@ public class PanelTextParameterConfig extends MPanel { } - private Set<String> selected = new HashSet<String>(); + private final Set<String> selected = new HashSet<String>(); @Override public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java index 7df67515..55ff99e4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java @@ -63,7 +63,7 @@ public abstract class TextHUDFeature extends GuiFeature implements StyledTextPro } String things2 = things.toString().trim(); int lines = 1; - for (char c : things2.toString().toCharArray()) { + for (char c : things2.toCharArray()) { if (c == '\n') lines++; } return lines; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java index c64be9db..1a53ee6a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java @@ -9,8 +9,8 @@ import net.minecraft.client.gui.Gui; import java.awt.*; public class MLabelAndElement extends MPanel { - private MLabel label; - private MPanel element; + private final MLabel label; + private final MPanel element; @Getter @Setter private Color hover; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java index d2391cf3..f43554f2 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java @@ -15,8 +15,8 @@ import java.util.List; public class MNavigatingPane extends MPanel { - private Map<String, MPanel> pages = new HashMap<String, MPanel>(); - private List<MTabButton> bookMarks = new ArrayList<MTabButton>(); + private final Map<String, MPanel> pages = new HashMap<String, MPanel>(); + private final List<MTabButton> bookMarks = new ArrayList<MTabButton>(); @Getter @Setter @@ -33,9 +33,9 @@ public class MNavigatingPane extends MPanel { @Getter private Color background2; - private Stack<String> history = new Stack<String>(); + private final Stack<String> history = new Stack<String>(); - private MButton back = new MButton(); + private final MButton back = new MButton(); public MNavigatingPane() { back.setText("<"); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java index 33be5162..cd776d96 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java @@ -13,15 +13,15 @@ import net.minecraft.client.gui.Gui; import java.awt.*; public class MParameter extends MPanel { - private MLabel label; - private MLabel data; + private final MLabel label; + private final MLabel data; @Getter @Setter private Color hover = Color.gray; @Getter @Setter private Parameter parameter; - private DynamicEditor processorParameterEditPane; + private final DynamicEditor processorParameterEditPane; public MParameter(final Parameter parameter, DynamicEditor processorParameterEditPane) { this.processorParameterEditPane = processorParameterEditPane; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java index 138846b8..586ba248 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java @@ -20,14 +20,14 @@ import java.awt.*; public class MPortableColorEdit extends MPanel { - private float[] hsv = new float[3]; + private final float[] hsv = new float[3]; private float alpha = 0; private float chromaSpeed = 0; @Getter private AColor color; - private MTextField textField; + private final MTextField textField; public MPortableColorEdit() { textField = new MTextField() { @@ -82,7 +82,7 @@ public class MPortableColorEdit extends MPanel { GlStateManager.enableBlend(); GlStateManager.disableDepth(); GlStateManager.disableTexture2D(); - GlStateManager.disableCull();; + GlStateManager.disableCull(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // worldrenderer.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java index dc14264b..916a351a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java @@ -16,8 +16,8 @@ import java.util.Map; public class MTabbedPane extends MPanel { - private Map<String, MPanel> tabs = new HashMap<String, MPanel>(); - private Map<String, MTabButton> buttons = new HashMap<String, MTabButton>(); + private final Map<String, MPanel> tabs = new HashMap<String, MPanel>(); + private final Map<String, MTabButton> buttons = new HashMap<String, MTabButton>(); @Getter @Setter diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java index 160ad1d6..a6b64bb9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java @@ -16,7 +16,7 @@ import java.io.IOException; @Getter public class MTextField extends MPanel { - private Color foreground = Color.white; + private final Color foreground = Color.white; private String text = "asdasdasd"; private int cursorBlickTicker = 0; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java index b7684789..579d0115 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java @@ -13,14 +13,14 @@ import java.awt.*; import java.util.List; public class MValue<T> extends MPanel { @Getter - private T data; + private final T data; private ValueEditOffsetPointSet valueEditOffsetPointSet; - private MLabel dataLab; + private final MLabel dataLab; @Getter @Setter private Color hover = Color.gray; - private List<MPanel> addons; + private final List<MPanel> addons; public MValue(final T parameter, List<MPanel> addons) { this.addons = addons; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java index 799f79c3..f7b1fee1 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java @@ -23,10 +23,10 @@ public class PartyJoinRequest { private Reply reply; @AllArgsConstructor - public static enum Reply { + public enum Reply { ACCEPT("Accepted"), DENY("Denied"), IGNORE("Ignored"); @Getter - private String past; + private final String past; } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java index 1083248c..f8a28190 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java @@ -34,7 +34,7 @@ public class PartyManager implements StompMessageHandler { @Getter private String askToJoinSecret = null; - private SecureRandom random = new SecureRandom(); + private final SecureRandom random = new SecureRandom(); private static final String validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"; @Getter @@ -44,7 +44,7 @@ public class PartyManager implements StompMessageHandler { private int invitedDash =0; @Getter - private Queue<Consumer<Set<String>>> runOnMembersReceived = new LinkedList<>(); + private final Queue<Consumer<Set<String>>> runOnMembersReceived = new LinkedList<>(); @Getter @@ -107,8 +107,8 @@ public class PartyManager implements StompMessageHandler { } private int partyJoin =0; - private Set<String> members = new HashSet<>(); - private Map<String, Long> recentlyJoined = new HashMap<>(); + private final Set<String> members = new HashSet<>(); + private final Map<String, Long> recentlyJoined = new HashMap<>(); @SubscribeEvent(priority = EventPriority.HIGHEST) public void onMessage(ClientChatReceivedEvent chatReceivedEvent) { if (chatReceivedEvent.type == 2) return; @@ -119,7 +119,7 @@ public class PartyManager implements StompMessageHandler { if (str.startsWith("§eYou have joined ")) { members.clear(); - String strs[] = TextUtils.stripColor(str).split(" "); + String[] strs = TextUtils.stripColor(str).split(" "); for (String s : strs) { if (s.endsWith("'s")) { members.add(s.substring(0, s.indexOf("'s"))); @@ -344,7 +344,7 @@ public class PartyManager implements StompMessageHandler { } } } catch (Exception ex) {ex.printStackTrace(); - e.sendDebugChat(new ChatComponentText("ERRORRR!! on chat "+ex.toString()));} + e.sendDebugChat(new ChatComponentText("ERRORRR!! on chat "+ ex));} } @SubscribeEvent public void onTick(TickEvent.ClientTickEvent clientTickEvent) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java index 6b07e935..ac56ab00 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java @@ -16,8 +16,8 @@ import net.minecraft.world.pathfinder.NodeProcessor; import java.util.Set; public class NodeProcessorDungeonRoom extends NodeProcessor { - private DungeonRoom dungeonRoom; - private BlockPos sub; + private final DungeonRoom dungeonRoom; + private final BlockPos sub; public NodeProcessorDungeonRoom(DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; sub = dungeonRoom.getMax().subtract(dungeonRoom.getMin()); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java b/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java index 283af5c1..17cce47f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java @@ -20,7 +20,7 @@ import java.util.Set; @AllArgsConstructor public class DGTexturePack implements IResourcePack { - private b authenticator; + private final b authenticator; @Override public InputStream getInputStream(ResourceLocation location) throws IOException { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java index ac4521c8..76f42430 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java @@ -35,10 +35,10 @@ public class EditingContext { } @Getter - private DungeonRoom room; + private final DungeonRoom room; @Getter - private Stack<GuiScreen> guiStack = new Stack<GuiScreen>(); + private final Stack<GuiScreen> guiStack = new Stack<GuiScreen>(); public boolean isEditingSecrets() { return guiDungeonRoomEdit.isEditingSelected(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java index da08a330..dd5cce49 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java @@ -22,18 +22,18 @@ import java.util.List; public class GuiDungeonAddSet extends GuiScreen { - private MPanel mainPanel = new MPanel(); + private final MPanel mainPanel = new MPanel(); - private ValueEditOffsetPointSet valueEditOffsetPointSet; + private final ValueEditOffsetPointSet valueEditOffsetPointSet; - private MButton add; - private MButton back; + private final MButton add; + private final MButton back; @Getter - private OffsetPoint start; + private final OffsetPoint start; @Getter - private OffsetPoint end; + private final OffsetPoint end; public void onWorldRender(float partialTicks) { for (OffsetPoint pos:getBlockPoses()) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java index 9857b509..f54a0128 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java @@ -22,17 +22,17 @@ import java.io.IOException; public class GuiDungeonParameterEdit extends GuiScreen { - private MPanel mainPanel = new MPanel(); + private final MPanel mainPanel = new MPanel(); - private Parameter parameter; - private DungeonRoom dungeonRoom; + private final Parameter parameter; + private final DungeonRoom dungeonRoom; private String classSelection; - private MPanel currentValueEdit; + private final MPanel currentValueEdit; - private MButton save; - private MButton delete; + private final MButton save; + private final MButton delete; @Getter private ValueEdit valueEdit; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java index f7638fc7..8989ab59 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java @@ -17,13 +17,13 @@ import java.io.IOException; public class GuiDungeonRoomEdit extends GuiScreen { - private MPanel mainPanel = new MPanel(); + private final MPanel mainPanel = new MPanel(); - private DungeonRoom room; + private final DungeonRoom room; - private MTabbedPane tabbedPane; + private final MTabbedPane tabbedPane; @Getter - private SecretEditPane sep; + private final SecretEditPane sep; public GuiDungeonRoomEdit(DungeonRoom room) { this.room = room; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java index 8601275c..e7565def 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java @@ -22,7 +22,7 @@ import java.io.IOException; public class GuiDungeonValueEdit extends GuiScreen { - private MPanel mainPanel = new MPanel() { + private final MPanel mainPanel = new MPanel() { @Override public void onBoundsUpdate() { for (int i = 0; i < addons.size(); i++) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java index 3644f425..63449f91 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java @@ -24,13 +24,13 @@ public class ValueEditBreakableWall extends MPanel implements ValueEdit<DungeonB // scroll pane // just create // add set - private DungeonBreakableWall dungeonBreakableWall; + private final DungeonBreakableWall dungeonBreakableWall; - private MLabel label; - private MValue<OffsetPointSet> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; - private MButton updateOnlyAir; + private final MLabel label; + private final MValue<OffsetPointSet> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; + private final MButton updateOnlyAir; public ValueEditBreakableWall(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java index aa9684ba..85f9353a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java @@ -24,15 +24,15 @@ public class ValueEditDoor extends MPanel implements ValueEdit<DungeonDoor> { // scroll pane // just create // add set - private DungeonDoor dungeonDoor; - - private MLabel label; - private MValue<OffsetPointSet> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite_par; - private MTextField preRequisite2; - private MLabelAndElement preRequisite2_par; - private MButton updateOnlyAir; + private final DungeonDoor dungeonDoor; + + private final MLabel label; + private final MValue<OffsetPointSet> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite_par; + private final MTextField preRequisite2; + private final MLabelAndElement preRequisite2_par; + private final MButton updateOnlyAir; public ValueEditDoor(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDummy.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDummy.java index 73c3df8b..8ef3858e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDummy.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDummy.java @@ -24,12 +24,12 @@ public class ValueEditDummy extends MPanel implements ValueEdit<DungeonDummy> { // scroll pane // just create // add set - private DungeonDummy dungeonSecret; + private final DungeonDummy dungeonSecret; - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; public ValueEditDummy(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditFairySoul.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditFairySoul.java index d16fb5bc..d4d5ecf5 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditFairySoul.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditFairySoul.java @@ -21,12 +21,12 @@ public class ValueEditFairySoul extends MPanel implements ValueEdit<DungeonFairy // scroll pane // just create // add set - private DungeonFairySoul dungeonSecret; + private final DungeonFairySoul dungeonSecret; - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; public ValueEditFairySoul(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditJournal.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditJournal.java index cc94278f..3440f0a7 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditJournal.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditJournal.java @@ -25,12 +25,12 @@ public class ValueEditJournal extends MPanel implements ValueEdit<DungeonJournal // scroll pane // just create // add set - private DungeonJournal dungeonSecret; + private final DungeonJournal dungeonSecret; - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; public ValueEditJournal(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java index f9c0e91a..fdc3fde1 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java @@ -20,14 +20,14 @@ public class ValueEditLever extends MPanel implements ValueEdit<DungeonLever> { // scroll pane // just create // add set - private DungeonLever dungeonLever; - - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; - private MTextField target; - private MLabelAndElement target2; + private final DungeonLever dungeonLever; + + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; + private final MTextField target; + private final MLabelAndElement target2; public ValueEditLever(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditNPC.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditNPC.java index 49f45932..cad11f33 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditNPC.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditNPC.java @@ -25,12 +25,12 @@ public class ValueEditNPC extends MPanel implements ValueEdit<DungeonNPC> { // scroll pane // just create // add set - private DungeonNPC dungeonSecret; + private final DungeonNPC dungeonSecret; - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; public ValueEditNPC(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java index 7629360e..4e5dbb48 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java @@ -24,13 +24,13 @@ public class ValueEditOnewayDoor extends MPanel implements ValueEdit<DungeonOnew // scroll pane // just create // add set - private DungeonOnewayDoor dungeonDoor; + private final DungeonOnewayDoor dungeonDoor; - private MLabel label; - private MValue<OffsetPointSet> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; - private MButton updateOnlyAir; + private final MLabel label; + private final MValue<OffsetPointSet> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; + private final MButton updateOnlyAir; public ValueEditOnewayDoor(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java index ec1702e5..67beb1df 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java @@ -23,14 +23,14 @@ public class ValueEditOnewayLever extends MPanel implements ValueEdit<DungeonOne // scroll pane // just create // add set - private DungeonOnewayLever dungeonLever; - - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; - private MTextField target; - private MLabelAndElement target2; + private final DungeonOnewayLever dungeonLever; + + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; + private final MTextField target; + private final MLabelAndElement target2; public ValueEditOnewayLever(final Parameter parameter2) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java index f52c8b69..4581b2e7 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java @@ -22,14 +22,14 @@ public class ValueEditPressurePlate extends MPanel implements ValueEdit<DungeonP // scroll pane // just create // add set - private DungeonPressurePlate dungeonPressureplate; - - private MLabel label; - private MValue<OffsetPoint> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; - private MTextField target; - private MLabelAndElement target2; + private final DungeonPressurePlate dungeonPressureplate; + + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; + private final MTextField target; + private final MLabelAndElement target2; public ValueEditPressurePlate(final Parameter parameter2) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java index ceda3e6d..bbe4f81a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java @@ -20,13 +20,13 @@ public class ValueEditSecret extends MPanel implements ValueEdit<DungeonSecret> // scroll pane // just create // add set - private DungeonSecret dungeonSecret; + private final DungeonSecret dungeonSecret; - private MLabel label; - private MValue<OffsetPoint> value; - private MStringSelectionButton selectionButton; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; + private final MLabel label; + private final MValue<OffsetPoint> value; + private final MStringSelectionButton selectionButton; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; public ValueEditSecret(final Parameter parameter2) { this.parameter = parameter2; @@ -41,7 +41,7 @@ public class ValueEditSecret extends MPanel implements ValueEdit<DungeonSecret> value = new MValue(dungeonSecret.getSecretPoint(), Collections.emptyList()); add(value); - selectionButton = new MStringSelectionButton(Arrays.asList(new String[] {"CHEST", "BAT", "ITEM_DROP", "ESSENCE"}), dungeonSecret.getSecretType().name()); + selectionButton = new MStringSelectionButton(Arrays.asList("CHEST", "BAT", "ITEM_DROP", "ESSENCE"), dungeonSecret.getSecretType().name()); selectionButton.setOnUpdate(new Runnable() { @Override public void run() { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java index 205c5431..5bd7e0b1 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java @@ -20,12 +20,12 @@ public class ValueEditTomb extends MPanel implements ValueEdit<DungeonTomb> { // scroll pane // just create // add set - private DungeonTomb dungeonTomb; + private final DungeonTomb dungeonTomb; - private MLabel label; - private MValue<OffsetPointSet> value; - private MTextField preRequisite; - private MLabelAndElement preRequisite2; + private final MLabel label; + private final MValue<OffsetPointSet> value; + private final MTextField preRequisite; + private final MLabelAndElement preRequisite2; public ValueEditTomb(final Parameter parameter2) { this.parameter = parameter2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java index 60e4995a..82716d2e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java @@ -9,12 +9,12 @@ import kr.syeyoung.dungeonsguide.gui.elements.*; import java.awt.*; public class ActionDisplayPane extends MPanel { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; private ActionTreeDisplayPane displayPane; - private MTextField textField; - private MButton calculate; + private final MTextField textField; + private final MButton calculate; public ActionDisplayPane(final DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java index a4f95e07..17256899 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java @@ -24,8 +24,8 @@ public class ActionTreeDisplayPane extends MPanel { private float scale; - private DungeonRoom dungeonRoom; - private ActionTree tree; + private final DungeonRoom dungeonRoom; + private final ActionTree tree; private List<Action> linearified; public ActionTreeDisplayPane(DungeonRoom dungeonRoom, ActionTree tree) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java index c23d7c0d..e424ed2c 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java @@ -25,21 +25,21 @@ import java.util.UUID; import java.util.zip.GZIPOutputStream; public class GeneralEditPane extends MPanel { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; - private MLabelAndElement uuid; - private MLabelAndElement name; - private MLabelAndElement secrets; + private final MLabelAndElement uuid; + private final MLabelAndElement name; + private final MLabelAndElement secrets; - private MLabelAndElement shape; - private MLabelAndElement rotation; - private MLabelAndElement shape2; + private final MLabelAndElement shape; + private final MLabelAndElement rotation; + private final MLabelAndElement shape2; private MButton save; - private MButton end; - private MButton schematic; + private final MButton end; + private final MButton schematic; - private MLabelAndElement roomProcessor; + private final MLabelAndElement roomProcessor; public GeneralEditPane(final DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java index 9ea8cf79..d9ea3cd7 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java @@ -16,11 +16,11 @@ import java.util.Map; import java.util.UUID; public class ProcessorParameterEditPane extends MPanel implements DynamicEditor { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; private MButton save; private MButton create; - private List<MParameter> parameters = new ArrayList<MParameter>(); + private final List<MParameter> parameters = new ArrayList<MParameter>(); public ProcessorParameterEditPane(DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java index ac2c55b2..47c0ac35 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java @@ -21,7 +21,7 @@ public class RoomDataDisplayPane extends MPanel { private int selectedX = -1; private int selectedY = -1; - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; public RoomDataDisplayPane(DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java index d8463ad9..025e3631 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java @@ -23,9 +23,10 @@ public class RoomMatchDisplayPane extends MPanel { private int offsetX = 0; private int offsetY = 0; - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; - private int[][] currentBlocks, targetBlocks; + private final int[][] currentBlocks; + private int[][] targetBlocks; public RoomMatchDisplayPane(DungeonRoom dungeonRoom, UUID uid, int rotation) { this.dungeonRoom = dungeonRoom; @@ -84,7 +85,7 @@ public class RoomMatchDisplayPane extends MPanel { fr.drawString("N", x *16 +10 + offsetX, z *16 +10 + offsetY,0xFFFF0000); } if (z == hoverY && x == hoverX) { - RenderUtils.drawHoveringText(Arrays.asList(new String[] {"Expected "+data2 +" But found "+data1}), relMousex0, relMousey0, fr); + RenderUtils.drawHoveringText(Arrays.asList("Expected "+data2 +" But found "+data1), relMousex0, relMousey0, fr); } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java index 1bb143ef..3f7da488 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java @@ -9,12 +9,12 @@ import java.awt.*; import java.util.UUID; public class RoommatchingPane extends MPanel { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; private RoomMatchDisplayPane displayPane; - private MTextField textField; - private MButton calculate; + private final MTextField textField; + private final MButton calculate; public RoommatchingPane(final DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java index 6225f133..5240eb41 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java @@ -17,13 +17,13 @@ import java.util.Map; import java.util.UUID; public class SecretEditPane extends MPanel implements DynamicEditor { - private DungeonRoom dungeonRoom; + private final DungeonRoom dungeonRoom; private MButton save; private MButton create; - private List<MParameter> parameters = new ArrayList<MParameter>(); + private final List<MParameter> parameters = new ArrayList<MParameter>(); - private List<String> allowedClasses = new ArrayList<String>(); + private final List<String> allowedClasses = new ArrayList<String>(); public SecretEditPane(DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java index 5025132d..bd939f2d 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java @@ -3,7 +3,7 @@ package kr.syeyoung.dungeonsguide.roomedit.valueedit; import kr.syeyoung.dungeonsguide.roomedit.Parameter; public interface ValueEdit<T extends Object> { - public void setParameter(Parameter parameter); + void setParameter(Parameter parameter); - public void renderWorld(float partialTicks); + void renderWorld(float partialTicks); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java index fe711ad7..d0b4839c 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java @@ -110,7 +110,7 @@ public class ValueEditAColor extends MPanel implements ValueEdit<AColor> { } } - private float[] hsv = new float[3]; + private final float[] hsv = new float[3]; private float alpha = 0; public void update() { @@ -139,7 +139,7 @@ public class ValueEditAColor extends MPanel implements ValueEdit<AColor> { GlStateManager.enableBlend(); GlStateManager.disableDepth(); GlStateManager.disableTexture2D(); - GlStateManager.disableCull();; + GlStateManager.disableCull(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // worldrenderer.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java index b485986c..bfb8b1c8 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java @@ -28,7 +28,7 @@ public class ValueEditBoolean extends MPanel implements ValueEdit<Boolean> { } { boolean newData = (Boolean) parameter.getNewData(); - final MStringSelectionButton textField = new MStringSelectionButton(Arrays.asList(new String[] {"true", "false"}), Boolean.toString(newData)); + final MStringSelectionButton textField = new MStringSelectionButton(Arrays.asList("true", "false"), Boolean.toString(newData)); textField.setOnUpdate(new Runnable() { @Override public void run() { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java index c39c2179..23a4ac7d 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java @@ -92,7 +92,7 @@ public class ValueEditColor extends MPanel implements ValueEdit<Color> { } } - private float[] hsv = new float[3]; + private final float[] hsv = new float[3]; public void update() { if (hsv[2] > 1) hsv[2] = 1; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java index 2991e03e..4f3a78d9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java @@ -3,9 +3,9 @@ package kr.syeyoung.dungeonsguide.roomedit.valueedit; import kr.syeyoung.dungeonsguide.roomedit.Parameter; public interface ValueEditCreator<T extends ValueEdit> { - public T createValueEdit(Parameter parameter); + T createValueEdit(Parameter parameter); - public Object createDefaultValue(Parameter parameter); + Object createDefaultValue(Parameter parameter); - public Object cloneObj(Object object); + Object cloneObj(Object object); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java index bf26c3ea..1d071a83 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java @@ -24,11 +24,12 @@ public class ValueEditOffsetPointSet extends MPanel implements ValueEdit<OffsetP // just create // add set - private MPanel scroll; + private final MPanel scroll; @Getter - private List<MPanel> MParameters = new ArrayList<MPanel>(); + private final List<MPanel> MParameters = new ArrayList<MPanel>(); - private MButton add, addSet; + private final MButton add; + private final MButton addSet; public void delete(OffsetPoint offsetPoint) { ((OffsetPointSet)parameter.getNewData()).getOffsetPointList().remove(offsetPoint); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java index 4437088e..eca46ec9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java @@ -13,7 +13,7 @@ import java.util.List; import java.util.Map; public class ValueEditRegistry { - private static Map<String, ValueEditCreator> valueEditMap = new HashMap<String, ValueEditCreator>(); + private static final Map<String, ValueEditCreator> valueEditMap = new HashMap<String, ValueEditCreator>(); public static ValueEditCreator getValueEditMap(String className) { return valueEditMap.get(className); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java index 7a4c4413..6dcaada1 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java @@ -74,7 +74,7 @@ public class GeneralRoomProcessor implements RoomProcessor { if (value instanceof DungeonSecret) ((DungeonSecret) value).tick(dungeonRoom); } } - private Set<String> visited = new HashSet<String>(); + private final Set<String> visited = new HashSet<String>(); public void searchForNextTarget() { if (getDungeonRoom().getCurrentState() == DungeonRoom.RoomState.FINISHED) { @@ -136,7 +136,7 @@ public class GeneralRoomProcessor implements RoomProcessor { public void drawWorld(float partialTicks) { if (FeatureRegistry.DEBUG.isEnabled() && (EditingContext.getEditingContext() != null && EditingContext.getEditingContext().getCurrent() instanceof GuiDungeonRoomEdit)) { for (Map.Entry<String, DungeonMechanic> value : dungeonRoom.getMechanics().entrySet()) { - if (value.getValue() == null) continue;; + if (value.getValue() == null) continue; value.getValue().highlight(new Color(0,255,255,50), value.getKey(), dungeonRoom, partialTicks); } } @@ -276,7 +276,7 @@ public class GeneralRoomProcessor implements RoomProcessor { secret.setSecretPoint(new OffsetPoint(dungeonRoom, DungeonActionManager.getSpawnLocation().get(deathEvent.entity.getEntityId()) )); - ((GuiDungeonRoomEdit) screen).getSep().createNewMechanic("BAT-"+UUID.randomUUID().toString(), + ((GuiDungeonRoomEdit) screen).getSep().createNewMechanic("BAT-"+ UUID.randomUUID(), secret); return; } @@ -287,7 +287,7 @@ public class GeneralRoomProcessor implements RoomProcessor { secret.setSecretPoint(new OffsetPoint(dungeonRoom, DungeonActionManager.getSpawnLocation().get(deathEvent.entity.getEntityId()) )); - ((GuiDungeonRoomEdit) EditingContext.getEditingContext().getCurrent()).getSep().createNewMechanic("BAT-"+UUID.randomUUID().toString(), + ((GuiDungeonRoomEdit) EditingContext.getEditingContext().getCurrent()).getSep().createNewMechanic("BAT-"+ UUID.randomUUID(), secret); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java index e0541bc8..814bf006 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java @@ -10,7 +10,7 @@ import java.util.Map; import java.util.Set; public class ProcessorFactory { - private static Map<String, RoomProcessorGenerator> map = new HashMap<String, RoomProcessorGenerator>(); + private static final Map<String, RoomProcessorGenerator> map = new HashMap<String, RoomProcessorGenerator>(); public static RoomProcessorGenerator getRoomProcessorGenerator(String processorId) { return map.get(processorId); @@ -39,7 +39,7 @@ public class ProcessorFactory { registerRoomProcessor("puzzle_silverfish", new RoomProcessorIcePath.Generator()); // done registerRoomProcessor("puzzle_icefill", new RoomProcessorIcePath2.Generator()); registerRoomProcessor("puzzle_box", new RoomProcessorBoxSolver.Generator()); - registerRoomProcessor("puzzle_trivia", new RoomProcessorTrivia.Generator());; + registerRoomProcessor("puzzle_trivia", new RoomProcessorTrivia.Generator()); registerRoomProcessor("puzzle_bombdefuse", new RoomProcessorBombDefuseSolver.Generator()); registerRoomProcessor("bossroom", new RoomProcessorRedRoom.Generator()); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorButtonSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorButtonSolver.java index 92bd9edb..1fbe3aa7 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorButtonSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorButtonSolver.java @@ -38,7 +38,7 @@ public class RoomProcessorButtonSolver extends GeneralRoomProcessor { private long clicked; private int clickedButton = -1; - private int[] result = new int[12]; + private final int[] result = new int[12]; @Override public void onInteractBlock(PlayerInteractEvent event) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java index a2f6c025..592c3f31 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java @@ -23,9 +23,9 @@ import java.util.Set; public class RoomProcessorCreeperSolver extends GeneralRoomProcessor { - private List<BlockPos[]> poses = new ArrayList<BlockPos[]>(); + private final List<BlockPos[]> poses = new ArrayList<BlockPos[]>(); - private boolean bugged = false; + private final boolean bugged = false; public RoomProcessorCreeperSolver(DungeonRoom dungeonRoom) { super(dungeonRoom); @@ -129,11 +129,8 @@ public class RoomProcessorCreeperSolver extends GeneralRoomProcessor { for (int i = 0; i < poses.size(); i++) { BlockPos[] poset = poses.get(i); Color color = colors[i % colors.length]; - boolean oneIsConnected = false; - if (w.getChunkFromBlockCoords(poset[0]).getBlock(poset[0]) != Blocks.sea_lantern && - w.getChunkFromBlockCoords(poset[1]).getBlock(poset[1]) != Blocks.sea_lantern) { - oneIsConnected = true; - } + boolean oneIsConnected = w.getChunkFromBlockCoords(poset[0]).getBlock(poset[0]) != Blocks.sea_lantern && + w.getChunkFromBlockCoords(poset[1]).getBlock(poset[1]) != Blocks.sea_lantern; RenderUtils.drawLine(new Vec3(poset[0].getX() +0.5, poset[0].getY() +0.5, poset[0].getZ()+0.5), new Vec3(poset[1].getX() +0.5, poset[1].getY() +0.5, poset[1].getZ()+0.5), oneIsConnected ? new Color(0,0,0,50) : color, partialTicks, true); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java index 700d6abd..6fb93d8f 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java @@ -23,7 +23,7 @@ public class RoomProcessorIcePath extends GeneralRoomProcessor { private int[][] map; private OffsetPoint[][] map2; - private Set<OffsetPoint> endNode = new HashSet<OffsetPoint>(); + private final Set<OffsetPoint> endNode = new HashSet<OffsetPoint>(); private final List<BlockPos> solution = new ArrayList<BlockPos>(); @@ -61,7 +61,7 @@ public class RoomProcessorIcePath extends GeneralRoomProcessor { buildMap(); err = false; } catch (Exception e) { - e.printStackTrace();; + e.printStackTrace(); err = true; return; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java index c1fcff54..9fa23c68 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java @@ -26,7 +26,7 @@ public class RoomProcessorTeleportMazeSolver extends GeneralRoomProcessor { yLevel = dungeonRoom.getMin().getY() - 1; } - private List<BlockPos> visitedPortals = new ArrayList<BlockPos>(); + private final List<BlockPos> visitedPortals = new ArrayList<BlockPos>(); private int yLevel = 0; private double slope1, slope2; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java index b3511dec..9a93d100 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java @@ -21,7 +21,7 @@ import java.util.List; public class RoomProcessorTicTacToeSolver extends GeneralRoomProcessor { - private OffsetPointSet board; + private final OffsetPointSet board; private byte[][] lastBoard; public RoomProcessorTicTacToeSolver(DungeonRoom dungeonRoom) { super(dungeonRoom); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java index db2bb922..e60f936f 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java @@ -33,7 +33,7 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor { } - private List<String> questionDialog = new ArrayList<String>(); + private final List<String> questionDialog = new ArrayList<String>(); private boolean questionDialogStart = false; // private static final Map<String, String[]> answers = new HashMap<String,String[]>() {{ diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java index c02fb660..1ea55036 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java @@ -46,7 +46,7 @@ import java.util.List; public class RoomProcessorBombDefuseSolver extends GeneralRoomProcessor { @Getter - private List<ChamberSet> chambers = new ArrayList<ChamberSet>(); + private final List<ChamberSet> chambers = new ArrayList<ChamberSet>(); @Getter private OffsetPointSet doors; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/BombDefuseChamberGenerator.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/BombDefuseChamberGenerator.java index ff33e4ad..590e2928 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/BombDefuseChamberGenerator.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/BombDefuseChamberGenerator.java @@ -3,10 +3,10 @@ package kr.syeyoung.dungeonsguide.roomprocessor.bombdefuse.chambers; import kr.syeyoung.dungeonsguide.roomprocessor.bombdefuse.RoomProcessorBombDefuseSolver; public interface BombDefuseChamberGenerator { - public boolean match(BDChamber left, BDChamber right); + boolean match(BDChamber left, BDChamber right); - public String getName(); + String getName(); - public ChamberProcessor createLeft(BDChamber left, RoomProcessorBombDefuseSolver solver); - public ChamberProcessor createRight(BDChamber right, RoomProcessorBombDefuseSolver solver); + ChamberProcessor createLeft(BDChamber left, RoomProcessorBombDefuseSolver solver); + ChamberProcessor createRight(BDChamber right, RoomProcessorBombDefuseSolver solver); }
\ No newline at end of file diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/ChamberProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/ChamberProcessor.java index fc661cd3..11bf65bf 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/ChamberProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/ChamberProcessor.java @@ -4,6 +4,6 @@ import kr.syeyoung.dungeonsguide.roomprocessor.RoomProcessor; import net.minecraft.nbt.NBTTagCompound; public interface ChamberProcessor extends RoomProcessor { - public void onDataRecieve(NBTTagCompound compound); - public String getName(); + void onDataRecieve(NBTTagCompound compound); + String getName(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/GeneralDefuseChamberProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/GeneralDefuseChamberProcessor.java index b64d11de..4c56b808 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/GeneralDefuseChamberProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/GeneralDefuseChamberProcessor.java @@ -20,8 +20,8 @@ import org.lwjgl.input.Keyboard; @Getter public abstract class GeneralDefuseChamberProcessor implements ChamberProcessor{ - private RoomProcessorBombDefuseSolver solver; - private BDChamber chamber; + private final RoomProcessorBombDefuseSolver solver; + private final BDChamber chamber; public GeneralDefuseChamberProcessor(RoomProcessorBombDefuseSolver solver, BDChamber chamber) { this.solver = solver; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowLeftProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowLeftProcessor.java index f53b5aba..ffcb21b2 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowLeftProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowLeftProcessor.java @@ -31,8 +31,8 @@ public class ArrowLeftProcessor extends GeneralDefuseChamberProcessor { private int answer = -1; - private int[] answers = new int[9]; - private BlockPos[] grid = new BlockPos[9]; + private final int[] answers = new int[9]; + private final BlockPos[] grid = new BlockPos[9]; @Override public void tick() { super.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java index 1203e7b4..fe6faf32 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java @@ -34,10 +34,10 @@ public class ArrowRightProcessor extends GeneralDefuseChamberProcessor { private int answer = -1; - private int[] correctAnswers = new int[9]; - private int[] currentAnswers = new int[9]; - private BlockPos[] grid = new BlockPos[9]; - private BlockPos center; + private final int[] correctAnswers = new int[9]; + private final int[] currentAnswers = new int[9]; + private final BlockPos[] grid = new BlockPos[9]; + private final BlockPos center; @Override public void tick() { super.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorLeftProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorLeftProcessor.java index df6f324b..81fd2910 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorLeftProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorLeftProcessor.java @@ -30,10 +30,12 @@ public class ColorLeftProcessor extends GeneralDefuseChamberProcessor { b3p = chamber.getBlockPos(7,1,4); } - private BlockPos center; + private final BlockPos center; private Block w1, w2, w3, c1, c2, c3; - private BlockPos b1p, b2p, b3p; + private final BlockPos b1p; + private final BlockPos b2p; + private final BlockPos b3p; private int s1, s2, s3; private int s1t, s2t, s3t; private boolean solutionBuilt; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java index 89d989c9..6e7265c1 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java @@ -33,9 +33,11 @@ public class ColorRightProcessor extends GeneralDefuseChamberProcessor { b3 = chamber.getBlockPos(1,3,1); } - private BlockPos center; + private final BlockPos center; - private BlockPos b1, b2, b3; + private final BlockPos b1; + private final BlockPos b2; + private final BlockPos b3; private byte b1b = 0, b2b = 0, b3b = 0, c1b, c2b, c3b; private int answer = -1; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperLeftProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperLeftProcessor.java index da1b7b22..22f1da0b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperLeftProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperLeftProcessor.java @@ -34,7 +34,7 @@ public class CreeperLeftProcessor extends GeneralDefuseChamberProcessor { private int answer = -1; - private BlockPos[] poses; + private final BlockPos[] poses; @Override public void tick() { super.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java index 42726479..48fa1f05 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java @@ -30,8 +30,8 @@ public class CreeperRightProcessor extends GeneralDefuseChamberProcessor { private int answer = -1; - private BlockPos[] poses; - private BlockPos center; + private final BlockPos[] poses; + private final BlockPos center; @Override public void tick() { super.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java index c3b4c170..b3e59ca8 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java @@ -30,14 +30,14 @@ public class GoldenPathLeftProcessor extends GeneralDefuseChamberProcessor { // 1 up 2 right 3 down 4 left - private static final Point vectors[] = new Point[] { + private static final Point[] vectors = new Point[] { new Point(0,1), new Point(-1,0), new Point(0, -1), new Point(1, 0) }; - private LinkedList<BlockPos> blocksolution = new LinkedList<BlockPos>(); + private final LinkedList<BlockPos> blocksolution = new LinkedList<BlockPos>(); private String goldenPathsolution; @Override public void tick() { @@ -115,7 +115,7 @@ public class GoldenPathLeftProcessor extends GeneralDefuseChamberProcessor { BlockPos lastLoc = new BlockPos(4,0,0); blocksolution.addFirst(getChamber().getBlockPos(4,1,0)); for (Character c:actual.toCharArray()) { - int dir = (int) (Integer.parseInt(c+"") % 4); + int dir = Integer.parseInt(c+"") % 4; lastLoc = lastLoc.add(vectors[dir].x, 0, vectors[dir].y); blocksolution.add(getChamber().getBlockPos(lastLoc.getX(), 1, lastLoc.getZ())); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathRightProcessor.java index d35a8a2d..6699ce29 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathRightProcessor.java @@ -29,16 +29,16 @@ public class GoldenPathRightProcessor extends GeneralDefuseChamberProcessor { } - private BlockPos center; + private final BlockPos center; // 1 up 2 right 3 down 4 left - private static final Point vectors[] = new Point[] { + private static final Point[] vectors = new Point[] { new Point(0,1), new Point(-1,0), new Point(0, -1), new Point(1, 0) }; - private LinkedList<BlockPos> blocksolution = new LinkedList<BlockPos>(); + private final LinkedList<BlockPos> blocksolution = new LinkedList<BlockPos>(); @Override public void drawWorld(float partialTicks) { @@ -60,7 +60,7 @@ public class GoldenPathRightProcessor extends GeneralDefuseChamberProcessor { BlockPos lastLoc = new BlockPos(4,0,0); blocksolution.addFirst(getChamber().getBlockPos(4,1,0)); for (Character c:actual.toCharArray()) { - int dir = (int) (Integer.parseInt(c+"") % 4); + int dir = Integer.parseInt(c+"") % 4; lastLoc = lastLoc.add(vectors[dir].x, 0, vectors[dir].y); blocksolution.add(getChamber().getBlockPos(lastLoc.getX(), 1, lastLoc.getZ())); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/maze/MazeRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/maze/MazeRightProcessor.java index f58b3f3a..824e33de 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/maze/MazeRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/maze/MazeRightProcessor.java @@ -32,8 +32,8 @@ public class MazeRightProcessor extends GeneralDefuseChamberProcessor { } } - private BlockPos center; - private Map<Block, BlockPos> blockToBlockPosMap = new HashMap<Block, BlockPos>(); + private final BlockPos center; + private final Map<Block, BlockPos> blockToBlockPosMap = new HashMap<Block, BlockPos>(); @Override public String getName() { return "mazeRight"; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberLeftProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberLeftProcessor.java index 38a220e8..91971fe0 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberLeftProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberLeftProcessor.java @@ -36,7 +36,10 @@ public class NumberLeftProcessor extends GeneralDefuseChamberProcessor { private int answer = -1, d1, d2, d3 ,d4; - private BlockPos d1p, d2p, d3p, d4p; + private final BlockPos d1p; + private final BlockPos d2p; + private final BlockPos d3p; + private final BlockPos d4p; @Override public void tick() { super.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java index a764b1d8..40e46429 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java @@ -33,7 +33,11 @@ public class NumberRightProcessor extends GeneralDefuseChamberProcessor { private int answer = -1, d1, d2, d3 ,d4, a1, a2, a3, a4; - private BlockPos d1p, d2p, d3p, d4p, center; + private final BlockPos d1p; + private final BlockPos d2p; + private final BlockPos d3p; + private final BlockPos d4p; + private final BlockPos center; @Override public void tick() { super.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java index d53722a0..5b9dd36c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java @@ -14,7 +14,7 @@ public class BossfightProcessorLivid extends GeneralBossfightProcessor { private String prefix; private EntityOtherPlayerMP realLivid; - private Set<String> knownLivids = new HashSet<String>(); + private final Set<String> knownLivids = new HashSet<String>(); public BossfightProcessorLivid() { addPhase(PhaseData.builder().phase("start").build()); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java index d07c4989..dd4091df 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java @@ -53,7 +53,7 @@ public class BossfightProcessorThorn extends GeneralBossfightProcessor { @Override public List<HealthData> getHealths() { List<HealthData> healths = new ArrayList<HealthData>(); - healths.add(new HealthData("Thorn", (int) Math.round(BossStatus.healthScale * 4),4, true)); + healths.add(new HealthData("Thorn", Math.round(BossStatus.healthScale * 4),4, true)); return healths; } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java index c529670e..4bc757d9 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java @@ -15,7 +15,7 @@ import net.minecraftforge.fml.common.gameevent.InputEvent; import java.util.*; public abstract class GeneralBossfightProcessor implements BossfightProcessor { - private Map<String, PhaseData> phases = new HashMap<String, PhaseData>(); + private final Map<String, PhaseData> phases = new HashMap<String, PhaseData>(); private PhaseData currentPhase = null; @Getter diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java index 7d2e09a3..afeae116 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java @@ -21,9 +21,9 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.CopyOnWriteArrayList; public class RoomProcessorIcePath2 extends GeneralRoomProcessor { - private List<List<BlockPos>> solution = new CopyOnWriteArrayList<List<BlockPos>>(); + private final List<List<BlockPos>> solution = new CopyOnWriteArrayList<List<BlockPos>>(); - private Queue<String> messageQueue = new ConcurrentLinkedQueue<String>(); + private final Queue<String> messageQueue = new ConcurrentLinkedQueue<String>(); public RoomProcessorIcePath2(DungeonRoom dungeonRoom) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java index 23069f74..df098efb 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java @@ -17,11 +17,11 @@ public class RoomProcessorWaterPuzzle extends GeneralRoomProcessor { private boolean argumentsFulfilled = false; private WaterBoard waterBoard; - private OffsetPointSet doorsClosed; - private OffsetPointSet levers; - private OffsetPointSet frontBoard; - private OffsetPointSet backBoard; - private OffsetPoint water_lever; + private final OffsetPointSet doorsClosed; + private final OffsetPointSet levers; + private final OffsetPointSet frontBoard; + private final OffsetPointSet backBoard; + private final OffsetPoint water_lever; public RoomProcessorWaterPuzzle(DungeonRoom dungeonRoom) { super(dungeonRoom); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java index dd70023e..d870fa7d 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java @@ -20,22 +20,22 @@ public class WaterBoard { WaterNode[][] board; RoomProcessorWaterPuzzle waterPuzzle; - private OffsetPointSet frontPlate; - private OffsetPointSet backPlate; - private OffsetPointSet levers; - private OffsetPointSet doors; - private OffsetPoint lever; + private final OffsetPointSet frontPlate; + private final OffsetPointSet backPlate; + private final OffsetPointSet levers; + private final OffsetPointSet doors; + private final OffsetPoint lever; @Getter - private List<SwitchData> switchData = new ArrayList<SwitchData>(); + private final List<SwitchData> switchData = new ArrayList<SwitchData>(); @Getter - private Map<String, SwitchData> validSwitches = new HashMap<String, SwitchData>(); + private final Map<String, SwitchData> validSwitches = new HashMap<String, SwitchData>(); private WaterNodeStart waterNodeStart; - private Map<String, WaterNodeEnd> waterNodeEndMap = new HashMap<String, WaterNodeEnd>(); + private final Map<String, WaterNodeEnd> waterNodeEndMap = new HashMap<String, WaterNodeEnd>(); @Getter - private Map<String, WaterNode> toggleableMap = new HashMap<String, WaterNode>(); + private final Map<String, WaterNode> toggleableMap = new HashMap<String, WaterNode>(); @Getter private Set<String> reqOpen = new HashSet<String>(); @@ -253,7 +253,7 @@ public class WaterBoard { } else { int minDistToDropRight = 9999; for (int i = asd.getX(); i < asd.getX() + 8; i++) { - WaterNode nodehere = getNodeAt(i, asd.getY());; + WaterNode nodehere = getNodeAt(i, asd.getY()); if (nodehere == null) break; if (!nodehere.canWaterGoThrough()) break; if (!leverStates.contains(nodehere.getCondition()) && !nodehere.isWaterFilled(w)) break; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java index 7e8d89f6..9a4becf6 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java @@ -35,7 +35,7 @@ public class StompClient extends WebSocketClient implements StompInterface { while(this.stompClientStatus == StompClientStatus.CONNECTING); System.out.println("fully connected"); } - private CloseListener closeListener; + private final CloseListener closeListener; @Getter private volatile StompClientStatus stompClientStatus = StompClientStatus.CONNECTING; @@ -103,8 +103,8 @@ public class StompClient extends WebSocketClient implements StompInterface { ex.printStackTrace(); } - private Map<Integer, StompSubscription> stompSubscriptionMap = new HashMap<Integer, StompSubscription>(); - private Map<Integer, StompPayload> receiptMap = new HashMap<Integer, StompPayload>(); + private final Map<Integer, StompSubscription> stompSubscriptionMap = new HashMap<Integer, StompSubscription>(); + private final Map<Integer, StompPayload> receiptMap = new HashMap<Integer, StompPayload>(); private int idIncrement = 0; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java index b3f5cbc2..09390c2b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java @@ -1,5 +1,5 @@ package kr.syeyoung.dungeonsguide.stomp; public enum StompClientStatus { - CONNECTING, CONNECTED, ERROR, DISCONNECTING, DISCONNECTED; + CONNECTING, CONNECTED, ERROR, DISCONNECTING, DISCONNECTED } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java index 19dd4ac1..6672853c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java @@ -35,7 +35,7 @@ public class StompPayload { if (payload != null) sb.append(payload); sb.append((char) 0); - System.out.println("Probably sending "+sb.toString()); + System.out.println("Probably sending "+ sb); return sb.toString(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java index 5ecbeb06..0bbfec01 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java @@ -14,10 +14,10 @@ public class StompSubscription { private AckMode ackMode; @AllArgsConstructor - public static enum AckMode { + public enum AckMode { AUTO("auto"), CLIENT("client"), CLIENT_INDIVIDUAL("client-individual"); @Getter - private String value; + private final String value; } } 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); |