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

View File

@ -52,10 +52,10 @@ public class CmdSeeChunk extends FCommand {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static void showPillar(Player player, World world, int blockX, int blockZ) { 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); Location loc = new Location(world, blockX, blockY, blockZ);
if (loc.getBlock().getType() != Material.AIR) continue; 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); VisualizeUtil.addLocation(player, loc, typeId);
} }
} }