mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 19:36:41 +00:00
Move vectors to static creators, for caching
This commit is contained in:
committed by
IronApollo
parent
a9919d130c
commit
4d6045813c
@ -45,7 +45,7 @@ public class ClipboardPattern extends AbstractPattern {
|
||||
if (xp < 0) xp += sx;
|
||||
if (yp < 0) yp += sy;
|
||||
if (zp < 0) zp += sz;
|
||||
return clipboard.getBlock(new BlockVector3(min.getX() + xp, min.getY() + yp, min.getZ() + zp));
|
||||
return clipboard.getBlock(BlockVector3.at(min.getX() + xp, min.getY() + yp, min.getZ() + zp));
|
||||
//=======
|
||||
// public BlockStateHolder apply(BlockVector3 position) {
|
||||
// int xp = Math.abs(position.getBlockX()) % size.getBlockX();
|
||||
|
@ -46,7 +46,7 @@ public interface Pattern extends com.sk89q.worldedit.patterns.Pattern{
|
||||
|
||||
@Override
|
||||
default BaseBlock next(int x, int y, int z) {
|
||||
return new BaseBlock(apply(new BlockVector3(x, y, z)));
|
||||
return new BaseBlock(apply(BlockVector3.at(x, y, z)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,10 +93,6 @@ public class RepeatingExtentPattern extends AbstractPattern {
|
||||
int x = base.getBlockX() % size.getBlockX();
|
||||
int y = base.getBlockY() % size.getBlockY();
|
||||
int z = base.getBlockZ() % size.getBlockZ();
|
||||
//<<<<<<< HEAD
|
||||
// return extent.getBlock(new Vector(x, y, z));
|
||||
//=======
|
||||
return extent.getFullBlock(new BlockVector3(x, y, z));
|
||||
//>>>>>>> 399e0ad5... Refactor vector system to be cleaner
|
||||
return extent.getFullBlock(BlockVector3.at(x, y, z));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user