mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:14:04 +00:00
Move vectors to static creators, for caching
This commit is contained in:
@@ -69,7 +69,7 @@ public class AreaPickaxe implements BlockTool {
|
||||
for (int x = ox - range; x <= ox + range; ++x) {
|
||||
for (int y = oy - range; y <= oy + range; ++y) {
|
||||
for (int z = oz - range; z <= oz + range; ++z) {
|
||||
BlockVector3 pos = new BlockVector3(x, y, z);
|
||||
BlockVector3 pos = BlockVector3.at(x, y, z);
|
||||
if (editSession.getBlock(pos).getBlockType() != initialType) {
|
||||
continue;
|
||||
}
|
||||
|
@@ -46,14 +46,14 @@ public class GravityBrush implements Brush {
|
||||
double y = startY;
|
||||
final List<BlockStateHolder> blockTypes = new ArrayList<>();
|
||||
for (; y > position.getBlockY() - size; --y) {
|
||||
final BlockVector3 pt = new BlockVector3(x, y, z);
|
||||
final BlockVector3 pt = BlockVector3.at(x, y, z);
|
||||
final BlockStateHolder block = editSession.getBlock(pt);
|
||||
if (!block.getBlockType().getMaterial().isAir()) {
|
||||
blockTypes.add(block);
|
||||
editSession.setBlock(pt, BlockTypes.AIR.getDefaultState());
|
||||
}
|
||||
}
|
||||
BlockVector3 pt = new BlockVector3(x, y, z);
|
||||
BlockVector3 pt = BlockVector3.at(x, y, z);
|
||||
Collections.reverse(blockTypes);
|
||||
for (int i = 0; i < blockTypes.size();) {
|
||||
if (editSession.getBlock(pt).getBlockType().getMaterial().isAir()) {
|
||||
|
Reference in New Issue
Block a user