forked from minecraft-dotnet/Substrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule1.vb
More file actions
32 lines (24 loc) · 1006 Bytes
/
Copy pathModule1.vb
File metadata and controls
32 lines (24 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Imports Substrate
' MoveSpawn changes the location of the world spawn location
' (which is separate from individual player spawn locations)
Module Module1
Sub Main(args As String())
If args.Length <> 4 Then
Console.WriteLine("Usage: MoveSpawn <world> <x> <y> <z>")
Return
End If
Dim dest As String = args(0)
Dim x As Integer = Convert.ToInt32(args(1))
Dim y As Integer = Convert.ToInt32(args(2))
Dim z As Integer = Convert.ToInt32(args(3))
' Open our world
Dim world As BetaWorld = BetaWorld.Open(dest)
' Set the level's spawn
' Note: Players do not have separate spawns by default
' If you wanted to change a player's spawn, you must set all
' 3 coordinates for it to stick. It will not take the level's defaults.
world.Level.Spawn = New SpawnPoint(x, y, z)
' Save the changes
world.Save()
End Sub
End Module