Skip to content

Commit

Permalink
Update to a couple changes made in ProjectE and update and bump min f…
Browse files Browse the repository at this point in the history
…orge version to 40.0.18
  • Loading branch information
pupnewfster committed Mar 16, 2022
1 parent ac3be3a commit d8551af
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ extraction:
index:
java_version: 17
gradle:
version: 7.4
version: 7.4.1
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
#
Expand Down

This file was deleted.

13 changes: 8 additions & 5 deletions src/main/java/mekanism/common/integration/projecte/NSSGas.java
Original file line number Diff line number Diff line change
@@ -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<Gas> {
public final class NSSGas extends AbstractNSSTag<Gas> {

private NSSGas(@Nonnull ResourceLocation resourceLocation, boolean isTag) {
super(resourceLocation, isTag);
Expand Down Expand Up @@ -93,8 +96,8 @@ public String getType() {

@Nonnull
@Override
protected ChemicalTags<Gas> tags() {
return ChemicalTags.GAS;
protected Optional<Either<Named<Gas>, ITag<Gas>>> getTag() {
return getTag(MekanismAPI.gasRegistry());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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<InfuseType> {
public final class NSSInfuseType extends AbstractNSSTag<InfuseType> {

private NSSInfuseType(@Nonnull ResourceLocation resourceLocation, boolean isTag) {
super(resourceLocation, isTag);
Expand Down Expand Up @@ -93,8 +96,8 @@ public String getType() {

@Nonnull
@Override
protected ChemicalTags<InfuseType> tags() {
return ChemicalTags.INFUSE_TYPE;
protected Optional<Either<Named<InfuseType>, ITag<InfuseType>>> getTag() {
return getTag(MekanismAPI.infuseTypeRegistry());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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<Pigment> {
public final class NSSPigment extends AbstractNSSTag<Pigment> {

private NSSPigment(@Nonnull ResourceLocation resourceLocation, boolean isTag) {
super(resourceLocation, isTag);
Expand Down Expand Up @@ -92,8 +96,8 @@ public String getType() {

@Nonnull
@Override
protected ChemicalTags<Pigment> tags() {
return ChemicalTags.PIGMENT;
protected Optional<Either<Named<Pigment>, ITag<Pigment>>> getTag() {
return getTag(MekanismAPI.pigmentRegistry());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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<Slurry> {
public final class NSSSlurry extends AbstractNSSTag<Slurry> {

private NSSSlurry(@Nonnull ResourceLocation resourceLocation, boolean isTag) {
super(resourceLocation, isTag);
Expand Down Expand Up @@ -92,8 +96,8 @@ public String getType() {

@Nonnull
@Override
protected ChemicalTags<Slurry> tags() {
return ChemicalTags.SLURRY;
protected Optional<Either<Named<Slurry>, ITag<Slurry>>> getTag() {
return getTag(MekanismAPI.slurryRegistry());
}

@Override
Expand Down

0 comments on commit d8551af

Please sign in to comment.