Move vectors to static creators, for caching

This commit is contained in:
Kenzie Togami
2018-10-19 13:13:32 -07:00
parent 399e0ad5fa
commit 2c8b2fe089
69 changed files with 366 additions and 334 deletions

View File

@ -86,7 +86,7 @@ public class FastModeExtent extends AbstractDelegateExtent {
@Override
public boolean setBlock(BlockVector3 location, BlockStateHolder block) throws WorldEditException {
if (enabled) {
dirtyChunks.add(new BlockVector2(location.getBlockX() >> 4, location.getBlockZ() >> 4));
dirtyChunks.add(BlockVector2.at(location.getBlockX() >> 4, location.getBlockZ() >> 4));
return world.setBlock(location, block, false);
} else {
return world.setBlock(location, block, true);