public GlowChunkData(World world) { maxHeight = world.getMaxHeight(); sections = new short[GlowChunk.SEC_COUNT][]; }
@Override public int getMaxY() { return getWorld().getMaxHeight() - 1; }
try { x = getInteger(sender, args[0], MIN_COORD, MAX_COORD, true); y = getInteger(sender, args[1], 0, world.getMaxHeight(), true); z = getInteger(sender, args[2], MIN_COORD, MAX_COORD, true); } catch (NumberFormatException ex) {
+ ") is too small, it must be at least 0."); return false; } else if (spawnLocation.getBlockY() > world.getMaxHeight()) { sender.sendMessage(ChatColor.RED + "'" + spawnLocation.getY() + "' is too high for the current world. Max value is '" + world.getMaxHeight() + "'."); return false;
+ ") is too small, it must be at least 0."); return false; } else if (spawnLocation.getBlockY() > world.getMaxHeight()) { sender.sendMessage(ChatColor.RED + "'" + spawnLocation.getBlockY() + "' is too high for the current world. Max value is '" + world.getMaxHeight() + "'."); return false;
try { x = getInteger(sender, args[pos++], MIN_COORD, MAX_COORD, true); y = getInteger(sender, args[pos++], 0, world.getMaxHeight()); z = getInteger(sender, args[pos], MIN_COORD, MAX_COORD, true); } catch(NumberFormatException ex) {
OurMapIterator(int x0, int y0, int z0) { x_base = x_min << 4; z_base = z_min << 4; if(biome) biomePrep(); initialize(x0, y0, z0); worldheight = w.getMaxHeight(); }
public BukkitWorld(World w) { this(w.getName(), w.getMaxHeight(), w.getSeaLevel(), w.getEnvironment()); setWorldLoaded(w); new Permission("dynmap.world." + getName(), "Dynmap access for world " + getName(), PermissionDefault.OP); } public BukkitWorld(String name, int height, int sealevel, World.Environment env) {
@Override public BlockCache setAccess(World world) { this.world = world; if (world != null) { this.maxBlockY = world.getMaxHeight() - 1; } return this; }
@EventHandler(priority=EventPriority.MONITOR, ignoreCancelled=true) public void onChunkPopulate(ChunkPopulateEvent event) { Chunk c = event.getChunk(); ChunkSnapshot cs = c.getChunkSnapshot(); int ymax = 0; for(int i = 0; i < c.getWorld().getMaxHeight() / 16; i++) { if(!cs.isSectionEmpty(i)) { ymax = (i+1)*16; } } /* Touch extreme corners */ int x = c.getX() << 4; int z = c.getZ() << 4; mapManager.touchVolume(getWorld(event.getWorld()).getName(), x, 0, z, x+15, ymax, z+16, "chunkpopulate"); } };
public PrimitiveChunkStore(World world, int cx, int cz) { this.cx = cx; this.cz = cz; this.worldUid = world.getUID(); this.store = new boolean[16][16][world.getMaxHeight()]; }
@Override public int getMaxHeight() { return getHandle().getMaxHeight(); }
@Override public Location getFixedSpawnLocation(World world, Random random) { return new Location(world, 0, world.getMaxHeight() / 2.0, 0); } }
public static int getMaxHeight(World world) { Integer maxHeight = maxHeights.get(world.getEnvironment()); if (maxHeight == null) { maxHeight = world.getMaxHeight(); } return maxHeight; }
public Regions(String id, Location loc, int size) { this.id = id; this.world = loc.getWorld(); this.height = this.world.getMaxHeight(); this.size = size; this.center = loc; regions.add(this); this.update(); }
public static void renderChunks(String worldName, List<CoordXZ> coords) { if (!renderEnabled()) return; World world = Bukkit.getWorld(worldName); int y = (world != null) ? world.getMaxHeight() : 255; for (CoordXZ coord : coords) { renderChunk(worldName, coord, y); } }
public void expandUp(int amount) { int x = p2.getBlockX(); int y = Math.min(p2.getWorld().getMaxHeight(), p2.getBlockY() + amount); int z = p2.getBlockZ(); setSaveReload(coords, "p2", p2.getWorld(), x ,y ,z); }
public void expandLobbyUp(int amount) { int x = l2.getBlockX(); int y = Math.min(l2.getWorld().getMaxHeight(), l2.getBlockY() + amount); int z = l2.getBlockZ(); setSaveReload(coords, "l2", l2.getWorld(), x ,y ,z); }
public static void renderRegion(String worldName, CoordXZ coord) { if (!renderEnabled()) return; World world = Bukkit.getWorld(worldName); int y = (world != null) ? world.getMaxHeight() : 255; int x = CoordXZ.regionToBlock(coord.x); int z = CoordXZ.regionToBlock(coord.z); api.triggerRenderOfVolume(worldName, x, 0, z, x+511, y, z+511); }
@Override public MCBlock getHighestBlockAt(int x, int z) { //Workaround for getHighestBlockAt, since it doesn't like transparent //blocks. Block b = w.getBlockAt(x, w.getMaxHeight() - 1, z); while(b.getType() == Material.AIR && b.getY() > 0) { b = b.getRelative(BlockFace.DOWN); } return new BukkitMCBlock(b); }