Compare commits

..
Author SHA1 Message Date
Martin Robertz bf7cc86247 update bs+deps 2024-01-12 21:23:08 +01:00
Raven Szewczyk d6650f6cc4 [ci skip] upgraded build system 2024-01-08 21:30:25 +00:00
16 changed files with 41 additions and 101 deletions

No files matched your search

+15 -20
View File
@@ -1,4 +1,4 @@
//version: 1702141377
//version: 1704751096
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -31,8 +31,7 @@ buildscript {
maven {
// GTNH RetroFuturaGradle and ASM Fork
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
}
mavenLocal()
}
@@ -49,12 +48,12 @@ plugins {
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'com.palantir.git-version' version '3.0.0' apply false
id 'de.undercouch.download' version '5.4.0'
id 'de.undercouch.download' version '5.5.0'
id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.27'
}
print("You might want to check out './gradlew :faq' if your build fails.\n")
@@ -118,7 +117,7 @@ propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnset("channel", "stable")
propertyDefaultIfUnset("mappingsVersion", "12")
propertyDefaultIfUnset("usesMavenPublishing", true)
propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases")
propertyDefaultIfUnset("mavenPublishUrl", "https://nexus.gtnewhorizons.com/repository/releases/")
propertyDefaultIfUnset("modrinthProjectId", "")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnset("curseForgeProjectId", "")
@@ -573,13 +572,15 @@ afterEvaluate {
repositories {
maven {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
name = "GTNH Maven"
url = "https://nexus.gtnewhorizons.com/repository/public/"
// Links for convenience:
// Simple HTML browsing: https://nexus.gtnewhorizons.com/service/rest/repository/browse/releases/
// Rich web UI browsing: https://nexus.gtnewhorizons.com/#browse/browse:releases
}
maven {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
}
maven {
name 'sonatype'
@@ -785,7 +786,7 @@ dependencies {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.4.4')
}
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
@@ -960,8 +961,7 @@ if (usesShadowedDependencies.toBoolean()) {
configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
tasks.named("jar", Jar) {
enabled = false
finalizedBy(tasks.shadowJar)
archiveClassifier.set('dev-preshadow')
}
tasks.named("reobfJar", ReobfuscatedJar) {
inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile}))
@@ -970,11 +970,6 @@ if (usesShadowedDependencies.toBoolean()) {
javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}
for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) {
tasks.named(runTask).configure {
dependsOn("shadowJar")
}
}
}
ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar
ext.publishableObfJar = tasks.reobfJar
@@ -1178,7 +1173,7 @@ publishing {
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
maven {
url = mavenPublishUrl
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
allowInsecureProtocol = mavenPublishUrl.startsWith("http://")
credentials {
username = System.getenv("MAVEN_USER") ?: "NONE"
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
+1 -1
View File
@@ -1,7 +1,7 @@
// Add your dependencies here
dependencies {
implementation('com.github.GTNewHorizons:NotEnoughItems:2.4.13-GTNH:dev')
implementation('com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev')
shadowImplementation('au.com.bytecode:opencsv:2.4')
}
+1 -1
View File
@@ -39,7 +39,7 @@ apiPackage = api
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
accessTransformersFile = Waila_at.cfg
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
Binary file not shown.
+2 -1
View File
@@ -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
Vendored
+17 -12
View File
@@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
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"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +131,13 @@ 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.
@@ -144,7 +145,7 @@ 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=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | 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=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi
# 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
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# 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, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
+4 -5
View File
@@ -4,10 +4,9 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
}
}
gradlePluginPortal()
@@ -17,8 +16,8 @@ pluginManagement {
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
id 'com.diffplug.blowdryerSetup' version '1.7.1'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' // Provides java toolchains
}
blowdryerSetup {
@@ -49,6 +49,4 @@ public interface IWailaDataAccessor {
ForgeDirection getSide();
ItemStack getStack();
float getBlockBreakDamage();
}
@@ -150,8 +150,6 @@ public class ConfigHandler implements IWailaConfigHandler {
OverlayConfig.posY = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_POSY, 100).getInt();
OverlayConfig.alpha = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_ALPHA, 80).getInt();
OverlayConfig.breakprogress = config
.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_BREAK_PROGRESS, true).getBoolean();
OverlayConfig.bgcolor = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_BGCOLOR, 0x100010)
.getInt();
OverlayConfig.gradient1 = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT1, 0x5000ff)
@@ -1,7 +1,6 @@
package mcp.mobius.waila.api.impl;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -22,7 +21,6 @@ import mcp.mobius.waila.utils.NBTUtil;
public class DataAccessorCommon implements IWailaCommonAccessor, IWailaDataAccessor, IWailaEntityAccessor {
private static final Minecraft MC = Minecraft.getMinecraft();
public World world;
public EntityPlayer player;
public MovingObjectPosition mop;
@@ -39,7 +37,6 @@ public class DataAccessorCommon implements IWailaCommonAccessor, IWailaDataAcces
public ItemStack stack;
public static DataAccessorCommon instance = new DataAccessorCommon();
public float blockBreakDamage;
public void set(World _world, EntityPlayer _player, MovingObjectPosition _mop) {
this.set(_world, _player, _mop, null, 0.0);
@@ -58,7 +55,6 @@ public class DataAccessorCommon implements IWailaCommonAccessor, IWailaDataAcces
this.entity = null;
this.blockID = Block.getIdFromBlock(this.block);
this.blockResource = GameData.getBlockRegistry().getNameForObject(this.block);
this.blockBreakDamage = MC.playerController.curBlockDamageMP;
try {
this.stack = new ItemStack(this.block, 1, this.metadata);
} catch (Exception e) {}
@@ -204,11 +200,6 @@ public class DataAccessorCommon implements IWailaCommonAccessor, IWailaDataAcces
return this.stack;
}
@Override
public float getBlockBreakDamage() {
return this.blockBreakDamage;
}
public boolean isTimeElapsed(long time) {
return System.currentTimeMillis() - this.timeLastUpdate >= time;
}
@@ -124,37 +124,6 @@ public class DisplayUtil {
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
public static void drawGradientRect(int x, int y, double w, double h, int grad1, int grad2) {
float zLevel = 0.0f;
float f = (float) (grad1 >> 24 & 255) / 255.0F;
float f1 = (float) (grad1 >> 16 & 255) / 255.0F;
float f2 = (float) (grad1 >> 8 & 255) / 255.0F;
float f3 = (float) (grad1 & 255) / 255.0F;
float f4 = (float) (grad2 >> 24 & 255) / 255.0F;
float f5 = (float) (grad2 >> 16 & 255) / 255.0F;
float f6 = (float) (grad2 >> 8 & 255) / 255.0F;
float f7 = (float) (grad2 & 255) / 255.0F;
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(f1, f2, f3, f);
tessellator.addVertex((x + w), y, zLevel);
tessellator.addVertex(x, y, zLevel);
tessellator.setColorRGBA_F(f5, f6, f7, f4);
tessellator.addVertex(x, y + h, zLevel);
tessellator.addVertex(x + w, y + h, zLevel);
tessellator.draw();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
public static void drawTexturedModalRect(int x, int y, int u, int v, int w, int h, int tw, int th) {
float f = 0.00390625F;
float f1 = 0.00390625F;
@@ -15,7 +15,6 @@ public class OverlayConfig {
public static int gradient2;
public static int fontcolor;
public static float scale;
public static boolean breakprogress;
public static void updateColors() {
OverlayConfig.alpha = (int) (ConfigHandler.instance()
@@ -7,7 +7,6 @@ import net.minecraft.util.MovingObjectPosition;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.impl.ConfigHandler;
public class OverlayRenderer {
@@ -63,19 +62,6 @@ public class OverlayRenderer {
OverlayConfig.gradient1,
OverlayConfig.gradient2);
if (OverlayConfig.breakprogress && tooltip.accessor instanceof IWailaDataAccessor) {
IWailaDataAccessor data = ((IWailaDataAccessor) tooltip.accessor);
if (data.getBlockBreakDamage() > 0) {
DisplayUtil.drawGradientRect(
tooltip.x + 1,
tooltip.y + tooltip.h,
(double) (tooltip.w - 1) * (data.getBlockBreakDamage()),
1,
0xffffffff,
0xffffffff);
}
}
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
tooltip.draw();
@@ -78,6 +78,7 @@ public class WailaTickHandler {
accessor.set(world, player, target);
ItemStack targetStack = RayTracing.instance().getTargetStack(); // Here we get either the proper stack
// or the override
if (targetStack != null) {
this.currenttip = new TipList<String, String>();
this.currenttipHead = new TipList<String, String>();
@@ -30,7 +30,6 @@ public final class Constants {
public static String CFG_WAILA_NHEARTS = "waila.cfg.heartsperline";
public static String CFG_WAILA_MAXHP = "waila.cfg.maxhpbeforetext";
public static String CFG_WAILA_NEWFILTERS = "waila.cfg.newfilters";
public static String CFG_WAILA_BREAK_PROGRESS = "waila.cfg.breakprogress";
public static String CFG_WAILA_ALPHA = "waila.cfg.alpha";
public static String CFG_WAILA_BGCOLOR = "waila.cfg.bgcolor";
-1
View File
@@ -1 +0,0 @@
public net.minecraft.client.multiplayer.PlayerControllerMP field_78770_f # curBlockDamageMP