aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse')
-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
15 files changed, 44 insertions, 33 deletions
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();