All is good.
This commit is contained in:
parent
c8c370cec0
commit
7e1fe5a602
@ -9,6 +9,6 @@ loader_version=0.8.2+build.194
|
||||
fabric_version=0.10.7+build.344-1.16
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.2.0-1.15
|
||||
mod_version = 1.2.0-20w19a
|
||||
maven_group = net.szum123321
|
||||
archives_base_name = textile_backup
|
@ -23,12 +23,17 @@ import io.github.cottonmc.cotton.config.ConfigManager;
|
||||
import io.github.cottonmc.cotton.logging.ModLogger;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.event.server.ServerStartCallback;
|
||||
import net.fabricmc.fabric.api.registry.CommandRegistry;
|
||||
import net.minecraft.class_5218;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraft.world.level.storage.LevelStorage;
|
||||
import net.szum123321.textile_backup.commands.BlacklistCommand;
|
||||
import net.szum123321.textile_backup.commands.CleanupCommand;
|
||||
import net.szum123321.textile_backup.commands.StartBackupCommand;
|
||||
import net.szum123321.textile_backup.commands.WhitelistCommand;
|
||||
import net.szum123321.textile_backup.mixin.MinecraftServerSessionAccessor;
|
||||
|
||||
public class TextileBackup implements ModInitializer {
|
||||
public static final String MOD_ID = "textile_backup";
|
||||
@ -45,6 +50,13 @@ public class TextileBackup implements ModInitializer {
|
||||
config = ConfigManager.loadConfig(ConfigHandler.class);
|
||||
|
||||
registerCommands();
|
||||
|
||||
ServerStartCallback.EVENT.register(server -> {
|
||||
LevelStorage.Session session = ((MinecraftServerSessionAccessor)server).getSession();
|
||||
|
||||
System.out.println(session.getDirectory(class_5218.field_24188).toAbsolutePath());
|
||||
System.out.println(session.method_27424(DimensionType.OVERWORLD).toPath().toAbsolutePath());
|
||||
});
|
||||
}
|
||||
|
||||
private void registerCommands(){
|
||||
|
@ -50,7 +50,7 @@ public class MakeBackupThread implements Runnable {
|
||||
public void run() {
|
||||
File world = ((MinecraftServerSessionAccessor)server)
|
||||
.getSession()
|
||||
.getDirectory(class_5218.field_24188).toFile();
|
||||
.method_27424(DimensionType.OVERWORLD);
|
||||
|
||||
File outFile = BackupHelper
|
||||
.getBackupRootPath(Utilities.getLevelName(server))
|
||||
|
@ -29,6 +29,6 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.7.2",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.15.*"
|
||||
"minecraft": "1.16.*"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user