From 66a6116ac31fef6f25eb75f2e18393ad02e037ff Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 6 Aug 2022 16:33:36 +0200 Subject: [PATCH 1/5] Bump to v2.0.0-milestone.2.3 --- CHANGELOG.md | 2 ++ build.gradle | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd915d486..7391ecc38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [2.0.0-milestone.2.2] - 2022-08-06 + ### Changed - All directional blocks no longer transmit a network signal out of the direction. diff --git a/build.gradle b/build.gradle index d862402fb..62354ce63 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ allprojects { subprojects { group = 'com.refinedmods.refinedstorage2' - version = '2.0.0-milestone.2.2' + version = '2.0.0-milestone.2.3' if (System.getenv('GITHUB_SHA') != null) { version += '+' + System.getenv('GITHUB_SHA').substring(0, 7) From 47784abfdef334c30be0398526e17f98c43de9a3 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 6 Aug 2022 16:46:07 +0200 Subject: [PATCH 2/5] Update mc version in bug report template. --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a379ee25f..d4822f1c0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,8 +35,7 @@ body: description: | If your Minecraft version isn't listed here, it means that it's no longer supported. In that case, don't create an issue. options: - - Minecraft 1.18.2 - - Minecraft 1.19 + - Minecraft 1.19.1 validations: required: true - type: input From 939fa3a0d9b8187cd78bc391d76d68e3c0cb8b6d Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 26 Aug 2022 18:31:53 +0200 Subject: [PATCH 3/5] Slight cleanup. --- .../refinedstorage2/api/core/QuantityFormatter.java | 3 +++ .../api/core/registry/OrderedRegistry.java | 8 ++++++++ .../AbstractResourceFilterContainerMenu.java | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java b/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java index a5f622ea3..d9dae1a15 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java +++ b/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java @@ -4,6 +4,9 @@ import java.text.DecimalFormatSymbols; import java.util.Locale; +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0") public final class QuantityFormatter { private static final DecimalFormat FORMATTER_WITH_UNITS = new DecimalFormat( "####0.#", diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java b/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java index 7da73a748..641e981d4 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java +++ b/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java @@ -39,6 +39,14 @@ public interface OrderedRegistry { */ Optional get(I id); + /** + * @param id the id + * @return the value, if present, otherwise the default + */ + default T getOrElseDefault(I id) { + return get(id).orElseGet(this::getDefault); + } + /** * @return the default value */ diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceFilterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceFilterContainerMenu.java index ee10c3bdd..e596fd9a5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceFilterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceFilterContainerMenu.java @@ -49,7 +49,7 @@ protected AbstractResourceFilterContainerMenu(final MenuType type, protected void initializeResourceFilterSlots(final FriendlyByteBuf buf) { final ResourceLocation type = buf.readResourceLocation(); - this.currentResourceType = resourceTypeRegistry.get(type).orElse(resourceTypeRegistry.getDefault()); + this.currentResourceType = resourceTypeRegistry.getOrElseDefault(type); for (final ResourceFilterSlot resourceFilterSlot : resourceFilterSlots) { resourceFilterSlot.readFromUpdatePacket(buf); } @@ -121,7 +121,7 @@ public Component getCurrentResourceTypeName() { } public void setCurrentResourceType(final ResourceLocation id) { - this.currentResourceType = resourceTypeRegistry.get(id).orElse(resourceTypeRegistry.getDefault()); + this.currentResourceType = resourceTypeRegistry.getOrElseDefault(id); } @Override From fdc783f98a45279e6429c5fe9405b92798e3b602 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 26 Aug 2022 19:04:16 +0200 Subject: [PATCH 4/5] Port to 1.19.2 --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- CHANGELOG.md | 4 +++ gradle.properties | 28 +++++++++---------- refinedstorage2-platform-fabric/build.gradle | 2 +- .../src/main/resources/META-INF/mods.toml | 2 +- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d4822f1c0..201580758 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,7 +35,7 @@ body: description: | If your Minecraft version isn't listed here, it means that it's no longer supported. In that case, don't create an issue. options: - - Minecraft 1.19.1 + - Minecraft 1.19.2 validations: required: true - type: input diff --git a/CHANGELOG.md b/CHANGELOG.md index 7391ecc38..b4cebfff8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + +- Ported to Minecraft 1.19.2. + ## [2.0.0-milestone.2.2] - 2022-08-06 ### Changed diff --git a/gradle.properties b/gradle.properties index 407b5d2be..6936e4393 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,22 +1,22 @@ # Gradle org.gradle.jvmargs=-Xmx1G # Test dependencies -junitVersion=5.8.2 +junitVersion=5.9.0 # Use the same Log4j API as MC to not break logging in the development environment. log4jVersion=2.17.1 -equalsverifierVersion=3.10 -assertJVersion=3.22.0 -mockitoVersion=4.6.0 +equalsverifierVersion=3.10.1 +assertJVersion=3.23.1 +mockitoVersion=4.7.0 jsr305Version=3.0.2 -checkstyleVersion=10.3.1 +checkstyleVersion=10.3.2 # Libraries apiGuardianVersion=1.1.2 # MC -minecraftVersion=1.19.1 -parchmentVersion=2022.05.22 -fabricLoaderVersion=0.14.8 -fabricApiVersion=0.58.5+1.19.1 -forgeVersion=42.0.1 +minecraftVersion=1.19.2 +parchmentVersion=2022.08.21 +fabricLoaderVersion=0.14.9 +fabricApiVersion=0.60.0+1.19.2 +forgeVersion=43.1.3 # Mod dependencies # https://www.curseforge.com/minecraft/mc-mods/auto-config-updated-api/files autoconfig1uVersion=3.4.0 @@ -25,10 +25,10 @@ clothConfigVersion=8.0.75 # https://github.com/TechReborn/Energy energyVersion=2.1.0 # https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items/files -reiVersion=9.1.518 +reiVersion=9.1.530 # https://www.curseforge.com/minecraft/mc-mods/modmenu/files -modMenuVersion=4.0.5 +modMenuVersion=4.0.6 # https://www.curseforge.com/minecraft/mc-mods/wthit/files -wthitVersion=5.9.0 +wthitVersion=5.11.3 # https://www.curseforge.com/minecraft/mc-mods/jei/files -jeiVersion=11.2.0.241 +jeiVersion=11.2.0.256 diff --git a/refinedstorage2-platform-fabric/build.gradle b/refinedstorage2-platform-fabric/build.gradle index 1e5b20548..509f1e9eb 100644 --- a/refinedstorage2-platform-fabric/build.gradle +++ b/refinedstorage2-platform-fabric/build.gradle @@ -31,7 +31,7 @@ dependencies { minecraft "com.mojang:minecraft:${project.minecraftVersion}" mappings loom.layered() { officialMojangMappings() -/* TODO parchment("org.parchmentmc.data:parchment-${project.minecraftVersion}:${project.parchmentVersion}@zip")*/ + parchment("org.parchmentmc.data:parchment-${project.minecraftVersion}:${project.parchmentVersion}@zip") } modImplementation "net.fabricmc:fabric-loader:${project.fabricLoaderVersion}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabricApiVersion}" diff --git a/refinedstorage2-platform-forge/src/main/resources/META-INF/mods.toml b/refinedstorage2-platform-forge/src/main/resources/META-INF/mods.toml index 12b88f64e..f91890ed4 100644 --- a/refinedstorage2-platform-forge/src/main/resources/META-INF/mods.toml +++ b/refinedstorage2-platform-forge/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader = "javafml" -loaderVersion = "[42,)" +loaderVersion = "[43,)" issueTrackerURL = "https://github.com/refinedmods/refinedstorage2" license = "MIT" [[mods]] From c63ceb6935de5b685d8ac20733dd0420dbcc482d Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 26 Aug 2022 19:05:42 +0200 Subject: [PATCH 5/5] Fix mixin crash on startup. Fixes #212 --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- CHANGELOG.md | 4 ++++ .../platform/fabric/mixin/ModelBakeryMixin.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 201580758..d854204f6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,7 +35,7 @@ body: description: | If your Minecraft version isn't listed here, it means that it's no longer supported. In that case, don't create an issue. options: - - Minecraft 1.19.2 + - Minecraft 1.19.2 validations: required: true - type: input diff --git a/CHANGELOG.md b/CHANGELOG.md index b4cebfff8..60d7d173f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Ported to Minecraft 1.19.2. +### Fixed + +- Fixed mixin crash on startup on Fabric. + ## [2.0.0-milestone.2.2] - 2022-08-06 ### Changed diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/ModelBakeryMixin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/ModelBakeryMixin.java index 3db59f007..16d1c58fb 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/ModelBakeryMixin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/ModelBakeryMixin.java @@ -22,7 +22,7 @@ public class ModelBakeryMixin { @Shadow private Map, BakedModel> bakedCache; - @Inject(method = "bake", at = @At("RETURN"), cancellable = true, remap = false) + @Inject(method = "bake", at = @At("RETURN"), cancellable = true) public void onBake(final ResourceLocation resourceLocation, final ModelState modelState, final CallbackInfoReturnable returnable) {