1.18 dep and name update
parent
b258523fd5
commit
3bf91ea915
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.9-SNAPSHOT'
|
id 'fabric-loom' version '0.10-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ repositories{
|
||||||
includeGroup "com.terraformersmc"
|
includeGroup "com.terraformersmc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -47,8 +48,8 @@ dependencies {
|
||||||
include "org.apache.commons:commons-compress:1.19"
|
include "org.apache.commons:commons-compress:1.19"
|
||||||
|
|
||||||
//LZMA support
|
//LZMA support
|
||||||
modImplementation "org.tukaani:xz:1.8"
|
modImplementation 'org.tukaani:xz:1.9'
|
||||||
include "org.tukaani:xz:1.8"
|
include "org.tukaani:xz:1.9"
|
||||||
|
|
||||||
//Gzip compression, parallel, GITHUB
|
//Gzip compression, parallel, GITHUB
|
||||||
modImplementation "com.github.shevek:parallelgzip:${project.pgzip_commit_hash}"
|
modImplementation "com.github.shevek:parallelgzip:${project.pgzip_commit_hash}"
|
||||||
|
@ -116,5 +117,7 @@ publishing {
|
||||||
static def getMcMinor(ver) {
|
static def getMcMinor(ver) {
|
||||||
String[] arr = ((String)ver).split("\\.");
|
String[] arr = ((String)ver).split("\\.");
|
||||||
|
|
||||||
|
if(arr.length < 2) return ver;
|
||||||
|
|
||||||
return (String)(arr[0] + "." + arr[1]);
|
return (String)(arr[0] + "." + arr[1]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
|
|
||||||
minecraft_version=1.17.1
|
minecraft_version=1.18-rc3
|
||||||
yarn_mappings=1.17.1+build.32
|
yarn_mappings=1.18-rc3+build.1
|
||||||
loader_version=0.11.6
|
loader_version=0.12.5
|
||||||
|
|
||||||
#Fabric api
|
#Fabric api
|
||||||
fabric_version=0.37.0+1.17
|
fabric_version=0.43.1+1.18
|
||||||
|
|
||||||
#Cloth Config
|
#Cloth Config
|
||||||
cloth_version=5.0.37
|
cloth_version=6.0.42
|
||||||
|
|
||||||
#ModMenu
|
#ModMenu
|
||||||
modmenu_version=2.0.4
|
modmenu_version=3.0.0
|
||||||
|
|
||||||
#Lazy DFU for faster dev start
|
#Lazy DFU for faster dev start
|
||||||
lazydfu_version=0.1.2
|
lazydfu_version=0.1.2
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class TextileBackup implements ModInitializer {
|
||||||
return ((config.get().playerWhitelist.contains(ctx.getEntityOrThrow().getEntityName()) ||
|
return ((config.get().playerWhitelist.contains(ctx.getEntityOrThrow().getEntityName()) ||
|
||||||
ctx.hasPermissionLevel(config.get().permissionLevel)) &&
|
ctx.hasPermissionLevel(config.get().permissionLevel)) &&
|
||||||
!config.get().playerBlacklist.contains(ctx.getEntityOrThrow().getEntityName())) ||
|
!config.get().playerBlacklist.contains(ctx.getEntityOrThrow().getEntityName())) ||
|
||||||
(ctx.getServer().isSinglePlayer() &&
|
(ctx.getServer().isSingleplayer() &&
|
||||||
config.get().alwaysSingleplayerAllowed);
|
config.get().alwaysSingleplayerAllowed);
|
||||||
} catch (Exception ignored) { //Command was called from server console.
|
} catch (Exception ignored) { //Command was called from server console.
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -93,12 +93,9 @@ public class TextileLogger {
|
||||||
if(source != null && source.getEntity() instanceof PlayerEntity) {
|
if(source != null && source.getEntity() instanceof PlayerEntity) {
|
||||||
LiteralText text = new LiteralText(messageFactory.newMessage(msg, args).getFormattedMessage());
|
LiteralText text = new LiteralText(messageFactory.newMessage(msg, args).getFormattedMessage());
|
||||||
|
|
||||||
if(level.intLevel() == Level.TRACE.intLevel())
|
if(level.intLevel() == Level.TRACE.intLevel()) text.formatted(Formatting.GREEN);
|
||||||
text.formatted(Formatting.GREEN);
|
else if(level.intLevel() <= Level.WARN.intLevel()) text.formatted(Formatting.RED);
|
||||||
else if(level.intLevel() <= Level.WARN.intLevel())
|
else text.formatted(Formatting.WHITE);
|
||||||
text.formatted(Formatting.RED);
|
|
||||||
else
|
|
||||||
text.formatted(Formatting.WHITE);
|
|
||||||
|
|
||||||
source.sendFeedback(prefixText.shallowCopy().append(text), false);
|
source.sendFeedback(prefixText.shallowCopy().append(text), false);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import net.szum123321.textile_backup.config.ConfigHelper;
|
||||||
import net.szum123321.textile_backup.config.ConfigPOJO;
|
import net.szum123321.textile_backup.config.ConfigPOJO;
|
||||||
import net.szum123321.textile_backup.Statics;
|
import net.szum123321.textile_backup.Statics;
|
||||||
import net.szum123321.textile_backup.mixin.MinecraftServerSessionAccessor;
|
import net.szum123321.textile_backup.mixin.MinecraftServerSessionAccessor;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -47,12 +48,11 @@ public class Utilities {
|
||||||
private final static ConfigHelper config = ConfigHelper.INSTANCE;
|
private final static ConfigHelper config = ConfigHelper.INSTANCE;
|
||||||
private final static TextileLogger log = new TextileLogger(TextileBackup.MOD_NAME);
|
private final static TextileLogger log = new TextileLogger(TextileBackup.MOD_NAME);
|
||||||
|
|
||||||
|
|
||||||
public static void notifyPlayers(MinecraftServer server, UUID sender, String msg) {
|
public static void notifyPlayers(MinecraftServer server, UUID sender, String msg) {
|
||||||
MutableText message = log.getPrefixText();
|
MutableText message = log.getPrefixText();
|
||||||
message.append(new LiteralText(msg).formatted(Formatting.WHITE));
|
message.append(new LiteralText(msg).formatted(Formatting.WHITE));
|
||||||
|
|
||||||
server.getPlayerManager().broadcastChatMessage(
|
server.getPlayerManager().broadcast(
|
||||||
message,
|
message,
|
||||||
MessageType.SYSTEM,
|
MessageType.SYSTEM,
|
||||||
sender
|
sender
|
||||||
|
@ -66,7 +66,8 @@ public class Utilities {
|
||||||
public static File getWorldFolder(MinecraftServer server) {
|
public static File getWorldFolder(MinecraftServer server) {
|
||||||
return ((MinecraftServerSessionAccessor)server)
|
return ((MinecraftServerSessionAccessor)server)
|
||||||
.getSession()
|
.getSession()
|
||||||
.getWorldDirectory(World.OVERWORLD);
|
.getWorldDirectory(World.OVERWORLD)
|
||||||
|
.toFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File getBackupRootPath(String worldName) {
|
public static File getBackupRootPath(String worldName) {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.11",
|
"fabricloader": ">=0.11",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.17.*",
|
"minecraft": "1.18.*",
|
||||||
"cloth-config2": "*",
|
"cloth-config2": "*",
|
||||||
"java": ">=16"
|
"java": ">=16"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue