aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung
diff options
context:
space:
mode:
authorsyeyoung <cyougn06@naver.com>2022-01-31 23:19:37 +0900
committersyeyoung <cyougn06@naver.com>2022-01-31 23:19:37 +0900
commit8ef1a2bc1d3fc32882bc4739ef6876ac2c879ccd (patch)
treec60344157c97a73adc069e05d6c30ad78cbfdc81 /src/main/java/kr/syeyoung
parent33bc7744dceed33aa3220f351a43d2617f68183b (diff)
downloadSkyblock-Dungeons-Guide-8ef1a2bc1d3fc32882bc4739ef6876ac2c879ccd.tar.gz
Skyblock-Dungeons-Guide-8ef1a2bc1d3fc32882bc4739ef6876ac2c879ccd.tar.bz2
Skyblock-Dungeons-Guide-8ef1a2bc1d3fc32882bc4739ef6876ac2c879ccd.zip
- Fix mimic messing up secret detection
Diffstat (limited to 'src/main/java/kr/syeyoung')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java6
1 files changed, 4 insertions, 2 deletions
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 65408f92..5914be15 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonSecret.java
@@ -55,7 +55,9 @@ public class DungeonSecret implements DungeonMechanic {
if (blockState.getBlock() == Blocks.chest || blockState.getBlock() == Blocks.trapped_chest) {
TileEntityChest chest = (TileEntityChest) dungeonRoom.getContext().getWorld().getTileEntity(pos);
if (chest.numPlayersUsing > 0) {
- dungeonRoom.getRoomContext().put("c-"+pos.toString(), true);
+ dungeonRoom.getRoomContext().put("c-"+pos.toString(), 2);
+ } else {
+ dungeonRoom.getRoomContext().put("c-"+pos.toString(), 1);
}
}
} else if (secretType == SecretType.ESSENCE) {
@@ -86,7 +88,7 @@ public class DungeonSecret implements DungeonMechanic {
BlockPos pos = secretPoint.getBlockPos(dungeonRoom);
IBlockState blockState = dungeonRoom.getContext().getWorld().getBlockState(pos);
if (dungeonRoom.getRoomContext().containsKey("c-"+pos.toString()))
- return SecretStatus.FOUND;
+ return ((int)dungeonRoom.getRoomContext().get("c-"+pos.toString()) == 2 || blockState.getBlock() == Blocks.air) ? SecretStatus.FOUND : SecretStatus.CREATED;
if (blockState.getBlock() == Blocks.air) {
return SecretStatus.DEFINITELY_NOT;