Skip to content

Commit

Permalink
Merge branch 'master' into exnihilo
Browse files Browse the repository at this point in the history
  • Loading branch information
Irgendwer01 committed Dec 11, 2023
2 parents dc40f12 + 13f58f6 commit 5dc1af1
Show file tree
Hide file tree
Showing 1,491 changed files with 35,966 additions and 21,823 deletions.
457 changes: 417 additions & 40 deletions .editorconfig

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Convert to Jetbrains Annotations
5901bc912c9c3c5b03bf91747fff6c0276c3d773

# Enable Spotless Formatting
d0c17006a4d516252c3f0ebf7829d6ac81830872

23 changes: 23 additions & 0 deletions .github/workflows/pr_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,26 @@ jobs:
jdks
notifications
wrapper
Formatting:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Run Spotless
uses: gradle/gradle-build-action@v2
with:
arguments: 'spotlessCheck --build-cache'
gradle-home-cache-includes: |
caches
jdks
notifications
wrapper
24 changes: 17 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1699743071
//version: 1701739812
/*
* DO NOT CHANGE THIS FILE!
* Also, you may replace this file at any time if there is an update available.
Expand All @@ -24,9 +24,9 @@ plugins {
id 'eclipse'
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
id 'net.darkhax.curseforgegradle' version '1.1.16' apply false
id 'com.modrinth.minotaur' version '2.8.4' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.25'
id 'net.darkhax.curseforgegradle' version '1.1.17' apply false
id 'com.modrinth.minotaur' version '2.8.6' apply false
id 'com.diffplug.spotless' version '6.13.0' apply false
id 'com.palantir.git-version' version '3.0.0' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
Expand Down Expand Up @@ -222,6 +222,16 @@ if (enableSpotless.toBoolean()) {
//noinspection GroovyAssignabilityCheck
eclipse('4.19.0').configFile(formatFile)
}
kotlin {
target 'src/*/kotlin/**/*.kt'

toggleOffOn()
ktfmt('0.39')

trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
}
scala {
target 'src/*/scala/**/*.scala'
scalafmt('3.7.1')
Expand Down Expand Up @@ -501,8 +511,8 @@ dependencies {
testCompileOnly "me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0"
}

compileOnlyApi 'org.jetbrains:annotations:23.0.0'
annotationProcessor 'org.jetbrains:annotations:23.0.0'
compileOnlyApi 'org.jetbrains:annotations:24.1.0'
annotationProcessor 'org.jetbrains:annotations:24.1.0'
patchedMinecraft('net.minecraft:launchwrapper:1.17.2') {
transitive = false
}
Expand Down Expand Up @@ -1027,7 +1037,7 @@ def getChangelog() {

// Buildscript updating

def buildscriptGradleVersion = '8.2.1'
def buildscriptGradleVersion = '8.5'

tasks.named('wrapper', Wrapper).configure {
gradleVersion = buildscriptGradleVersion
Expand Down
13 changes: 11 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ dependencies {
// the CCL deobf jar uses very old MCP mappings, making it error at runtime in runClient/runServer
// therefore we manually deobf the regular jar
implementation rfg.deobf("curse.maven:codechicken-lib-1-8-242818:2779848") // CCL 3.2.3.358
implementation "curse.maven:modularui-624243:4856895-deobf-4856896-sources-4856897" // MUI 2.3.1

// Soft Dependencies
// Can change any of these from compileOnlyApi -> implementation to test them in-game.

implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.684"
implementation rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31
implementation rfg.deobf("curse.maven:groovyscript-687577:4687204") // GRS 0.6.0
implementation ("com.cleanroommc:groovyscript:0.7.1") {
transitive = false
}
implementation rfg.deobf("curse.maven:ae2-extended-life-570458:4402048") // AE2UEL 0.55.6

compileOnlyApi rfg.deobf("curse.maven:opencomputers-223008:4526246") // OpenComputers 1.8.0+9833087
Expand Down Expand Up @@ -59,8 +62,14 @@ minecraft {
}

configurations {
compileClassPath {
implementation {
// exclude GNU trove, FastUtil is superior and still updated
exclude group: "net.sf.trove4j", module: "trove4j"
// exclude javax.annotation from findbugs, jetbrains annotations are superior
exclude group: "com.google.code.findbugs", module: "jsr305"
// exclude scala as we don't use it for anything and causes import confusion
exclude group: "org.scala-lang"
exclude group: "org.scala-lang.modules"
exclude group: "org.scala-lang.plugins"
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ modGroup = gregtech

# Version of your mod.
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
modVersion = 2.7.4-beta
modVersion = 2.8.2-beta

# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
includeMCVersionJar = true
Expand Down Expand Up @@ -117,7 +117,7 @@ curseForgeProjectId =
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
curseForgeRelations = requiredDependency:codechicken-lib-1-8;incompatible:gregtechce
curseForgeRelations = requiredDependency:codechicken-lib-1-8;requiredDependency:modularui;requiredDependency:mixin-booter;incompatible:gregtechce

# This project's release type on CurseForge and/or Modrinth
# Allowed types: release, beta, alpha
Expand All @@ -135,7 +135,7 @@ noPublishedSources = false
# By default this will use the files found here: https://github.com/GregTechCEu/Buildscripts/tree/master/spotless
# to format your code. However, you can create your own version of these files and place them in your project's
# root directory to apply your own formatting options instead.
enableSpotless = false
enableSpotless = true

# Enable JUnit testing platform used for testing your code.
# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 10 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,26 +130,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pluginManagement {
}

plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'com.diffplug.blowdryerSetup' version '1.7.0'
// Automatic toolchain provisioning
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}

blowdryerSetup {
Expand Down
9 changes: 9 additions & 0 deletions spotless.importorder
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Organize Import Order
#Sat May 27 02:13:47 CDT 2023
0=gregtech
1=net
2=codechickenlib
2=
3=java
4=javax
5=\#
23 changes: 0 additions & 23 deletions src/api/java/forestry/api/arboriculture/IToolGrafter.java

This file was deleted.

26 changes: 9 additions & 17 deletions src/main/java/gregtech/GregTechMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import gregtech.common.covers.filter.oreglob.impl.OreGlobParser;
import gregtech.modules.GregTechModules;
import gregtech.modules.ModuleManager;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
Expand All @@ -17,23 +18,14 @@
import net.minecraftforge.fml.common.event.*;

@Mod(modid = GTValues.MODID,
name = "GregTech",
acceptedMinecraftVersions = "[1.12.2,1.13)",
version = GTInternalTags.VERSION,
dependencies = "required:forge@[14.23.5.2847,);"
+ "required-after:codechickenlib@[3.2.3,);"
+ "after:appliedenergistics2;"
+ "after:forestry;"
+ "after:extrabees;"
+ "after:extratrees;"
+ "after:genetics;"
+ "after:magicbees;"
+ "after:jei@[4.15.0,);"
+ "after:crafttweaker@[4.1.20,);"
+ "after:groovyscript@[0.6.0,);"
+ "after:theoneprobe;"
+ "after:hwyla;"
+ "after:exnihilocreatio;")
name = "GregTech",
acceptedMinecraftVersions = "[1.12.2,1.13)",
version = GTInternalTags.VERSION,
dependencies = "required:forge@[14.23.5.2847,);" + "required-after:codechickenlib@[3.2.3,);" +
"required-after:modularui@[2.3,);" + "required-after:mixinbooter@[8.0,);" + "after:appliedenergistics2;" +
"after:forestry;" + "after:extrabees;" + "after:extratrees;" + "after:genetics;" + "after:magicbees;" +
"after:jei@[4.15.0,);" + "after:crafttweaker@[4.1.20,);" + "after:groovyscript@[0.7.0,);" +
"after:theoneprobe;" + "after:hwyla;" + "after:exnihilocreatio;")
public class GregTechMod {

// Hold this so that we can reference non-interface methods without
Expand Down
32 changes: 21 additions & 11 deletions src/main/java/gregtech/api/GTValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gregtech.api.util.XSTR;
import gregtech.common.ConfigHolder;

import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
import net.minecraftforge.oredict.OreDictionary;
Expand Down Expand Up @@ -50,22 +51,26 @@ public class GTValues {
/**
* The Voltage Tiers. Use this Array instead of the old named Voltage Variables
*/
public static final long[] V = {8, 32, 128, 512, 2048, 8192, 32768, 131072, 524288, 2097152, 8388608, 33554432, 134217728, 536870912, Integer.MAX_VALUE};
public static final long[] V = { 8, 32, 128, 512, 2048, 8192, 32768, 131072, 524288, 2097152, 8388608, 33554432,
134217728, 536870912, Integer.MAX_VALUE };

/**
* The Voltage Tiers divided by 2.
*/
public static final int[] VH = {4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824};
public static final int[] VH = { 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216,
67108864, 268435456, 1073741824 };

/**
* The Voltage Tiers adjusted for cable loss. Use this for recipe EU/t to avoid full-amp recipes
*/
public static final int[] VA = {7, 30, 120, 480, 1920, 7680, 30720, 122880, 491520, 1966080, 7864320, 31457280, 125829120, 503316480, 2013265920};
public static final int[] VA = { 7, 30, 120, 480, 1920, 7680, 30720, 122880, 491520, 1966080, 7864320, 31457280,
125829120, 503316480, 2013265920 };

/**
* The Voltage Tiers adjusted for cable loss, divided by 2.
*/
public static final int[] VHA = {7, 16, 60, 240, 960, 3840, 15360, 61440, 245760, 983040, 3932160, 15728640, 62914560, 251658240, 1006632960};
public static final int[] VHA = { 7, 16, 60, 240, 960, 3840, 15360, 61440, 245760, 983040, 3932160, 15728640,
62914560, 251658240, 1006632960 };

public static final int ULV = 0;
public static final int LV = 1;
Expand All @@ -87,28 +92,32 @@ public class GTValues {
/**
* The short names for the voltages, used for registration primarily
*/
public static final String[] VN = new String[]{"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV", "UIV", "UXV", "OpV", "MAX"};
public static final String[] VN = new String[] { "ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV",
"UEV", "UIV", "UXV", "OpV", "MAX" };

/**
* The short names for the voltages, formatted for text
*/
public static final String[] VNF = new String[]{
public static final String[] VNF = new String[] {
DARK_GRAY + "ULV", GRAY + "LV", AQUA + "MV",
GOLD + "HV", DARK_PURPLE + "EV", DARK_BLUE + "IV",
LIGHT_PURPLE + "LuV", RED + "ZPM", DARK_AQUA + "UV",
DARK_RED + "UHV", GREEN + "UEV", DARK_GREEN + "UIV",
YELLOW + "UXV", BLUE + "OpV", RED.toString() + BOLD + "MAX"};
YELLOW + "UXV", BLUE + "OpV", RED.toString() + BOLD + "MAX" };

/**
* Color values for the voltages
*/
public static final int[] VC = new int[]{0xC80000, 0xDCDCDC, 0xFF6400, 0xFFFF1E, 0x808080, 0xF0F0F5, 0xE99797, 0x7EC3C4, 0x7EB07E, 0xBF74C0, 0x0B5CFE, 0x914E91, 0x488748, 0x8C0000, 0x2828F5};
public static final int[] VC = new int[] { 0xC80000, 0xDCDCDC, 0xFF6400, 0xFFFF1E, 0x808080, 0xF0F0F5, 0xE99797,
0x7EC3C4, 0x7EB07E, 0xBF74C0, 0x0B5CFE, 0x914E91, 0x488748, 0x8C0000, 0x2828F5 };

/**
* The long names for the voltages
*/
public static final String[] VOLTAGE_NAMES = new String[]{"Ultra Low Voltage", "Low Voltage", "Medium Voltage", "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage",
"Ultra High Voltage", "Ultra Excessive Voltage", "Ultra Immense Voltage", "Ultra Extreme Voltage", "Overpowered Voltage", "Maximum Voltage"};
public static final String[] VOLTAGE_NAMES = new String[] { "Ultra Low Voltage", "Low Voltage", "Medium Voltage",
"High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage",
"Ultra High Voltage", "Ultra Excessive Voltage", "Ultra Immense Voltage", "Ultra Extreme Voltage",
"Overpowered Voltage", "Maximum Voltage" };

/**
* ModID strings, since they are quite common parameters
Expand Down Expand Up @@ -176,6 +185,7 @@ public static boolean isDeobfEnvironment() {

public static Supplier<Boolean> XMAS = () -> {
String[] yearMonthDay = LocalDate.now().toString().split("-");
return ConfigHolder.misc.specialEvents && yearMonthDay[1].equals("12") && (yearMonthDay[2].equals("24") || yearMonthDay[2].equals("25"));
return ConfigHolder.misc.specialEvents && yearMonthDay[1].equals("12") &&
(yearMonthDay[2].equals("24") || yearMonthDay[2].equals("25"));
};
}
Loading

0 comments on commit 5dc1af1

Please sign in to comment.