mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
1.19 update
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.8-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
@@ -43,8 +43,7 @@ tasks.withType(JavaCompile).configureEach {
|
||||
// If Javadoc is generated, this must be specified in that task too.
|
||||
it.options.encoding = "UTF-8"
|
||||
|
||||
// Minecraft 1.17 (21w19a) upwards uses Java 16.
|
||||
it.options.release = 16
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version=1.17
|
||||
yarn_mappings=1.17+build.13
|
||||
loader_version=0.11.6
|
||||
minecraft_version=1.19
|
||||
yarn_mappings=1.19+build.1
|
||||
loader_version=0.14.7
|
||||
# Mod Properties
|
||||
mod_version=1.0.4
|
||||
mod_version=1.1.0
|
||||
maven_group=net.lionarius
|
||||
archives_base_name=skin-restorer
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.lionarius.skinrestorer.enums.SkinVariant;
|
||||
import net.minecraft.command.argument.EntityArgumentType;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -65,7 +65,7 @@ public class SkinCommand {
|
||||
private static int skinAction(Collection<ServerPlayerEntity> targets, boolean setByOperator, Supplier<Property> skinSupplier) {
|
||||
new Thread(() -> {
|
||||
if (!setByOperator)
|
||||
targets.stream().findFirst().get().sendMessage(new LiteralText("§6[SkinRestorer]§f Downloading skin."), true);
|
||||
targets.stream().findFirst().get().sendMessage(Text.of("§6[SkinRestorer]§f Downloading skin."), true);
|
||||
|
||||
Property skin = skinSupplier.get();
|
||||
|
||||
@@ -73,9 +73,9 @@ public class SkinCommand {
|
||||
SkinRestorer.getSkinStorage().setSkin(player.getUuid(), skin);
|
||||
|
||||
if (setByOperator)
|
||||
player.sendMessage(new LiteralText("§a[SkinRestorer]§f Operator changed your skin. You need to reconnect to apply it."), true);
|
||||
player.sendMessage(Text.of("§a[SkinRestorer]§f Operator changed your skin. You need to reconnect to apply it."), true);
|
||||
else
|
||||
player.sendMessage(new LiteralText("§a[SkinRestorer]§f You need to reconnect to apply skin."), true);
|
||||
player.sendMessage(Text.of("§a[SkinRestorer]§f You need to reconnect to apply skin."), true);
|
||||
}
|
||||
}).start();
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.lionarius.skinrestorer.mixin;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import net.lionarius.skinrestorer.command.SkinCommand;
|
||||
import net.minecraft.command.CommandRegistryAccess;
|
||||
import net.minecraft.server.command.CommandManager;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
@@ -19,7 +20,7 @@ public abstract class CommandManagerMixin {
|
||||
private CommandDispatcher<ServerCommandSource> dispatcher;
|
||||
|
||||
@Inject(method = "<init>", at = @At(value = "TAIL"))
|
||||
private void init(CommandManager.RegistrationEnvironment environment, CallbackInfo ci) {
|
||||
private void init(CommandManager.RegistrationEnvironment environment, CommandRegistryAccess commandRegistryAccess, CallbackInfo ci) {
|
||||
SkinCommand.register(dispatcher);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ public class JsonUtils {
|
||||
}
|
||||
|
||||
public static JsonObject parseJson(String json) {
|
||||
return new JsonParser().parse(json).getAsJsonObject();
|
||||
return JsonParser.parseString(json).getAsJsonObject();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.11.3",
|
||||
"minecraft": "*",
|
||||
"java": ">=8"
|
||||
"java": ">=17"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user