diff --git a/build.gradle b/build.gradle index 4e31dc8..50c3291 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1700844281 +//version: 1702141377 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -28,27 +28,12 @@ import java.util.concurrent.TimeUnit buildscript { repositories { - mavenCentral() - - maven { - name 'forge' - url 'https://maven.minecraftforge.net' - } maven { // GTNH RetroFuturaGradle and ASM Fork name "GTNH Maven" url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" allowInsecureProtocol = true } - maven { - name 'sonatype' - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - maven { - name 'Scala CI dependencies' - url 'https://repo1.maven.org/maven2/' - } - mavenLocal() } } @@ -69,7 +54,7 @@ plugins { 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.24' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26' } print("You might want to check out './gradlew :faq' if your build fails.\n") @@ -628,7 +613,7 @@ repositories { } maven { name = "ic2" - url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/") + url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/") content { includeGroup "net.industrial-craft" } @@ -687,6 +672,8 @@ configurations.all { substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier") + + substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets') } } @@ -793,12 +780,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies" } dependencies { - def lwjgl3ifyVersion = '1.5.1' + def lwjgl3ifyVersion = '1.5.7' if (modId != 'lwjgl3ify') { java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}") } if (modId != 'hodgepodge') { - java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17') + java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35') } java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false} @@ -1310,7 +1297,7 @@ def addCurseForgeRelation(String type, String name) { // Updating -def buildscriptGradleVersion = "8.2.1" +def buildscriptGradleVersion = "8.5" tasks.named('wrapper', Wrapper).configure { gradleVersion = buildscriptGradleVersion diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..c1962a7 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 37aef8d..17a8ddc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..aeb74cb 100755 --- a/gradlew +++ b/gradlew @@ -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 @@ -144,7 +141,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=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +149,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=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,6 +194,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 diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/renderers/model/ModelInfoPanel.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/renderers/model/ModelInfoPanel.java index fa842a3..488f5b3 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/renderers/model/ModelInfoPanel.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/renderers/model/ModelInfoPanel.java @@ -1,12 +1,11 @@ package shedar.mods.ic2.nuclearcontrol.renderers.model; import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.Facing; import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -18,8 +17,12 @@ @SideOnly(Side.CLIENT) public class ModelInfoPanel { - private static final String TEXTURE_FILE = "nuclearcontrol:textures/blocks/infoPanel/panelAdvancedSide.png"; - private static final ResourceLocation TEXTURE_LOCATION = new ResourceLocation(TEXTURE_FILE); + private static final String TEXTURE_FILE = "nuclearcontrol:infoPanel/panelAdvancedSide"; + private static final IIcon advSideTex = Minecraft.getMinecraft().getTextureMapBlocks().registerIcon(TEXTURE_FILE); + private static final double Uma = advSideTex.getMaxU(); + private static final double Umi = advSideTex.getMinU(); + private static final double Vma = advSideTex.getMaxV(); + private static final double Vmi = advSideTex.getMinV(); private double[] coordinates = new double[24]; private static final byte[][] pointMap = { { 0, 3, 2, 1 }, { 4, 5, 6, 7 }, { 0, 4, 7, 3 }, { 6, 5, 1, 2 }, @@ -264,9 +267,7 @@ private void drawFacing(int facing, int rotation, Screen screen, TileEntityAdvan double u2 = texture.getMaxU(); double v1 = texture.getMinV(); double v2 = texture.getMaxV(); - GL11.glDepthMask(false); addPoints(pointMap[facing], normalMap[facing], u1, u2, v1, v2); - GL11.glDepthMask(true); texture = block.getIcon(panel.getWorldObj(), panel.xCoord, panel.yCoord, panel.zCoord, facing); u1 = texture.getMinU(); @@ -296,77 +297,67 @@ public void renderScreen(Block block, TileEntityAdvancedInfoPanel panel, double if (panel.getTransparencyMode() == 0) { // Check if face should be transparent drawFacing(facing, panel.getRotation(), screen, panel, block, tess); } - // - tess.draw(); // SIDES if (panel.getTransparencyMode() == 0) { // Check if block should be transparent - Tessellator.instance.startDrawingQuads(); - renderer.minecraftRB.renderEngine.bindTexture(TEXTURE_LOCATION); + Tessellator.instance.setBrightness( block.getMixedBrightnessForBlock(panel.getWorldObj(), panel.xCoord, panel.yCoord, panel.zCoord)); Tessellator.instance.setColorOpaque_F(0.5F, 0.5F, 0.5F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - int dx = screen.getDx() + 1; - int dy = screen.getDy() + 1; - int dz = screen.getDz() + 1; - // bottom if (facing != 0) { Tessellator.instance.setNormal(0, -1, 0); - addPoint(0, 0, 0); - addPoint(3, dx, 0); - addPoint(2, dx, dz); - addPoint(1, 0, dz); + addPoint(0, Umi, Vmi); + addPoint(3, Uma, Vmi); + addPoint(2, Uma, Vma); + addPoint(1, Umi, Vma); } if (facing != 1) { Tessellator.instance.setNormal(0, 1, 0); - addPoint(4, 0, 0); - addPoint(5, dz, 0); - addPoint(6, dz, dx); - addPoint(7, 0, dx); + addPoint(4, Umi, Vmi); + addPoint(5, Uma, Vmi); + addPoint(6, Uma, Vma); + addPoint(7, Umi, Vma); } if (facing != 2) { Tessellator.instance.setNormal(0, 0, -1); - addPoint(0, 0, 0); - addPoint(4, dy, 0); - addPoint(7, dy, dx); - addPoint(3, 0, dx); + addPoint(0, Umi, Vmi); + addPoint(4, Uma, Vmi); + addPoint(7, Uma, Vma); + addPoint(3, Umi, Vma); } if (facing != 3) { Tessellator.instance.setNormal(0, 0, 1); - addPoint(6, 0, 0); - addPoint(5, dx, 0); - addPoint(1, dx, dy); - addPoint(2, 0, dy); + addPoint(6, Umi, Vmi); + addPoint(5, Uma, Vmi); + addPoint(1, Uma, Vma); + addPoint(2, Umi, Vma); } if (facing != 4) { Tessellator.instance.setNormal(-1, 0, 0); - addPoint(5, 0, 0); - addPoint(4, dz, 0); - addPoint(0, dz, dy); - addPoint(1, 0, dy); + addPoint(5, Umi, Vmi); + addPoint(4, Uma, Vmi); + addPoint(0, Uma, Vma); + addPoint(1, Umi, Vma); } if (facing != 5) { Tessellator.instance.setNormal(1, 0, 0); - addPoint(2, 0, 0); - addPoint(3, dz, 0); - addPoint(7, dz, dy); - addPoint(6, 0, dy); + addPoint(2, Umi, Vmi); + addPoint(3, Uma, Vmi); + addPoint(7, Uma, Vma); + addPoint(6, Umi, Vma); } - Tessellator.instance.draw(); } + // RETURN TO MC DRAWING - Tessellator.instance.startDrawingQuads(); - renderer.minecraftRB.renderEngine.bindTexture(TEXTURE_LOCATION); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Tessellator.instance.setColorOpaque_F(0.5F, 0.5F, 0.5F); - renderer.minecraftRB.renderEngine.bindTexture(TextureMap.locationBlocksTexture/* blocks texture atlas */); } }