public CuboidRegionSelector(LocalWorld world, Vector pos1, Vector pos2) { this(world); this.pos1 = pos1.toBlockVector(); this.pos2 = pos2.toBlockVector(); region.setPos1(pos1); region.setPos2(pos2); }
public boolean selectSecondary(Vector pos) { if (pos2 != null && (pos.compareTo(pos2)) == 0) { return false; } pos2 = pos.toBlockVector(); region.setPos2(pos2); return true; }
public boolean selectPrimary(Vector pos) { if (pos1 != null && (pos.compareTo(pos1) == 0)) { return false; } pos1 = pos.toBlockVector(); region.setPos1(pos1); return true; }
public boolean selectPrimary(Vector pos) { if (pos.equals(pos1)) { return false; } pos1 = pos.toBlockVector(); region = new Polygonal2DRegion(region.getWorld()); region.addPoint(pos); region.expandY(pos.getBlockY()); return true; }
@Override public BlockVector toBlockVector() { return BlockVectorWrapper.wrap(m_parent.toBlockVector(), m_jobId, m_isAsync, m_player); }