reimplement locate command

This commit is contained in:
dfsek
2020-12-27 00:27:58 -07:00
parent c7d43142f2
commit f6312a01d7
5 changed files with 63 additions and 15 deletions
@@ -87,6 +87,11 @@ public class StructureScript {
return buffer.succeeded();
}
public boolean test(Location location, Random random, Rotation rotation) {
StructureBuffer buffer = new StructureBuffer(location);
return !block.apply(buffer, rotation, random, 0).equals(Block.ReturnLevel.FAIL);
}
public void executeInBuffer(Buffer buffer, Random random, Rotation rotation, int recursions) {
block.apply(buffer, rotation, random, recursions);
}