Skip to content

Commit

Permalink
Merge pull request #111 from GTNewHorizons/fix/unhandled-side
Browse files Browse the repository at this point in the history
Fix unhandled side for redstone connection
  • Loading branch information
Dream-Master authored Dec 18, 2023
2 parents 44f59fb + b8a620c commit 646db1f
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 86 deletions.
36 changes: 11 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1697697256
//version: 1702141377
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -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()
}
}
Expand All @@ -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")
Expand Down Expand Up @@ -302,7 +287,7 @@ if (apiPackage) {
}

if (accessTransformersFile) {
for (atFile in accessTransformersFile.split(",")) {
for (atFile in accessTransformersFile.split(" ")) {
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
if (!getFile(targetFile).exists()) {
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
Expand Down Expand Up @@ -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"
}
Expand All @@ -646,7 +631,7 @@ repositories {

def mixinProviderGroup = "io.github.legacymoddingmc"
def mixinProviderModule = "unimixins"
def mixinProviderVersion = "0.1.7.1"
def mixinProviderVersion = "0.1.13"
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
ext.mixinProviderSpec = mixinProviderSpec
Expand Down Expand Up @@ -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')
}
}

Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -1187,9 +1174,8 @@ publishing {
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
}
}

repositories {
if (usesMavenPublishing.toBoolean()) {
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
maven {
url = mavenPublishUrl
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
Expand Down Expand Up @@ -1311,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
Expand Down
28 changes: 14 additions & 14 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ dependencies {

compile("com.google.code.findbugs:jsr305:3.0.2")

compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-277-GTNH:dev") {
compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-300-GTNH:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:EnderStorage:1.4.12:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.44.71:dev") {
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.00:dev") {
transitive = false
}
compile("com.github.GTNewHorizons:ForestryMC:4.6.14:dev") {
compile("com.github.GTNewHorizons:ForestryMC:4.7.0:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:Railcraft:9.15.0:dev") {
compileOnly("com.github.GTNewHorizons:Railcraft:9.15.3:dev") {
transitive = false
}
compile("com.github.GTNewHorizons:NotEnoughItems:2.4.5-GTNH:dev") {
compile("com.github.GTNewHorizons:NotEnoughItems:2.4.13-GTNH:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.3.4:dev") {
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.4.1:dev") {
transitive = false
}
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev") {
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.10:dev") {
transitive = false
}
compile("com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev") {
compile("com.github.GTNewHorizons:CodeChickenCore:1.1.13:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:waila:1.6.2:dev") {
compileOnly("com.github.GTNewHorizons:waila:1.6.5:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:Galacticraft:3.0.74-GTNH:dev") {
Expand All @@ -43,23 +43,23 @@ dependencies {
compileOnly("com.github.GTNewHorizons:TinkersMechworks:0.3.0:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:ProjectRed:4.7.12-GTNH:dev") {
compileOnly("com.github.GTNewHorizons:ProjectRed:4.8.0-GTNH:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:BloodMagic:1.4.3:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.4.13-GTNH:dev") {
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.5.4-GTNH:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:ExtraCells2:2.5.34:dev") {
transitive = false
}
compileOnly('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.62-gtnh:dev') {
compileOnly('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.73-gtnh:dev') {
transitive = false
}
compile("com.github.GTNewHorizons:EnderCore:0.2.18:dev")
compile("com.github.GTNewHorizons:EnderIO:2.5.3:dev") {
compile("com.github.GTNewHorizons:EnderIO:2.5.8:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.6.0-GTNH:dev") {
Expand All @@ -71,7 +71,7 @@ dependencies {
compileOnly("com.github.GTNewHorizons:WirelessRedstone-CBE:1.4.8:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.36:dev") {
compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.38:dev") {
transitive = false
}
compileOnly("appeng:RotaryCraft:V5c:api") {
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
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# - gt_bender : Plate Bending Machine Recipe
# - gt_canner : Canning Machine Recipe
# - gt_chemical : Chemical Recipe
# - gt_cnc : CNC-Machine Recipe
# - gt_cutter : Cutter Recipe
# - gt_fluidCanner : Fluid Canner Recipe
# - gt_formingPress : Forming Press Recipe
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/li/cil/oc/common/block/SimpleBlock.scala
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,13 @@ class SimpleBlock(material: Material = Material.iron) extends Block(material) {

final override def canConnectRedstone(world: IBlockAccess, x: Int, y: Int, z: Int, side: Int) =
canConnectRedstone(world, x, y, z, side match {
case -2 => ForgeDirection.DOWN
case -1 => ForgeDirection.UP
case 0 => ForgeDirection.NORTH
case 1 => ForgeDirection.EAST
case 2 => ForgeDirection.SOUTH
case 3 => ForgeDirection.WEST
case _ => ForgeDirection.UNKNOWN
})

def canConnectRedstone(world: IBlockAccess, x: Int, y: Int, z: Int, side: ForgeDirection) = false
Expand Down
Loading

0 comments on commit 646db1f

Please sign in to comment.