Perf: Visualizations
This commit is contained in:
parent
8efe087a16
commit
b9ffd917e8
|
|
@ -55,13 +55,13 @@ public class Visualization
|
||||||
//reverts a visualization by sending another block change list, this time with the real world block values
|
//reverts a visualization by sending another block change list, this time with the real world block values
|
||||||
public static void Revert(Player player)
|
public static void Revert(Player player)
|
||||||
{
|
{
|
||||||
|
if(!player.isOnline()) return;
|
||||||
|
|
||||||
PlayerData playerData = GriefPrevention.instance.dataStore.getPlayerData(player.getUniqueId());
|
PlayerData playerData = GriefPrevention.instance.dataStore.getPlayerData(player.getUniqueId());
|
||||||
|
|
||||||
Visualization visualization = playerData.currentVisualization;
|
Visualization visualization = playerData.currentVisualization;
|
||||||
|
|
||||||
if(playerData.currentVisualization != null)
|
if(playerData.currentVisualization != null)
|
||||||
{
|
|
||||||
if(player.isOnline())
|
|
||||||
{
|
{
|
||||||
//locality
|
//locality
|
||||||
int minx = player.getLocation().getBlockX() - 100;
|
int minx = player.getLocation().getBlockX() - 100;
|
||||||
|
|
@ -85,7 +85,6 @@ public class Visualization
|
||||||
|
|
||||||
player.sendBlockChange(element.location, element.realMaterial, element.realData);
|
player.sendBlockChange(element.location, element.realMaterial, element.realData);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
playerData.currentVisualization = null;
|
playerData.currentVisualization = null;
|
||||||
}
|
}
|
||||||
|
|
@ -180,7 +179,7 @@ public class Visualization
|
||||||
int maxx = locality.getBlockX() + 100;
|
int maxx = locality.getBlockX() + 100;
|
||||||
int maxz = locality.getBlockZ() + 100;
|
int maxz = locality.getBlockZ() + 100;
|
||||||
|
|
||||||
final int STEP = 5;
|
final int STEP = 10;
|
||||||
|
|
||||||
//top line
|
//top line
|
||||||
for(int x = smallx + STEP; x < bigx - STEP / 2; x += STEP)
|
for(int x = smallx + STEP; x < bigx - STEP / 2; x += STEP)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user