Java Code Examples for com.sk89q.worldedit.Vector2D#add()
The following examples show how to use
com.sk89q.worldedit.Vector2D#add() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CylinderRegion.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
private Vector2D calculateDiff2D(Vector... changes) throws RegionOperationException { Vector2D diff = new Vector2D(); for (Vector change : changes) { diff = diff.add(change.toVector2D()); } if ((diff.getBlockX() & 1) + (diff.getBlockZ() & 1) != 0) { throw new RegionOperationException("Cylinders changes must be even for each horizontal dimensions."); } return diff.divide(2).floor(); }
Example 2
Source File: CylinderRegion.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
private Vector2D calculateChanges2D(Vector... changes) { Vector2D total = new Vector2D(); for (Vector change : changes) { total = total.add(change.toVector2D().positive()); } return total.divide(2).floor(); }
Example 3
Source File: BlockTranslateExtent.java From FastAsyncWorldedit with GNU General Public License v3.0 | 4 votes |
@Override public boolean setBiome(Vector2D position, BaseBiome biome) { return super.setBiome(position.add(dx, dz), biome); }
Example 4
Source File: BlockTranslateExtent.java From FastAsyncWorldedit with GNU General Public License v3.0 | 4 votes |
@Override public BaseBiome getBiome(Vector2D position) { return super.getBiome(position.add(dx, dz)); }