diff --git a/.lgtm.yml b/.lgtm.yml index ef5f303a95d..d8484c5c318 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -6,4 +6,4 @@ extraction: index: java_version: 17 gradle: - version: 7.4 \ No newline at end of file + version: 7.4.1 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 200818c2e5f..5d3a82dae16 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ apply plugin: 'org.parchmentmc.librarian.forgegradle' wrapper { //Define wrapper values here so as to not have to always do so when updating gradlew.properties - gradleVersion = '7.4' + gradleVersion = '7.4.1' distributionType = Wrapper.DistributionType.ALL } @@ -361,7 +361,6 @@ repositories { flatDir { dirs 'libs' } - mavenLocal() //TODO - 1.18: Remove once forge updates whenObjectAdded {//ForgeGradle adds these in an afterEvaluate, so we need to catch them as they're added and exclude mod artifacts/groups if (it instanceof MavenArtifactRepository) { diff --git a/docs/Development.md b/docs/Development.md index 368f9082fd2..529cc46f3ae 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -4,7 +4,7 @@ Mekanism is developed for Minecraft 1.18.2 using Minecraft Forge. ## Prerequisites -* Gradle - Version 7.4 is known to work, your mileage with other versions may vary +* Gradle - Version 7.4.1 is known to work, your mileage with other versions may vary ## Directory Structure diff --git a/gradle.properties b/gradle.properties index 0f1dd2f2a7f..29267499703 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx3G minecraft_version=1.18.2 -mappings_version=1.18.1-2022.03.06-1.18.2 +mappings_version=2022.03.13-1.18.2 mappings_channel=parchment loader_version_range=[40,) -forge_version=40.0.44-1.18.x-tags-overhaul-lex +forge_version=40.0.18 mod_version=10.1.2 #This determines the minimum version of forge required to use Mekanism # Only bump it whenever we need access to a feature in forge that is not available in earlier versions -forge_version_range=[40.0.12,) +forge_version_range=[40.0.18,) minecraft_version_range=[1.18.2] #This specifies what type of release it will be uploaded to curseforge as # options are: alpha, beta, release @@ -32,7 +32,7 @@ curios_version=5.0.6.3 crafttweaker_version=9.0.80 jade_api_id=3681450 jade_id=3681449 -jei_version=9.5.0.132 +jei_version=9.5.2.135 jeitweaker_version=3.0.0.4 oc2_id=3647401 #projecte_api_id=3223223 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2ae..41d9927a4d4 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b1159fc54f3..d7e66b5c615 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.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index c53aefaa5fc..1b6c787337f 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # diff --git a/src/main/java/mekanism/common/integration/projecte/NSSChemical.java b/src/main/java/mekanism/common/integration/projecte/NSSChemical.java deleted file mode 100644 index c6d2a3100b3..00000000000 --- a/src/main/java/mekanism/common/integration/projecte/NSSChemical.java +++ /dev/null @@ -1,40 +0,0 @@ -package mekanism.common.integration.projecte; - -import java.util.Optional; -import java.util.function.Consumer; -import javax.annotation.Nonnull; -import mekanism.api.chemical.Chemical; -import mekanism.api.chemical.ChemicalTags; -import moze_intel.projecte.api.nss.AbstractNSSTag; -import moze_intel.projecte.api.nss.NormalizedSimpleStack; -import net.minecraft.core.HolderSet.Named; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.TagKey; - -public abstract class NSSChemical> extends AbstractNSSTag { - - protected NSSChemical(@Nonnull ResourceLocation resourceLocation, boolean isTag) { - super(resourceLocation, isTag); - } - - @Nonnull - @Override - protected final Optional> getTag() { - return Optional.empty(); - } - - @Nonnull - protected abstract ChemicalTags tags(); - - @Override - public void forEachElement(Consumer consumer) { - if (representsTag()) { - tags().getManager().ifPresent(manager -> { - TagKey key = manager.createTagKey(getResourceLocation()); - if (manager.isKnownTagName(key)) { - manager.getTag(key).stream().map(createNew()).forEach(consumer); - } - }); - } - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/common/integration/projecte/NSSGas.java b/src/main/java/mekanism/common/integration/projecte/NSSGas.java index f821b8142af..82dc47ee28c 100644 --- a/src/main/java/mekanism/common/integration/projecte/NSSGas.java +++ b/src/main/java/mekanism/common/integration/projecte/NSSGas.java @@ -1,21 +1,24 @@ package mekanism.common.integration.projecte; +import com.mojang.datafixers.util.Either; +import java.util.Optional; import java.util.function.Function; import javax.annotation.Nonnull; -import mekanism.api.chemical.ChemicalTags; +import mekanism.api.MekanismAPI; import mekanism.api.chemical.gas.Gas; import mekanism.api.chemical.gas.GasStack; import mekanism.api.providers.IGasProvider; import moze_intel.projecte.api.nss.AbstractNSSTag; import moze_intel.projecte.api.nss.NormalizedSimpleStack; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; - +import net.minecraftforge.registries.tags.ITag; /** * Implementation of {@link NormalizedSimpleStack} and {@link moze_intel.projecte.api.nss.NSSTag} for representing {@link Gas}s. */ -public final class NSSGas extends NSSChemical { +public final class NSSGas extends AbstractNSSTag { private NSSGas(@Nonnull ResourceLocation resourceLocation, boolean isTag) { super(resourceLocation, isTag); @@ -93,8 +96,8 @@ public String getType() { @Nonnull @Override - protected ChemicalTags tags() { - return ChemicalTags.GAS; + protected Optional, ITag>> getTag() { + return getTag(MekanismAPI.gasRegistry()); } @Override diff --git a/src/main/java/mekanism/common/integration/projecte/NSSInfuseType.java b/src/main/java/mekanism/common/integration/projecte/NSSInfuseType.java index 19479d25148..2c3d10c6e76 100644 --- a/src/main/java/mekanism/common/integration/projecte/NSSInfuseType.java +++ b/src/main/java/mekanism/common/integration/projecte/NSSInfuseType.java @@ -1,21 +1,24 @@ package mekanism.common.integration.projecte; +import com.mojang.datafixers.util.Either; +import java.util.Optional; import java.util.function.Function; import javax.annotation.Nonnull; -import mekanism.api.chemical.ChemicalTags; -import mekanism.api.chemical.gas.Gas; +import mekanism.api.MekanismAPI; import mekanism.api.chemical.infuse.InfuseType; import mekanism.api.chemical.infuse.InfusionStack; import mekanism.api.providers.IInfuseTypeProvider; import moze_intel.projecte.api.nss.AbstractNSSTag; import moze_intel.projecte.api.nss.NormalizedSimpleStack; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; +import net.minecraftforge.registries.tags.ITag; /** * Implementation of {@link NormalizedSimpleStack} and {@link moze_intel.projecte.api.nss.NSSTag} for representing {@link InfuseType}s. */ -public final class NSSInfuseType extends NSSChemical { +public final class NSSInfuseType extends AbstractNSSTag { private NSSInfuseType(@Nonnull ResourceLocation resourceLocation, boolean isTag) { super(resourceLocation, isTag); @@ -93,8 +96,8 @@ public String getType() { @Nonnull @Override - protected ChemicalTags tags() { - return ChemicalTags.INFUSE_TYPE; + protected Optional, ITag>> getTag() { + return getTag(MekanismAPI.infuseTypeRegistry()); } @Override diff --git a/src/main/java/mekanism/common/integration/projecte/NSSPigment.java b/src/main/java/mekanism/common/integration/projecte/NSSPigment.java index 23fa82d6b39..cb236239e86 100644 --- a/src/main/java/mekanism/common/integration/projecte/NSSPigment.java +++ b/src/main/java/mekanism/common/integration/projecte/NSSPigment.java @@ -1,20 +1,24 @@ package mekanism.common.integration.projecte; +import com.mojang.datafixers.util.Either; +import java.util.Optional; import java.util.function.Function; import javax.annotation.Nonnull; -import mekanism.api.chemical.ChemicalTags; +import mekanism.api.MekanismAPI; import mekanism.api.chemical.pigment.Pigment; import mekanism.api.chemical.pigment.PigmentStack; import mekanism.api.providers.IPigmentProvider; import moze_intel.projecte.api.nss.AbstractNSSTag; import moze_intel.projecte.api.nss.NormalizedSimpleStack; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; +import net.minecraftforge.registries.tags.ITag; /** * Implementation of {@link NormalizedSimpleStack} and {@link moze_intel.projecte.api.nss.NSSTag} for representing {@link Pigment}s. */ -public final class NSSPigment extends NSSChemical { +public final class NSSPigment extends AbstractNSSTag { private NSSPigment(@Nonnull ResourceLocation resourceLocation, boolean isTag) { super(resourceLocation, isTag); @@ -92,8 +96,8 @@ public String getType() { @Nonnull @Override - protected ChemicalTags tags() { - return ChemicalTags.PIGMENT; + protected Optional, ITag>> getTag() { + return getTag(MekanismAPI.pigmentRegistry()); } @Override diff --git a/src/main/java/mekanism/common/integration/projecte/NSSSlurry.java b/src/main/java/mekanism/common/integration/projecte/NSSSlurry.java index ae53155af7b..a9702bf580c 100644 --- a/src/main/java/mekanism/common/integration/projecte/NSSSlurry.java +++ b/src/main/java/mekanism/common/integration/projecte/NSSSlurry.java @@ -1,20 +1,24 @@ package mekanism.common.integration.projecte; +import com.mojang.datafixers.util.Either; +import java.util.Optional; import java.util.function.Function; import javax.annotation.Nonnull; -import mekanism.api.chemical.ChemicalTags; +import mekanism.api.MekanismAPI; import mekanism.api.chemical.slurry.Slurry; import mekanism.api.chemical.slurry.SlurryStack; import mekanism.api.providers.ISlurryProvider; import moze_intel.projecte.api.nss.AbstractNSSTag; import moze_intel.projecte.api.nss.NormalizedSimpleStack; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; +import net.minecraftforge.registries.tags.ITag; /** * Implementation of {@link NormalizedSimpleStack} and {@link moze_intel.projecte.api.nss.NSSTag} for representing {@link Slurry}. */ -public final class NSSSlurry extends NSSChemical { +public final class NSSSlurry extends AbstractNSSTag { private NSSSlurry(@Nonnull ResourceLocation resourceLocation, boolean isTag) { super(resourceLocation, isTag); @@ -92,8 +96,8 @@ public String getType() { @Nonnull @Override - protected ChemicalTags tags() { - return ChemicalTags.SLURRY; + protected Optional, ITag>> getTag() { + return getTag(MekanismAPI.slurryRegistry()); } @Override