diff --git a/build.gradle b/build.gradle index 466618a..2f94bd0 100644 --- a/build.gradle +++ b/build.gradle @@ -33,7 +33,7 @@ dependencies { mappings loom.layered() { officialMojangMappings() // Use parchment mappings. NOTE: Parchment maven must be manually added. (https://maven.parchmentmc.org) - parchment("org.parchmentmc.data:parchment-1.19.3:2023.03.12@zip") + parchment("org.parchmentmc.data:parchment-${project.minecraft_version}:${project.parchment_mappings}@zip") } modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" @@ -42,9 +42,7 @@ dependencies { // Server translations API // include(modImplementation("fr.catcore:server-translations-api:${project.server_translations_version}")) // jitpack version - include(modImplementation("com.github.NucleoidMC:Server-Translations:${project.server_translations_version}")) - // Server side command arguments. OUTDATED - // include(modImplementation("ca.stellardrift:colonel:0.2")) + include(modImplementation("xyz.nucleoid:server-translations-api:${project.server_translations_version}")) // Carpet for fake players // modImplementation "com.github.gnembon:fabric-carpet:${project.carpet_version}" jitpack diff --git a/gradle.properties b/gradle.properties index 5df0e94..e95bb64 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,20 +2,20 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties -minecraft_version=1.20.1 -yarn_mappings=1.20.1+build.5 -loader_version=0.14.21 +minecraft_version=1.20.2 +parchment_mappings=2023.12.10 +loader_version=0.15.3 #Fabric api -fabric_version=0.84.0+1.20.1 +fabric_version=0.91.2+1.20.2 # Mod Properties -mod_version = 1.3.1 +mod_version = 1.4.1 maven_group = cn.noryea archives_base_name = manhunt-fabric # External mods # Server Translations -server_translations_version = fecf59e +server_translations_version = 2.1.0+1.20.2-rc2 # Carpet snapshot -carpet_version = 1.4.112 \ No newline at end of file +carpet_version = 1.4.121 \ No newline at end of file diff --git a/src/main/java/cn/noryea/manhunt/mixin/EnderDragonEntityMixin.java b/src/main/java/cn/noryea/manhunt/mixin/EnderDragonEntityMixin.java index dcdae3a..547b2c4 100644 --- a/src/main/java/cn/noryea/manhunt/mixin/EnderDragonEntityMixin.java +++ b/src/main/java/cn/noryea/manhunt/mixin/EnderDragonEntityMixin.java @@ -14,11 +14,13 @@ public abstract class EnderDragonEntityMixin { //End the game when runners kill the enderdragon @Inject(method = "tickDeath", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/GameRules;getBoolean(Lnet/minecraft/world/level/GameRules$Key;)Z")) private void runnersWon(CallbackInfo ci) { - EnderDragon dragon = ((EnderDragon) (Object) this); - MinecraftServer server = dragon.getServer(); - if (ManhuntConfig.INSTANCE.isRunnersWinOnDragonDeath() && !server.getScoreboard().getPlayerTeam("runners").getPlayers().isEmpty() && dragon.dragonDeathTime == 1) { - server.getCommands().performPrefixedCommand(server.createCommandSourceStack().withSuppressedOutput().withPermission(2), "title @a subtitle {\"translate\":\"manhunt.win.runners.subtitle\",\"color\":\"white\"}"); - server.getCommands().performPrefixedCommand(server.createCommandSourceStack().withSuppressedOutput().withPermission(2), "title @a title {\"translate\":\"manhunt.win.runners.title\",\"color\":\"white\"}"); - } + try { + EnderDragon dragon = ((EnderDragon) (Object) this); + MinecraftServer server = dragon.getServer(); + if (ManhuntConfig.INSTANCE.isRunnersWinOnDragonDeath() && !server.getScoreboard().getPlayerTeam("runners").getPlayers().isEmpty() && dragon.dragonDeathTime == 1) { + server.getCommands().performPrefixedCommand(server.createCommandSourceStack().withSuppressedOutput().withPermission(2), "title @a subtitle {\"translate\":\"manhunt.win.runners.subtitle\",\"color\":\"white\"}"); + server.getCommands().performPrefixedCommand(server.createCommandSourceStack().withSuppressedOutput().withPermission(2), "title @a title {\"translate\":\"manhunt.win.runners.title\",\"color\":\"white\"}"); + } + } catch (NullPointerException ignored) {} } }