Skip to content

Commit

Permalink
Mitigate restorenature hanging (#411)
Browse files Browse the repository at this point in the history
Certain parts are disabled.
  • Loading branch information
112RG authored and RoboMWM committed Nov 22, 2018
1 parent 3a9b253 commit fc7e940
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -2156,7 +2156,6 @@ else if(materialInHand == instance.config_claims_investigationTool && hand == E

//figure out which chunk to repair
Chunk chunk = player.getWorld().getChunkAt(clickedBlock.getLocation());

//start the repair process

//set boundaries for processing
Expand Down
Expand Up @@ -82,8 +82,8 @@ public void run()

try
{
currentBlock.setType(blockUpdate.typeId, false);
currentBlock.setBlockData(blockUpdate.data, false);
currentBlock.setType(blockUpdate.typeId, false);
// currentBlock.setBlockData(blockUpdate.data, false);
}
catch(IllegalArgumentException e)
{
Expand Down
Expand Up @@ -149,7 +149,7 @@ public void run()
this.fillHolesAndTrenches();

//fill water depressions and fix unnatural surface ripples
this.fixWater();
//this.fixWater();

//remove water/lava above sea level
this.removeDumpedFluids();
Expand All @@ -158,7 +158,7 @@ public void run()
this.coverSurfaceStone();

//remove any player-placed leaves
this.removePlayerLeaves();
///this.removePlayerLeaves();

//schedule main thread task to apply the result to the world
RestoreNatureExecutionTask task = new RestoreNatureExecutionTask(this.snapshots, this.miny, this.lesserBoundaryCorner, this.greaterBoundaryCorner, this.player);
Expand Down Expand Up @@ -327,6 +327,7 @@ private void removePlayerBlocks()
for(int y = miny; y < snapshots[0].length - 1; y++)
{
BlockSnapshot block = snapshots[x][y][z];

if(this.playerBlocks.contains(block.typeId))
{
block.typeId = Material.AIR;
Expand Down Expand Up @@ -444,7 +445,7 @@ private void coverSurfaceStone()
}
else
{
this.snapshots[x][y][z].typeId = Material.GRASS;
this.snapshots[x][y][z].typeId = Material.GRASS_BLOCK;
}
}
}
Expand Down

0 comments on commit fc7e940

Please sign in to comment.