@@ -255,6 +255,10 @@ static void LoadWorldListEntry([NotNull] XElement el)
255255 tempEl = el . Element ( "MOTD" ) ;
256256 if ( tempEl != null ) world . MOTD = tempEl . Value ;
257257
258+ tempEl = el . Element ( "MaxReach" ) ;
259+ short reach ;
260+ if ( tempEl != null && Int16 . TryParse ( tempEl . Value , out reach ) ) world . MaxReach = reach ;
261+
258262 //XElement bhEl = el.Element("BlockHunt");
259263 //if (bhEl != null) LoadBlockHuntSettings(world, worldName, bhEl);
260264
@@ -356,9 +360,6 @@ static void LoadEnvSettings(World world, string worldName, XElement el) {
356360 if ( ( attr = el . Attribute ( "terrain" ) ) != null ) {
357361 world . Texture = ParseString ( attr , worldName ) ;
358362 }
359- if ( ( attr = el . Attribute ( "maxreach" ) ) != null ) {
360- world . maxReach = ParseShort ( attr , worldName , 160 , "normal" ) ;
361- }
362363 if ( ( attr = el . Attribute ( "weather" ) ) != null ) {
363364 world . Weather = ParseByte ( attr , worldName , 0 , "sunny" ) ;
364365 }
@@ -555,6 +556,9 @@ public static void SaveWorldList() {
555556 if ( ! world . Deletable ) {
556557 temp . Add ( new XAttribute ( "deletable" , false ) ) ;
557558 }
559+ if ( world . MaxReach != - 1 ) {
560+ temp . Add ( new XElement ( "MaxReach" , world . MaxReach ) ) ;
561+ }
558562
559563 /*save BlockHunt settings
560564 XElement BHunt = new XElement("BlockHunt");
@@ -613,8 +617,7 @@ static void SaveEnvSettings(World world, XElement temp) {
613617 elEnv . Add ( new XAttribute ( "water" , world . HorizonBlock . GetHashCode ( ) ) ) ;
614618 elEnv . Add ( new XAttribute ( "bedrock" , world . EdgeBlock . GetHashCode ( ) ) ) ;
615619 if ( world . Texture != null )
616- elEnv . Add ( new XAttribute ( "terrain" , world . Texture ) ) ;
617- elEnv . Add ( new XAttribute ( "maxreach" , world . maxReach ) ) ;
620+ elEnv . Add ( new XAttribute ( "terrain" , world . Texture ) ) ;
618621 elEnv . Add ( new XAttribute ( "weather" , world . Weather ) ) ;
619622
620623 if ( world . CloudsHeight != short . MinValue )
0 commit comments