aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2021-10-04 14:06:32 +0900
committersyeyoung <cyoung06@naver.com>2021-10-04 14:06:32 +0900
commita98c778b6e3398f265eeb56e1984c28aadb153bd (patch)
treebb8812236ae51b7a3077e4327820897cca1b99a1 /src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder
parentdcd661c9108005b43f595d010c92d3221f866fb8 (diff)
downloadSkyblock-Dungeons-Guide-a98c778b6e3398f265eeb56e1984c28aadb153bd.tar.gz
Skyblock-Dungeons-Guide-a98c778b6e3398f265eeb56e1984c28aadb153bd.tar.bz2
Skyblock-Dungeons-Guide-a98c778b6e3398f265eeb56e1984c28aadb153bd.zip
- Blood rush mode
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonDoor.java23
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/EDungeonDoorType.java33
2 files changed, 40 insertions, 16 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonDoor.java
index d841bb65..9a52dad8 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonDoor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonDoor.java
@@ -31,22 +31,20 @@ import java.util.Set;
public class DungeonDoor {
private final World w;
private final BlockPos position;
- private boolean exist = true;
+ private EDungeonDoorType type;
private boolean isZDir;
private static final Set<Block> legalBlocks = Sets.newHashSet(Blocks.coal_block, Blocks.barrier, Blocks.monster_egg, Blocks.air, Blocks.stained_hardened_clay);
- private boolean requiresKey = false;
- private boolean opened = false;
-
- public DungeonDoor(World world, BlockPos pos) {
+ public DungeonDoor(World world, BlockPos pos, EDungeonDoorType type) {
this.w = world;
this.position = pos;
Block itshouldbeall = world.getChunkFromBlockCoords(pos).getBlock(pos);
- if (!legalBlocks.contains(itshouldbeall)) {
- exist = false;
- return;
- }
+
+ if (type == EDungeonDoorType.WITHER && itshouldbeall == Blocks.air) type = EDungeonDoorType.WITHER_FAIRY;
+ this.type = type;
+ boolean exist = type.isExist();
+
for (int x = -1; x<=1; x++)
for (int y = -1; y<=1; y++)
for (int z = -1; z<=1; z++) {
@@ -78,13 +76,6 @@ public class DungeonDoor {
}
if (!exist) {
isZDir = false;
- return;
- }
-
- if (itshouldbeall == Blocks.stained_hardened_clay || itshouldbeall == Blocks.coal_block) {
- requiresKey = true;
- } else if (itshouldbeall == Blocks.barrier) {
- opened = true;
}
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/EDungeonDoorType.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/EDungeonDoorType.java
new file mode 100644
index 00000000..3a07629e
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/EDungeonDoorType.java
@@ -0,0 +1,33 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package kr.syeyoung.dungeonsguide.dungeon.doorfinder;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum EDungeonDoorType {
+ NONE(false, false, false,"?"), ENTRANCE(true, false, false, "entrance"), WITHER(true, true,true,"withergate"),WITHER_FAIRY(true, false,true,"wither-fairy-gate"), BLOOD(true, true,true, "bloodgate"), UNOPEN(true, false, false,"gate");
+
+ private boolean exist;
+ private boolean keyRequired;
+ private boolean headToBlood;
+ private String name;
+}