public bool ConvertBlockTypes( [NotNull] byte[] mapping )
{
if ( mapping == null )
throw new ArgumentNullException( "mapping" );
if ( mapping.Length != 256 )
throw new ArgumentException( "Mapping must list all 256 blocks", "mapping" );
bool mapped = false;
fixed ( byte* ptr = Blocks ) {
for ( int j = 0; j < Blocks.Length; j++ ) {
if ( ptr[j] > 49 ) {
ptr[j] = mapping[ptr[j]];
mapped = true;
}
}
}
if ( mapped )
HasChangedSinceSave = true;
return mapped;
}