Limit block changes sent in seechunk to prevent client freezing. Use prettier blocks.

This commit is contained in:
drtshock 2014-10-20 12:06:47 -05:00 committed by t00thpick1
parent 5569e5076a
commit 4929e5dd18
1 changed files with 2 additions and 2 deletions

View File

@ -52,10 +52,10 @@ public class CmdSeeChunk extends FCommand {
@SuppressWarnings("deprecation")
public static void showPillar(Player player, World world, int blockX, int blockZ) {
for (int blockY = 0; blockY < world.getMaxHeight(); blockY++) {
for (int blockY = 0; blockY < player.getLocation().getBlockY() + 30; blockY++) {
Location loc = new Location(world, blockX, blockY, blockZ);
if (loc.getBlock().getType() != Material.AIR) continue;
int typeId = blockY % 5 == 0 ? Material.GLOWSTONE.getId() : Material.GLASS.getId();
int typeId = blockY % 5 == 0 ? Material.REDSTONE_LAMP_ON.getId() : Material.STAINED_GLASS.getId();
VisualizeUtil.addLocation(player, loc, typeId);
}
}