use of com.boydti.fawe.util.EditSessionBuilder in project PixelsSkyblock by dudullle.
the class WEManager method count_entities.
public static List<? extends Entity> count_entities(World world, Location loc1, Location loc2) {
EditSession es = new EditSessionBuilder(FaweAPI.getWorld("world")).fastmode(true).build();
CuboidSelection cbs = new CuboidSelection(world, loc1, loc2);
Region r = null;
try {
r = cbs.getRegionSelector().getRegion();
} catch (IncompleteRegionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return es.getEntities(r);
}
use of com.boydti.fawe.util.EditSessionBuilder in project PixelsSkyblock by dudullle.
the class WEManager method count.
public static List<Countable<Integer>> count(World world, Location loc1, Location loc2) {
EditSession es = new EditSessionBuilder(FaweAPI.getWorld("world")).fastmode(true).build();
CuboidSelection cbs = new CuboidSelection(world, loc1, loc2);
Region r = null;
try {
r = cbs.getRegionSelector().getRegion();
} catch (IncompleteRegionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return es.getBlockDistribution(r);
}
use of com.boydti.fawe.util.EditSessionBuilder in project PixelsSkyblock by dudullle.
the class WEManager method pasteSchematics.
public static boolean pasteSchematics(World world, File file, Location origin) throws DataException, IOException, MaxChangedBlocksException {
EditSession es = new EditSessionBuilder(FaweAPI.getWorld("world")).fastmode(true).build();
MCEditSchematicFormat.getFormat(file).load(file).paste(es, new Vector(origin.getBlockX(), origin.getBlockY(), origin.getBlockZ()), false);
return true;
}
Aggregations