-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
069041c
commit a3590a1
Showing
19 changed files
with
507 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
org.gradle.jvmargs=-Xmx3G | ||
mod_version=0.0.4 | ||
mod_version=0.0.6 | ||
mc_version=1.12.2 | ||
forge_version=14.23.5.2768 | ||
mappings_version=snapshot_20171003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/me/ktechnet/openmineai/Helpers/BrokenBlocksHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package me.ktechnet.openmineai.Helpers; | ||
|
||
import me.ktechnet.openmineai.Models.Classes.Pos; | ||
import me.ktechnet.openmineai.Models.Enums.NodeType; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class BrokenBlocksHelper { | ||
public ArrayList<Pos> Broken(NodeType type, Pos pos) { | ||
ArrayList<Pos> list = new ArrayList<>(); | ||
switch (type) { | ||
case BREAK_AND_MOVE: | ||
list.add(pos); | ||
list.add(new Pos(pos.x, pos.y + 1, pos.z)); | ||
break; | ||
case ASCEND_BREAK_AND_TOWER: | ||
list.add(new Pos(pos.x, pos.y + 1, pos.z)); | ||
break; | ||
case STEP_UP_AND_BREAK: | ||
list.add(new Pos(pos.x, pos.y + 1, pos.z)); | ||
list.add(new Pos(pos.x, pos.y + 2, pos.z)); | ||
break; | ||
case STEP_DOWN_AND_BREAK: | ||
list.add(new Pos(pos.x, pos.y + 1, pos.z)); | ||
list.add(new Pos(pos.x, pos.y + 0, pos.z)); | ||
list.add(new Pos(pos.x, pos.y - 1, pos.z)); | ||
break; | ||
case DESCEND_MINE: | ||
list.add(pos); | ||
break; | ||
} | ||
return list; | ||
} | ||
} |
93 changes: 93 additions & 0 deletions
93
src/main/java/me/ktechnet/openmineai/Helpers/NodeTypeRules.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package me.ktechnet.openmineai.Helpers; | ||
|
||
import me.ktechnet.openmineai.Models.Classes.Rule; | ||
import me.ktechnet.openmineai.Models.Enums.Rules; | ||
import me.ktechnet.openmineai.Models.Interfaces.IRule; | ||
|
||
public class NodeTypeRules { | ||
public IRule GetMove() { | ||
IRule rule = new Rule(); | ||
rule.PushToStack(1, Rules.PASSABLE); | ||
rule.PushToStack(0, Rules.PASSABLE); | ||
rule.PushToStack(-1, Rules.IMPASSABLE_NOT_LAVA); | ||
return rule; | ||
} | ||
public IRule GetStepUp() { | ||
IRule rule = new Rule(); | ||
rule.PushToStack(2, Rules.PASSABLE); | ||
rule.PushToStack(1, Rules.PASSABLE); | ||
rule.PushToStack(0, Rules.IMPASSABLE_NOT_LAVA); | ||
return rule; | ||
} | ||
public IRule GetStepUpAndBreak() { //TODO this may cause diagonal tunneling, testing needed | ||
IRule rule = new Rule(); | ||
rule.ruleMeta().CheckBreakableLavaAdj = true; | ||
rule.PushToStack(2, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(1, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(0, Rules.IMPASSABLE_NOT_LAVA); | ||
return rule; | ||
} | ||
public IRule GetStepDown() { | ||
IRule rule = new Rule(); | ||
rule.PushToStack(1, Rules.PASSABLE); | ||
rule.PushToStack(0, Rules.PASSABLE); | ||
rule.PushToStack(-1, Rules.PASSABLE); | ||
rule.PushToStack(-2, Rules.IMPASSABLE_NOT_LAVA); | ||
return rule; | ||
} | ||
public IRule GetStepDownAndBreak() { //TODO this may cause diagonal tunneling, testing needed | ||
IRule rule = new Rule(); | ||
rule.ruleMeta().CheckBreakableLavaAdj = true; | ||
rule.PushToStack(1, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(0, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(-1, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(-2, Rules.IMPASSABLE_NOT_LAVA); | ||
return rule; | ||
} | ||
public IRule GetBreakAndMove() { | ||
IRule rule = new Rule(); | ||
rule.ruleMeta().CheckBreakableLavaAdj = true; | ||
rule.PushToStack(1, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(0, Rules.BREAKABLE_OR_PASSABLE); | ||
rule.PushToStack(-1, Rules.IMPASSABLE_NOT_LAVA); | ||
return rule; | ||
} | ||
public IRule GetDecentOrParkourOrBridge() { | ||
IRule rule = new Rule(); | ||
rule.ruleMeta().CheckBreakableLavaAdj = true; | ||
rule.PushToStack(0, Rules.PASSABLE); | ||
rule.PushToStack(-1, Rules.PASSABLE); | ||
rule.PushToStack(-2, Rules.PASSABLE); | ||
return rule; | ||
} | ||
public IRule GetTower() { | ||
IRule rule = new Rule(); | ||
rule.PushToStack(1, Rules.PASSABLE); | ||
rule.PushToStack(0, Rules.PASSABLE); | ||
return rule; | ||
} | ||
public IRule GetBreakAndTower() { | ||
IRule rule = new Rule(); | ||
rule.ruleMeta().CheckBreakableLavaAdj = true; | ||
rule.PushToStack(1, Rules.BREAKABLE); | ||
rule.PushToStack(0, Rules.PASSABLE); | ||
return rule; | ||
} | ||
public IRule GetLadder() { | ||
IRule rule = new Rule(); | ||
rule.PushToStack(0, Rules.CLIMBABLE); | ||
return rule; | ||
} | ||
public IRule GetRareDrop() { | ||
IRule rule = new Rule(); | ||
rule.PushToStack(0, Rules.PASSABLE); | ||
return rule; | ||
} | ||
public IRule GetDescentMine() { | ||
IRule rule = new Rule(); | ||
rule.ruleMeta().CheckBreakableLavaAdj = true; | ||
rule.PushToStack(1, Rules.PASSABLE); | ||
rule.PushToStack(0, Rules.BREAKABLE); | ||
return rule; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.