From 8df9cc4609ca1e3d0f9ee2f102b3356aa19671a5 Mon Sep 17 00:00:00 2001 From: vodofrede Date: Sat, 18 Dec 2021 16:30:43 +0100 Subject: [PATCH] 1.18 update --- build.gradle | 22 +++++++++---------- gradle.properties | 12 +++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- .../palmoe/immersivetools/ImmersiveTools.java | 3 --- .../item/CopperArmorMaterial.java | 5 ++--- .../mixin/ImmersiveToolsMixin.java | 15 ------------- src/main/resources/fabric.mod.json | 6 ++--- src/main/resources/immersivetools.mixins.json | 4 ++-- 8 files changed, 25 insertions(+), 44 deletions(-) delete mode 100644 src/main/java/dk/palmoe/immersivetools/mixin/ImmersiveToolsMixin.java diff --git a/build.gradle b/build.gradle index 5554f02..5b52a95 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ plugins { - id 'fabric-loom' version '0.9-SNAPSHOT' + id 'fabric-loom' version '0.10-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 @@ -50,8 +50,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 { @@ -71,13 +70,14 @@ jar { publishing { publications { mavenJava(MavenPublication) { + from components.java // add all the jars that should be included when publishing to maven - artifact(remapJar) { - builtBy remapJar - } - artifact(sourcesJar) { - builtBy remapSourcesJar - } + // artifact(remapJar) { + // builtBy remapJar + // } + // artifact(sourcesJar) { + // builtBy remapSourcesJar + // } } } diff --git a/gradle.properties b/gradle.properties index 5574c74..aceed49 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,15 +3,15 @@ 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.39 - loader_version=0.11.6 + minecraft_version=1.18.1 + yarn_mappings=1.18.1+build.5 + loader_version=0.12.12 # Mod Properties - mod_version = 1.0.1 + mod_version = 1.1.0 maven_group = dk.palmoe archives_base_name = immersivetools # Dependencies - fabric_version=0.39.2+1.17 - cloth_config_version=5.0.38 \ No newline at end of file + fabric_version=0.44.0+1.18 + cloth_config_version=6.1.48 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..e750102 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/dk/palmoe/immersivetools/ImmersiveTools.java b/src/main/java/dk/palmoe/immersivetools/ImmersiveTools.java index 28f9e50..f0bc6f7 100644 --- a/src/main/java/dk/palmoe/immersivetools/ImmersiveTools.java +++ b/src/main/java/dk/palmoe/immersivetools/ImmersiveTools.java @@ -18,8 +18,5 @@ public class ImmersiveTools implements ModInitializer { // Proceed with mild caution. ItemInit.init(); - - // TODO: remove when mod is done - LOGGER.info("Initialized Immersive Tools"); } } diff --git a/src/main/java/dk/palmoe/immersivetools/item/CopperArmorMaterial.java b/src/main/java/dk/palmoe/immersivetools/item/CopperArmorMaterial.java index bb5fd9d..f153273 100644 --- a/src/main/java/dk/palmoe/immersivetools/item/CopperArmorMaterial.java +++ b/src/main/java/dk/palmoe/immersivetools/item/CopperArmorMaterial.java @@ -7,7 +7,7 @@ import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; public class CopperArmorMaterial implements ArmorMaterial { - private static final int[] BASE_DURABILITY = new int[] { 13, 15, 16, 11 }; + private static final int[] BASE_DURABILITY = new int[] { 130, 150, 160, 110 }; private static final int[] PROTECTION_VALUES = new int[] { 2, 5, 4, 1 }; private static CopperArmorMaterial INSTANCE = null; @@ -22,10 +22,9 @@ public class CopperArmorMaterial implements ArmorMaterial { return INSTANCE; } - // TODO: Make copper armor properties configurable @Override public int getDurability(EquipmentSlot slot) { - return BASE_DURABILITY[slot.getEntitySlotId()] * 10; + return BASE_DURABILITY[slot.getEntitySlotId()]; } @Override diff --git a/src/main/java/dk/palmoe/immersivetools/mixin/ImmersiveToolsMixin.java b/src/main/java/dk/palmoe/immersivetools/mixin/ImmersiveToolsMixin.java deleted file mode 100644 index b676d56..0000000 --- a/src/main/java/dk/palmoe/immersivetools/mixin/ImmersiveToolsMixin.java +++ /dev/null @@ -1,15 +0,0 @@ -package dk.palmoe.immersivetools.mixin; - -import net.minecraft.client.gui.screen.TitleScreen; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(TitleScreen.class) -public class ImmersiveToolsMixin { - @Inject(at = @At("HEAD"), method = "init()V") - private void init(CallbackInfo info) { - // TODO: Remove mixing if unused - } -} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index eee6d3d..bd9477e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -21,10 +21,10 @@ "mixins": ["immersivetools.mixins.json"], "depends": { - "fabricloader": ">=0.11.3", + "fabricloader": ">=0.12.0", "fabric": "*", - "minecraft": "1.17.x", - "java": ">=16" + "minecraft": "1.18.x", + "java": ">=17" }, "suggests": { "another-mod": "*" diff --git a/src/main/resources/immersivetools.mixins.json b/src/main/resources/immersivetools.mixins.json index bad5af5..370455e 100644 --- a/src/main/resources/immersivetools.mixins.json +++ b/src/main/resources/immersivetools.mixins.json @@ -2,9 +2,9 @@ "required": true, "minVersion": "0.8", "package": "dk.palmoe.immersivetools.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [], - "client": ["ImmersiveToolsMixin"], + "client": [], "injectors": { "defaultRequire": 1 }