More control over wave sending (#7442)

* Wave send rule

* Send natural wave command

* Use a boolean

* boolean selection

* Revert "boolean selection"

This reverts commit 01e7a8f0e0.

* Natural wave last

* I don't see why it wouldn't
This commit is contained in:
MEEPofFaith
2022-09-07 15:54:26 -07:00
committed by GitHub
parent 687bc11e54
commit 31149c08ea
7 changed files with 26 additions and 11 deletions

View File

@@ -1309,16 +1309,18 @@ public class LStatements{
@RegisterStatement("spawnwave")
public static class SpawnWaveStatement extends LStatement{
public String x = "10", y = "10";
public String x = "10", y = "10", natural = "false";
@Override
public void build(Table table){
table.add("natural ");
fields(table, natural, str -> natural = str);
table.add("x ");
fields(table, x, str -> x = str);
table.add("x ").visible(() -> natural.equals("false"));
fields(table, x, str -> x = str).visible(() -> natural.equals("false"));
table.add(" y ");
fields(table, y, str -> y = str);
table.add(" y ").visible(() -> natural.equals("false"));
fields(table, y, str -> y = str).visible(() -> natural.equals("false"));
}
@Override
@@ -1328,7 +1330,7 @@ public class LStatements{
@Override
public LInstruction build(LAssembler builder){
return new SpawnWaveI(builder.var(x), builder.var(y));
return new SpawnWaveI(builder.var(natural), builder.var(x), builder.var(y));
}
@Override