diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
6 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java index 9aeac9e8..37acd018 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java @@ -3,12 +3,14 @@ package kr.syeyoung.dungeonsguide.dungeon.actions; import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import lombok.Data; +import lombok.EqualsAndHashCode; import java.util.HashSet; import java.util.Set; @Data public class ActionChangeState implements Action{ + @EqualsAndHashCode.Exclude private Set<Action> preRequisite2 = new HashSet<Action>(); private String mechanicName; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClick.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClick.java index b3a4cc92..8c745385 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClick.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClick.java @@ -5,6 +5,7 @@ import com.google.common.base.Predicates; import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import lombok.Data; +import lombok.EqualsAndHashCode; import net.minecraft.item.ItemStack; import java.util.HashSet; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClickSet.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClickSet.java index 595e66c7..0aea2d97 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClickSet.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClickSet.java @@ -5,6 +5,7 @@ import com.google.common.base.Predicates; import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import lombok.Data; +import lombok.EqualsAndHashCode; import net.minecraft.item.ItemStack; import java.util.HashSet; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionDropItem.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionDropItem.java index 151fe96c..80a39564 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionDropItem.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionDropItem.java @@ -5,6 +5,7 @@ import com.google.common.base.Predicates; import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import lombok.Data; +import lombok.EqualsAndHashCode; import net.minecraft.item.ItemStack; import java.util.HashSet; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionKill.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionKill.java index e1eba8b7..ff26fe20 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionKill.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionKill.java @@ -1,9 +1,11 @@ package kr.syeyoung.dungeonsguide.dungeon.actions; import com.google.common.base.Predicate; +import com.google.common.base.Predicates; import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import lombok.Data; +import lombok.EqualsAndHashCode; import net.minecraft.entity.Entity; import java.util.HashSet; @@ -13,7 +15,7 @@ import java.util.Set; public class ActionKill implements Action { private Set<Action> preRequisite = new HashSet<Action>(); private OffsetPoint target; - private Predicate<Entity> predicate; + private Predicate<Entity> predicate = Predicates.alwaysFalse(); private int radius; public ActionKill(OffsetPoint target) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionTree.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionTree.java index 334f7c2b..009924cf 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionTree.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionTree.java @@ -35,6 +35,10 @@ public class ActionTree { tree.setChildren(set); return tree; } + public static ActionTree buildActionTree(Action actions, DungeonRoom dungeonRoom) { + return buildActionTree(null, actions, dungeonRoom, new HashMap<Action, ActionTree>()); + } + private static ActionTree buildActionTree(ActionTree parent, Action action, DungeonRoom dungeonRoom, Map<Action, ActionTree> alreadyBuilt) { |