Fix partial nature restorations.

Were occurring in select situations.
This commit is contained in:
ryanhamshire 2016-06-15 08:52:17 -07:00
parent e05b3d4f30
commit ee857f3a83
2 changed files with 9 additions and 2 deletions

View File

@ -80,8 +80,14 @@ class RestoreNatureExecutionTask implements Runnable
break; break;
} }
currentBlock.setTypeId(blockUpdate.typeId); try
currentBlock.setData(blockUpdate.data); {
currentBlock.setTypeIdAndData(blockUpdate.typeId, blockUpdate.data, false);
}
catch(IllegalArgumentException e)
{
//just don't update this block and continue trying to update other blocks
}
} }
} }
} }

View File

@ -608,6 +608,7 @@ class RestoreNatureProcessingTask implements Runnable
if(block.typeId != Material.AIR.getId() && if(block.typeId != Material.AIR.getId() &&
!(ignoreLeaves && block.typeId == Material.SNOW.getId()) && !(ignoreLeaves && block.typeId == Material.SNOW.getId()) &&
!(ignoreLeaves && block.typeId == Material.LEAVES.getId()) && !(ignoreLeaves && block.typeId == Material.LEAVES.getId()) &&
!(ignoreLeaves && block.typeId == Material.LEAVES_2.getId()) &&
!(block.typeId == Material.STATIONARY_WATER.getId()) && !(block.typeId == Material.STATIONARY_WATER.getId()) &&
!(block.typeId == Material.WATER.getId()) && !(block.typeId == Material.WATER.getId()) &&
!(block.typeId == Material.LAVA.getId()) && !(block.typeId == Material.LAVA.getId()) &&