Limit block changes sent in seechunk to prevent client freezing. Use prettier blocks.
This commit is contained in:
parent
5569e5076a
commit
4929e5dd18
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user