Rework fabric hooks to use more fabric api if possible
(Since, honestly, their hooks location is way better when it exists...)
This commit is contained in:
@@ -65,12 +65,14 @@ public class ServerApi
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: rename to serverLoadEvent
|
||||
public void serverWorldLoadEvent() {
|
||||
Server server = new Server();
|
||||
SharedApi.currentServer = server;
|
||||
SharedApi.currentWorld = new DHWorld();
|
||||
}
|
||||
|
||||
//TODO: rename to serverUnloadEvent
|
||||
public void serverWorldUnloadEvent() {
|
||||
SharedApi.currentWorld.close();
|
||||
SharedApi.currentWorld = null;
|
||||
@@ -83,9 +85,13 @@ public class ServerApi
|
||||
public void serverLevelUnloadEvent(IWorldWrapper world) {
|
||||
SharedApi.currentWorld.unloadLevel(world);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void serverSaveEvent() {
|
||||
SharedApi.currentWorld.save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void chunkSaveEvent(IChunkWrapper chunk, IWorldWrapper world) {
|
||||
//TODO
|
||||
@@ -93,4 +99,6 @@ public class ServerApi
|
||||
|
||||
public void serverChunkLoadEvent(IChunkWrapper chunk, IWorldWrapper world) {
|
||||
}
|
||||
public void serverChunkSaveEvent(IChunkWrapper chunk, IWorldWrapper world) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,6 @@ public class SharedApi {
|
||||
public static IMinecraftSharedWrapper MC;
|
||||
public static Logger LOGGER = DhLoggerBuilder.getLogger("DH Events");
|
||||
|
||||
public static boolean inDedicatedEnvironment;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user