fCraft.Map.ResetSpawn C# (CSharp) Method

ResetSpawn() public method

Resets the spawn to a valid Java 7 location (X, Y, and found Z) Old behaviour: Resets spawn to the default location (top center of the map).
public ResetSpawn ( ) : void
return void
        public void ResetSpawn()
        {
            Spawn = new Position( Width * 16,
                                  Length * 16,
                                  Math.Min( short.MaxValue, Height * 32 ) );
        }

Usage Example

Example #1
0
        static void CreateDefaultMainWorld()
        {
            Map map = new Map(null, 64, 64, 64, true);

            MapGenerator.GenerateFlatgrass(map);
            map.ResetSpawn();
            MainWorld = AddWorld(null, "main", map, true);
        }
All Usage Examples Of fCraft.Map::ResetSpawn