Examples of refreshChunk()


Examples of org.bukkit.World.refreshChunk()

        World w = player.getWorld();
        Chunk lastChunk = w.getChunkAt(loc);
        Chunk currentChunk = w.getChunkAt(loc);
       
        // first regenerate player's chunk
        w.refreshChunk((int) loc.getX(), (int) loc.getZ());
       
        // regenerate left
        while (lastChunk.equals(currentChunk)) {
          loc.setX(loc.getX() + 10);
          currentChunk = w.getChunkAt(loc);
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

        while (lastChunk.equals(currentChunk)) {
          loc.setX(loc.getX() + 10);
          currentChunk = w.getChunkAt(loc);
        }
        lastChunk = currentChunk;
        w.refreshChunk((int) loc.getX(), (int) loc.getZ());
        loc = player.getLocation();
       
        // regenerate right
        while (lastChunk.equals(currentChunk)) {
          loc.setX(loc.getX() - 10);
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

        while (lastChunk.equals(currentChunk)) {
          loc.setX(loc.getX() - 10);
          currentChunk = w.getChunkAt(loc);
        }
        lastChunk = currentChunk;
        w.refreshChunk((int) loc.getX(), (int) loc.getZ());
        loc = player.getLocation();
       
        // regenerate in front of player
        while (lastChunk.equals(currentChunk)) {
          loc.setZ(loc.getZ() + 10);
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

        while (lastChunk.equals(currentChunk)) {
          loc.setZ(loc.getZ() + 10);
          currentChunk = w.getChunkAt(loc);
        }
        lastChunk = currentChunk;
        w.refreshChunk((int) loc.getX(), (int) loc.getZ());
        loc = player.getLocation();
       
        // regenerate behind the player
        while (lastChunk.equals(currentChunk)) {
          loc.setZ(loc.getZ() - 10);
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

        while (lastChunk.equals(currentChunk)) {
          loc.setZ(loc.getZ() - 10);
          currentChunk = w.getChunkAt(loc);
        }
        lastChunk = currentChunk;
        w.refreshChunk((int) loc.getX(), (int) loc.getZ());
        loc = player.getLocation();
       
        // all done :)
        LogHelper.showInfo("chunksRegenerated", sender);
      }
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

  public static void refreshMapChunk(Location l) {
    World world = l.getWorld();
      Chunk chunk = world.getChunkAt(l);
      int chunkx = chunk.getX();
      int chunkz = chunk.getZ();
      world.refreshChunk(chunkx, chunkz);
  }
 
  /** Can be used to teleport the player on a slight delay, which gets around a nasty issue that can crash
     * the server if you teleport them during certain events (such as onPlayerJoin).
     *
 
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

    @Override
    public void fixAfterFastMode(Iterable<BlockVector2D> chunks) {
        World world = getWorld();
        for (BlockVector2D chunkPos : chunks) {
            world.refreshChunk(chunkPos.getBlockX(), chunkPos.getBlockZ());
        }
    }

    @Override
    public boolean playEffect(Vector position, int type, int data) {
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

        int chunkX = chunk.getX();
        int chunkZ = chunk.getZ();

        for (int x = chunkX - radius; x < chunkX + radius; x++) {
            for (int z = chunkZ - radius; z < chunkZ + radius; z++) {
                world.refreshChunk(x, z);
            }
        }
    }
}
View Full Code Here

Examples of org.bukkit.World.refreshChunk()

            chunksChanged.addFirst(here);
        }

    // refresh chunks
    for (Chunk chunk : chunksChanged)
      world.refreshChunk(chunk.getX(), chunk.getZ());
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.