aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorButtonSolver.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorCreeperSolver.java11
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorIcePath.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/BombDefuseChamberGenerator.java8
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/ChamberProcessor.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/GeneralDefuseChamberProcessor.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowLeftProcessor.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java8
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorLeftProcessor.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperLeftProcessor.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathRightProcessor.java8
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/maze/MazeRightProcessor.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberLeftProcessor.java5
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorLivid.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorThorn.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/GeneralBossfightProcessor.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/icefill/RoomProcessorIcePath2.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/WaterBoard.java20
29 files changed, 80 insertions, 72 deletions
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;