fix Fill module having too much reach
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m15s

This commit is contained in:
Daniella / Tove 2024-06-19 19:02:14 +02:00
parent cb01be4b47
commit afcd3b3629
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -14,6 +14,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import java.util.HashMap;
@ -68,9 +69,9 @@ public class Fill extends Feature {
iterationsLeft = iterations;
// loop through intersection of box around player and the selection
BlockPos eyePos = new BlockPos(mc.player.getPositionEyes(1));
BlockPos pBoxMin = eyePos.add(-5, -5, -5);
BlockPos pBoxMax = eyePos.add(5, 5, 5);
Vec3d eyePos = mc.player.getPositionEyes(1);
BlockPos pBoxMin = new BlockPos(eyePos.add(-4.5, -4.5, -4.5));
BlockPos pBoxMax = new BlockPos(eyePos.add(4.5, 4.5, 4.5));
BlockPos selectMin = Select.selection.pos1;
BlockPos selectMax = Select.selection.pos2;
int minX = Math.max(pBoxMin.getX(), selectMin.getX()), maxX = Math.min(pBoxMax.getX(), selectMax.getX());