Some cleanup of mutables

This commit is contained in:
dordsor21
2021-08-11 14:00:12 +01:00
parent 8928556c1d
commit 6f5430a940
14 changed files with 70 additions and 69 deletions

View File

@ -2079,7 +2079,6 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
int px = mutableBlockVector3.getBlockX();
int py = mutableBlockVector3.getBlockY();
int pz = mutableBlockVector3.getBlockZ();
MutableBlockVector3 mutable = new MutableBlockVector3();
final int ceilRadiusX = (int) Math.ceil(radiusX);
final int ceilRadiusZ = (int) Math.ceil(radiusZ);
@ -2122,10 +2121,10 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
}
for (int y = 0; y < height; ++y) {
this.setBlock(mutable.setComponents(px + x, py + y, pz + z), block);
this.setBlock(mutable.setComponents(px - x, py + y, pz + z), block);
this.setBlock(mutable.setComponents(px + x, py + y, pz - z), block);
this.setBlock(mutable.setComponents(px - x, py + y, pz - z), block);
this.setBlock(mutableBlockVector3.setComponents(px + x, py + y, pz + z), block);
this.setBlock(mutableBlockVector3.setComponents(px - x, py + y, pz + z), block);
this.setBlock(mutableBlockVector3.setComponents(px + x, py + y, pz - z), block);
this.setBlock(mutableBlockVector3.setComponents(px - x, py + y, pz - z), block);
}
}
}
@ -2158,10 +2157,10 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
for (int y = 0; y < height; ++y) {
//FAWE start - mutable
this.setBlock(mutable.setComponents(px + x, py + y, pz + z), block);
this.setBlock(mutable.setComponents(px - x, py + y, pz + z), block);
this.setBlock(mutable.setComponents(px + x, py + y, pz - z), block);
this.setBlock(mutable.setComponents(px - x, py + y, pz - z), block);
this.setBlock(mutableBlockVector3.setComponents(px + x, py + y, pz + z), block);
this.setBlock(mutableBlockVector3.setComponents(px - x, py + y, pz + z), block);
this.setBlock(mutableBlockVector3.setComponents(px + x, py + y, pz - z), block);
this.setBlock(mutableBlockVector3.setComponents(px - x, py + y, pz - z), block);
//FAWE end
}
}