aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2020-12-15 16:56:06 +0900
committersyeyoung <42869671+cyoung06@users.noreply.github.com>2020-12-15 16:56:06 +0900
commit917ca305d875924863cfcae7f1cb8d805a98122d (patch)
treed58a14f0344b332e2a207e3a25b45847a018aae3 /src/main/java/kr/syeyoung/dungeonsguide/dungeon
parent5009cd40af60e0519609ef1656483ba14b60eef1 (diff)
downloadSkyblock-Dungeons-Guide-917ca305d875924863cfcae7f1cb8d805a98122d.tar.gz
Skyblock-Dungeons-Guide-917ca305d875924863cfcae7f1cb8d805a98122d.tar.bz2
Skyblock-Dungeons-Guide-917ca305d875924863cfcae7f1cb8d805a98122d.zip
this works fantasticallyas
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClick.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionClickSet.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionDropItem.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionKill.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/tree/ActionTree.java4
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) {