Merge pull request #8 from wafflecoffee/1.19

Update to 1.19
This commit is contained in:
Martin Prokoph
2022-06-18 09:41:03 +00:00
committed by GitHub
6 changed files with 23 additions and 32 deletions

View File

@@ -1,18 +1,15 @@
plugins {
id 'fabric-loom' version '0.9.+'
id 'fabric-loom' version '0.12.+'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
minecraft {
}
repositories {
maven { url "https://maven.terraformersmc.com" }
maven { url "https://maven.shedaniel.me" }
@@ -45,8 +42,9 @@ processResources {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release.set(17)
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
@@ -64,13 +62,7 @@ jar {
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

View File

@@ -2,19 +2,18 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.61
loader_version=0.11.7
# check these on https://fabricmc.net/develop/
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.8
# Mod Properties
mod_version = 1.1.0
mod_version = 1.2.0
maven_group = eu.midnightdust
archives_base_name = timechanger
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.40.1+1.17
fabric_version=0.56.0+1.19
cloth_config_version = 5.0.38
mod_menu_version = 2.0.2
cloth_config_version = 7.0.72
mod_menu_version = 4.0.0

Binary file not shown.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -5,7 +5,7 @@ import eu.midnightdust.timechanger.config.TimeChangerConfig;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.serializer.JanksonConfigSerializer;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
public class TimeChangerClient implements ClientModInitializer {
@@ -15,7 +15,7 @@ public class TimeChangerClient implements ClientModInitializer {
public void onInitializeClient() {
AutoConfig.register(TimeChangerConfig.class, JanksonConfigSerializer::new);
TC_CONFIG = AutoConfig.getConfigHolder(TimeChangerConfig.class).getConfig();
ClientCommandManager.DISPATCHER.register(ClientCommandManager.literal("ctime")
ClientCommandManager.getActiveDispatcher().register(ClientCommandManager.literal("ctime")
.then(CTimeCommand.command())
);
}

View File

@@ -5,11 +5,11 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import eu.midnightdust.timechanger.TimeChangerClient;
import eu.midnightdust.timechanger.config.TimeChangerConfig;
import me.shedaniel.autoconfig.AutoConfig;
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource;
import net.minecraft.text.TranslatableText;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.text.Text;
import static net.fabricmc.fabric.api.client.command.v1.ClientCommandManager.argument;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;
public class CTimeCommand {
@@ -24,7 +24,7 @@ public class CTimeCommand {
TimeChangerClient.TC_CONFIG.custom_time = time;
AutoConfig.getConfigHolder(TimeChangerConfig.class).save();
source.sendFeedback(new TranslatableText("command.timechanger.ctime.success").append(String.valueOf(time)));
source.sendFeedback(Text.translatable("command.timechanger.ctime.success").append(String.valueOf(time)));
return 1;
}