Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2022-09-07 08:56:45 -04:00
2 changed files with 8 additions and 1 deletions

View File

@@ -202,6 +202,7 @@ public class World{
*/
public void beginMapLoad(){
generating = true;
Events.fire(new WorldLoadBeginEvent());
}
/**
@@ -209,6 +210,7 @@ public class World{
* A WorldLoadEvent will be fire.
*/
public void endMapLoad(){
Events.fire(new WorldLoadEndEvent());
for(Tile tile : tiles){
//remove legacy blocks; they need to stop existing

View File

@@ -77,8 +77,13 @@ public class EventType{
public static class MusicRegisterEvent{}
/** Called *after* all the modded files have been added into Vars.tree */
public static class FileTreeInitEvent{}
/** Called when a game begins and the world tiles are loaded. Entities are not yet loaded at this stage. */
/** Called when a game begins and the world tiles are loaded, just set `generating = false`. Entities are not yet loaded at this stage. */
public static class WorldLoadEvent{}
/** Called when the world begin to load, just set `generating = true`. */
public static class WorldLoadBeginEvent{}
/** Called when a game begins and the world tiles are initiated. About to updates tile proximity and sets up physics for the world(Before WorldLoadEvent) */
public static class WorldLoadEndEvent{}
public static class SaveLoadEvent{
public final boolean isMap;