From aa665413388631031a1bf937aca754d11c040fbb Mon Sep 17 00:00:00 2001 From: Tatsuya Noda Date: Fri, 27 Jan 2023 10:10:52 +0900 Subject: [PATCH] update to 1.19.3 (not compatible with earlier 1.19.x) (#77) * update to 1.19.3 (not compatible with earlier 1.19.x) Co-authored-by: Andrew Grant --- build.gradle | 6 ++++-- gradle.properties | 16 ++++++++-------- .../io/github/Andrew6rant/stacker/Stacker.java | 13 ++++++------- .../Andrew6rant/stacker/StackerModMenu.java | 1 - .../stacker/mixin/DispenserBehaviorMixin.java | 1 - .../stacker/mixin/ItemRenderScaleMixin.java | 4 ---- .../stacker/mixin/ItemStackMixin.java | 4 ---- .../stacker/mixin/LimitFurnaceStackMixin.java | 4 +--- .../Andrew6rant/stacker/util/ItemsHelper.java | 2 +- src/main/resources/fabric.mod.json | 4 ++-- 10 files changed, 22 insertions(+), 33 deletions(-) diff --git a/build.gradle b/build.gradle index 99dd1ee..86a112c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.12-SNAPSHOT' + id 'fabric-loom' version '1.0-SNAPSHOT' id 'maven-publish' id "me.shedaniel.unified-publishing" version "0.1.+" } @@ -12,9 +12,11 @@ version = project.mod_version group = project.maven_group repositories { + maven { url 'https://jitpack.io' } maven { url = "https://storage.googleapis.com/devan-maven/" } maven { url = "https://maven.shedaniel.me/" } maven { url = "https://maven.terraformersmc.com/releases/" } + // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. @@ -31,7 +33,7 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - include "net.devtech:Stacc:1.3.2" + include "net.devtech:Stacc:${project.stacc_version}" modRuntimeOnly(include("net.devtech:Stacc:${project.stacc_version}")) modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { diff --git a/gradle.properties b/gradle.properties index 75bec20..90bc9f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/versions.html - minecraft_version=1.19.1 - yarn_mappings=1.19.1+build.6 - loader_version=0.14.8 + minecraft_version=1.19.3 + yarn_mappings=1.19.3+build.3 + loader_version=0.14.11 # Mod Properties - mod_version = 3.0.2-1.19.x + mod_version = 3.0.2-1.19.3 maven_group = io.github.Andrew6rant archives_base_name = stacker # Dependencies - fabric_version=0.58.5+1.19.1 - modmenu_version=4.0.0 - cloth_config_version=7.0.72 - stacc_version=1.3.4 \ No newline at end of file + fabric_version=0.69.1+1.19.3 + modmenu_version=5.0.0 + cloth_config_version=9.0.94 + stacc_version=1.4.0 \ No newline at end of file diff --git a/src/main/java/io/github/Andrew6rant/stacker/Stacker.java b/src/main/java/io/github/Andrew6rant/stacker/Stacker.java index e9da716..ec28bf7 100644 --- a/src/main/java/io/github/Andrew6rant/stacker/Stacker.java +++ b/src/main/java/io/github/Andrew6rant/stacker/Stacker.java @@ -7,10 +7,11 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; import net.minecraft.item.Item; -import net.minecraft.tag.TagKey; +import net.minecraft.registry.Registries; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.tag.TagKey; import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -19,8 +20,6 @@ import java.util.Set; import java.util.stream.Collectors; -import static net.minecraft.util.registry.Registry.ITEM_KEY; - public class Stacker implements ModInitializer { private static final Logger LOGGER = LogManager.getLogger("Stacker"); private static Stacker stacker; @@ -40,7 +39,7 @@ public void onInitialize() { public static void loadStacker(String configMsg) { LOGGER.info("Stacker: Attempting to "+configMsg+" config..."); Set invalidSet = new HashSet<>(); - for (Item item : Registry.ITEM) { + for (Item item : Registries.ITEM) { if (!item.isDamageable()) { Stacker.setMax(item, stackerConfig.getConfig().maxStacker); } @@ -88,7 +87,7 @@ public static Integer overrideItem(Item item, List overrideList, Set> itemStream = item.getRegistryEntry().streamTags().collect(Collectors.toList()); for (TagKey tagKey : itemStream) { - if (item.getRegistryEntry().isIn(TagKey.of(ITEM_KEY, new Identifier(splitEntry[0], splitEntry[1])))) { + if (item.getRegistryEntry().isIn(TagKey.of(RegistryKeys.ITEM, new Identifier(splitEntry[0], splitEntry[1])))) { return Integer.parseInt(splitEntry[2]); } } @@ -96,7 +95,7 @@ public static Integer overrideItem(Item item, List overrideList, Set=0.14.6", "fabric": "*", "minecraft": [ - "1.19.x" + "1.19.3" ], "java": ">=17", - "cloth-config2": ">=7.0.72" + "cloth-config2": ">=9.0.94" }, "custom": { "modmenu": [