diff options
Diffstat (limited to 'src/main/java/kr/syeyoung')
9 files changed, 51 insertions, 32 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java index 76f22f30..8e7fd7e7 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java @@ -33,9 +33,9 @@ public class OffsetPoint implements Cloneable, Serializable { for (int i = 0; i < dungeonRoom.getRoomMatcher().getRotation(); i++) { vector2d = VectorUtils.rotateClockwise(vector2d); if (i % 2 == 0) { - vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks().length - 1; // + Z + vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks()[0].length - 1; // + Z } else { - vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks()[0].length - 1; // + X + vector2d.x += dungeonRoom.getDungeonRoomInfo().getBlocks().length - 1; // + X } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java index cdfc7c37..443e8bbd 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDoor.java @@ -28,9 +28,7 @@ public class DungeonDoor implements DungeonMechanic, RouteBlocker { @Override public Set<Action> getAction(String state, DungeonRoom dungeonRoom) { if (!("open".equalsIgnoreCase(state) || "closed".equalsIgnoreCase(state))) throw new IllegalArgumentException(state+" is not valid state for door"); - if (!isBlocking(dungeonRoom)) { - return Collections.emptySet(); - } + if (state.equalsIgnoreCase(getCurrentState(dungeonRoom))) return Collections.emptySet(); Set<Action> base; Set<Action> preRequisites = base = new HashSet<Action>(); { 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 bf480833..cf846b20 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/RoomMatcher.java @@ -5,6 +5,7 @@ import kr.syeyoung.dungeonsguide.utils.ArrayUtils; import kr.syeyoung.dungeonsguide.utils.ShortUtils; import lombok.Getter; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; @@ -107,7 +108,7 @@ public class RoomMatcher { } Block b = dungeonRoom.getRelativeBlockAt(x,0,z); - if (b == null) { + if (b == null || b == Blocks.chest || b == Blocks.trapped_chest) { data[z][x] = -1; } else { data[z][x] = Block.getIdFromBlock(b); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDisableMessage.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDisableMessage.java index a9ab8f84..2c562883 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDisableMessage.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDisableMessage.java @@ -51,6 +51,7 @@ public class FeatureDisableMessage extends SimpleFeature implements ChatListener if (!isEnabled()) return; if (!skyblockStatus.isOnSkyblock()) return; String msg = clientChatReceivedEvent.message.getFormattedText(); + System.out.println(msg); for (MessageData md:PRE_DEFINED) { if (this.<Boolean>getParameter(md.key).getValue() && md.pattern.matcher(msg).matches()) { clientChatReceivedEvent.setCanceled(true); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java index dcea61ca..256673ba 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/NodeProcessorDungeonRoom.java @@ -52,11 +52,30 @@ public class NodeProcessorDungeonRoom extends NodeProcessor { int newZ = currentPoint.zCoord + dir.getZ(); if (newX < 0 || newZ < 0) continue; if (newX > sub.getX()|| newZ > sub.getZ()) continue; - if (isValidBlock(entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY, newZ))) - && isValidBlock( entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY + 1, newZ)))) { + IBlockState curr = entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY, newZ)); + IBlockState up = entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY + 1, newZ)); + if (isValidBlock(curr) + && isValidBlock(up )) { PathPoint pt = openPoint(newX, newY, newZ); if (pt.visited) continue; pathOptions[i++] = pt; + continue; + } + + if (curr.getBlock() == Blocks.air) { + if (up.getBlock() == Blocks.stone_slab + || up.getBlock() == Blocks.wooden_slab + || up.getBlock() == Blocks.stone_slab2) { + IBlockState up2 = entityIn.getEntityWorld().getBlockState(dungeonRoom.getMin().add(newX, newY -1, newZ)); + if (up2.getBlock() == Blocks.stone_slab + || up2.getBlock() == Blocks.wooden_slab + || up2.getBlock() == Blocks.stone_slab2) { + PathPoint pt = openPoint(newX, newY, newZ); + if (pt.visited) continue; + pathOptions[i++] = pt; + continue; + } + } } } return i; @@ -69,7 +88,7 @@ public class NodeProcessorDungeonRoom extends NodeProcessor { || state.getBlock() == Blocks.standing_sign || state.getBlock() == Blocks.wall_sign || state.getBlock() == Blocks.trapdoor || state.getBlock() == Blocks.iron_trapdoor || state.getBlock() == Blocks.wooden_button || state.getBlock() == Blocks.stone_button - || state.getBlock() == Blocks.fire + || state.getBlock() == Blocks.fire || state.getBlock() == Blocks.torch || (state == Blocks.stone.getStateFromMeta(2)); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java index 2932b5a9..4631e86c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorBonzo.java @@ -12,27 +12,27 @@ public class BossfightProcessorBonzo extends GeneralBossfightProcessor { public BossfightProcessorBonzo() { addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("start") - .signatureMsg("§r§c[BOSS] Bonzo§r§f: Gratz for making it this far, but I’m basically unbeatable.§r") + .signatureMsg("§r§c[BOSS] Bonzo §r§f: Gratz for making it this far, but I’m basically unbeatable.§r") .nextPhase("fight-1").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-1") - .signatureMsg("§r§c[BOSS] Bonzo§r§f: I can summon lots of undead! Check this out.§r") + .signatureMsg("§r§c[BOSS] Bonzo §r§f: I can summon lots of undead! Check this out.§r") .nextPhase("first-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("first-defeat") - .signatureMsg("§r§c[BOSS] Bonzo§r§f: Oh I'm dead!§r").signatureMsg("§r§c[BOSS] Bonzo§r§f: Hoho, looks like you killed me!§r") + .signatureMsg("§r§c[BOSS] Bonzo §r§f: Oh I'm dead!§r").signatureMsg("§r§c[BOSS] Bonzo §r§f: Hoho, looks like you killed me!§r") .nextPhase("fight-2").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-2") - .signatureMsg("§r§c[BOSS] Bonzo§r§f: Sike§r").signatureMsg("§r§c[BOSS] Bonzo§r§f: I can revive myself and become much stronger!§r") + .signatureMsg("§r§c[BOSS] Bonzo §r§f: Sike§r").signatureMsg("§r§c[BOSS] Bonzo §r§f: I can revive myself and become much stronger!§r") .nextPhase("final-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("final-defeat") - .signatureMsg("§r§c[BOSS] Bonzo§r§f: Alright, maybe I'm just weak after all..§r").build() + .signatureMsg("§r§c[BOSS] Bonzo §r§f: Alright, maybe I'm just weak after all..§r").build() ); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java index 2bb269f6..da0ac2d1 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorProf.java @@ -11,37 +11,37 @@ public class BossfightProcessorProf extends GeneralBossfightProcessor { public BossfightProcessorProf() { addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("start") - .signatureMsg("§r§c[BOSS] The Professor§r§f: I was burdened with terrible news recently...§r") + .signatureMsg("§r§c[BOSS] The Professor §r§f: I was burdened with terrible news recently...§r") .nextPhase("fight-1").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-1") - .signatureMsg("§r§c[BOSS] The Professor§r§f: I'll show you real power!§r") + .signatureMsg("§r§c[BOSS] The Professor §r§f: I'll show you real power!§r") .nextPhase("first-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("first-defeat") - .signatureMsg("§r§c[BOSS] The Professor§r§f: Oh? You found my Guardians one weakness?§r") + .signatureMsg("§r§c[BOSS] The Professor §r§f: Oh? You found my Guardians one weakness?§r") .nextPhase("fight-2").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-2") - .signatureMsg("§r§c[BOSS] The Professor§r§f: This time I'll be your opponent!§r") + .signatureMsg("§r§c[BOSS] The Professor §r§f: This time I'll be your opponent!§r") .nextPhase("second-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("second-defeat") - .signatureMsg("§r§c[BOSS] The Professor§r§f: I see. You have forced me to use my ultimate technique.§r") + .signatureMsg("§r§c[BOSS] The Professor §r§f: I see. You have forced me to use my ultimate technique.§r") .nextPhase("fight-3").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-3") - .signatureMsg("§r§c[BOSS] The Professor§r§f: The process is irreversible, but I'll be stronger than a Wither now!§r") + .signatureMsg("§r§c[BOSS] The Professor §r§f: The process is irreversible, but I'll be stronger than a Wither now!§r") .nextPhase("final-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("final-defeat") - .signatureMsg("§r§c[BOSS] The Professor§r§f: What?! My Guardian power is unbeatable!§r").build() + .signatureMsg("§r§c[BOSS] The Professor §r§f: What?! My Guardian power is unbeatable!§r").build() ); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java index 60908de4..2a0ee850 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorSadan.java @@ -16,32 +16,32 @@ public class BossfightProcessorSadan extends GeneralBossfightProcessor { ); addPhase(PhaseData.builder() .phase("fight-1") - .signatureMsg("§r§c[BOSS] Sadan§r§f: I am the bridge between this realm and the world below! You shall not pass!§r") + .signatureMsg("§r§c[BOSS] Sadan §r§f: I am the bridge between this realm and the world below! You shall not pass!§r") .nextPhase("first-defeat").build() ); addPhase(PhaseData.builder() .phase("first-defeat") - .signatureMsg("§r§c[BOSS] Sadan§r§f: ENOUGH!§r") + .signatureMsg("§r§c[BOSS] Sadan §r§f: ENOUGH!§r") .nextPhase("fight-2").build() ); addPhase(PhaseData.builder() .phase("fight-2") - .signatureMsg("§r§c[BOSS] Sadan§r§f: My giants! Unleashed!§r") + .signatureMsg("§r§c[BOSS] Sadan §r§f: My giants! Unleashed!§r") .nextPhase("second-defeat").build() ); addPhase(PhaseData.builder() .phase("second-defeat") - .signatureMsg("§r§c[BOSS] Sadan§r§f: You did it. I understand now, you have earned my respect.§r") + .signatureMsg("§r§c[BOSS] Sadan §r§f: You did it. I understand now, you have earned my respect.§r") .nextPhase("fight-3").build() ); addPhase(PhaseData.builder() .phase("fight-3") - .signatureMsg("§r§c[BOSS] Sadan§r§f: I'm sorry but I need to concentrate. I wish it didn't have to come to this.§r") + .signatureMsg("§r§c[BOSS] Sadan §r§f: I'm sorry but I need to concentrate. I wish it didn't have to come to this.§r") .nextPhase("final-defeat").build() ); addPhase(PhaseData.builder() .phase("final-defeat") - .signatureMsg("§r§c[BOSS] Sadan§r§f: NOOOOOOOOO!!! THIS IS IMPOSSIBLE!!§r").build() + .signatureMsg("§r§c[BOSS] Sadan §r§f: NOOOOOOOOO!!! THIS IS IMPOSSIBLE!!§r").build() ); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java index a1ee7af2..cfd01a1f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorScarf.java @@ -11,27 +11,27 @@ public class BossfightProcessorScarf extends GeneralBossfightProcessor { public BossfightProcessorScarf() { addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("start") - .signatureMsg("§r§c[BOSS] Scarf§r§f: This is where the journey ends for you, Adventurers.§r") + .signatureMsg("§r§c[BOSS] Scarf §r§f: This is where the journey ends for you, Adventurers.§r") .nextPhase("fight-1").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-1") - .signatureMsg("§r§c[BOSS] Scarf§r§f: ARISE, MY CREATIONS!§r") + .signatureMsg("§r§c[BOSS] Scarf §r§f: ARISE, MY CREATIONS!§r") .nextPhase("first-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("first-defeat") - .signatureMsg("§r§c[BOSS] Scarf§r§f: Those toys are not strong enough I see.§r") + .signatureMsg("§r§c[BOSS] Scarf §r§f: Those toys are not strong enough I see.§r") .nextPhase("fight-2").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("fight-2") - .signatureMsg("§r§c[BOSS] Scarf§r§f: Did you forget? I was taught by the best! Let's dance.§r") + .signatureMsg("§r§c[BOSS] Scarf §r§f: Did you forget? I was taught by the best! Let's dance.§r") .nextPhase("final-defeat").build() ); addPhase(GeneralBossfightProcessor.PhaseData.builder() .phase("final-defeat") - .signatureMsg("§r§c[BOSS] Scarf§r§f: Whatever...§r").build() + .signatureMsg("§r§c[BOSS] Scarf §r§f: Whatever...§r").build() ); } |