minor tweak for mutable vectors

This commit is contained in:
Jesse Boyd
2019-04-01 03:09:20 +11:00
parent 2165bb127f
commit 92a7bd5e44
120 changed files with 923 additions and 2426 deletions

View File

@ -58,12 +58,12 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
EditSession eS = session.createEditSession(player);
try {
// eS.disableBuffering();
BlockVector3 blockPoint = pos.toVector().toBlockPoint();
BlockVector3 blockPoint = pos.toBlockPoint();
BaseBlock applied = secondary.apply(blockPoint);
if (applied.getBlockType().getMaterial().isAir()) {
eS.setBlock(blockPoint, secondary);
} else {
eS.setBlock(pos.toVector().subtract(pos.getDirection()).toBlockPoint(), secondary);
eS.setBlock(pos.subtract(pos.getDirection()).toBlockPoint(), secondary);
}
return true;
} catch (MaxChangedBlocksException e) {
@ -80,12 +80,12 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
try {
// eS.disableBuffering();
BlockVector3 blockPoint = pos.toVector().toBlockPoint();
BlockVector3 blockPoint = pos.toBlockPoint();
BaseBlock applied = primary.apply(blockPoint);
if (applied.getBlockType().getMaterial().isAir()) {
eS.setBlock(blockPoint, primary);
} else {
eS.setBlock(pos.toVector().subtract(pos.getDirection()).toBlockPoint(), primary);
eS.setBlock(pos.subtract(pos.getDirection()).toBlockPoint(), primary);
}
return true;
} catch (MaxChangedBlocksException e) {