add reach setting to fill module
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m14s

This commit is contained in:
Daniella / Tove 2024-06-19 19:09:55 +02:00
parent 3fff520938
commit a9f1d8f6c0
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -35,6 +35,11 @@ public class Fill extends Feature {
@Range("1..5") @Range("1..5")
public int iterations = 1; public int iterations = 1;
@Config("Range")
@Description("How far a block can be to be until it will be considered unreachable")
@Range("1..6@0.25")
public float range = 3;
@Config("Rotate") @Config("Rotate")
@Description("Faces the block that is being acted on.") @Description("Faces the block that is being acted on.")
public boolean rotate = false; public boolean rotate = false;
@ -70,8 +75,8 @@ public class Fill extends Feature {
// loop through intersection of box around player and the selection // loop through intersection of box around player and the selection
Vec3d eyePos = mc.player.getPositionEyes(1); Vec3d eyePos = mc.player.getPositionEyes(1);
BlockPos pBoxMin = new BlockPos(eyePos.add(-4, -4, -4)); BlockPos pBoxMin = new BlockPos(eyePos.add(-range, -range, -range));
BlockPos pBoxMax = new BlockPos(eyePos.add(4, 4, 4)); BlockPos pBoxMax = new BlockPos(eyePos.add(range, range, range));
BlockPos selectMin = Select.selection.pos1; BlockPos selectMin = Select.selection.pos1;
BlockPos selectMax = Select.selection.pos2; BlockPos selectMax = Select.selection.pos2;
int minX = Math.max(pBoxMin.getX(), selectMin.getX()), maxX = Math.min(pBoxMax.getX(), selectMax.getX()); int minX = Math.max(pBoxMin.getX(), selectMin.getX()), maxX = Math.min(pBoxMax.getX(), selectMax.getX());