aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr')
-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;