From d52403bd621c2572d70a95fa9c11586a3766792e Mon Sep 17 00:00:00 2001 From: bombcar Date: Thu, 30 Nov 2023 16:52:18 -0600 Subject: [PATCH 1/2] this is not fatal just loading info --- .../shedar/mods/ic2/nuclearcontrol/crossmod/RF/CrossTE.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/RF/CrossTE.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/RF/CrossTE.java index 620c6b5..95bf76c 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/RF/CrossTE.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/RF/CrossTE.java @@ -14,7 +14,7 @@ public class CrossTE { public static void intergrateTE() { if (Loader.isModLoaded(ModLib.TE) || Loader.isModLoaded(ModLib.ENDER_IO)) { registerThermalExpansion(); - NCLog.fatal("Another Energy System is Loaded. Adding Intergration!"); + NCLog.info("Another Energy System is Loaded. Adding Intergration!"); } } From 4cc6dc0af891ad7a23840a3ede963e2d5f62f04c Mon Sep 17 00:00:00 2001 From: bombcar Date: Thu, 30 Nov 2023 16:52:29 -0600 Subject: [PATCH 2/2] update buildscript and apply spotless --- build.gradle | 285 ++++++++++++------ dependencies.gradle | 12 +- repositories.gradle | 18 -- .../mods/ic2/nuclearcontrol/CommonProxy.java | 12 +- .../ic2/nuclearcontrol/IC2NuclearControl.java | 19 +- .../blocks/BlockNuclearControlMain.java | 19 +- .../opencomputers/DriverInfoPanel.java | 1 - .../opencomputers/DriverThermalMonitor.java | 1 - .../crossmod/waila/CrossWaila.java | 6 +- .../items/ItemCardEnergySensorLocation.java | 7 +- .../network/ChannelHandler.java | 17 +- .../message/PacketClientRemoteMonitor.java | 6 +- .../tileentities/TileEntityRangeTrigger.java | 5 +- .../utils/NuclearNetworkHelper.java | 14 +- 14 files changed, 300 insertions(+), 122 deletions(-) diff --git a/build.gradle b/build.gradle index a8b7532..4e31dc8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1684218858 +//version: 1700844281 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -69,7 +69,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.14' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24' } print("You might want to check out './gradlew :faq' if your build fails.\n") @@ -89,6 +89,23 @@ def out = services.get(StyledTextOutputFactory).create('an-output') def projectJavaVersion = JavaLanguageVersion.of(8) boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false +boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false + +final String CHECKSTYLE_CONFIG = """ + + + + + + + + + + + +""" checkPropertyExists("modName") checkPropertyExists("modId") @@ -115,6 +132,8 @@ propertyDefaultIfUnset("usesMixinDebug", project.usesMixins) propertyDefaultIfUnset("forceEnableMixins", false) propertyDefaultIfUnset("channel", "stable") propertyDefaultIfUnset("mappingsVersion", "12") +propertyDefaultIfUnset("usesMavenPublishing", true) +propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases") propertyDefaultIfUnset("modrinthProjectId", "") propertyDefaultIfUnset("modrinthRelations", "") propertyDefaultIfUnset("curseForgeProjectId", "") @@ -138,6 +157,17 @@ if (!disableSpotless) { apply from: Blowdryer.file('spotless.gradle') } +if (!disableCheckstyle) { + apply plugin: 'checkstyle' + tasks.named("checkstylePatchedMc") { enabled = false } + tasks.named("checkstyleMcLauncher") { enabled = false } + tasks.named("checkstyleIdeVirtualMain") { enabled = false } + tasks.named("checkstyleInjectedTags") { enabled = false } + checkstyle { + config = resources.text.fromString(CHECKSTYLE_CONFIG) + } +} + String javaSourceDir = "src/main/java/" String scalaSourceDir = "src/main/scala/" String kotlinSourceDir = "src/main/kotlin/" @@ -272,7 +302,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) @@ -357,7 +387,27 @@ catch (Exception ignored) { String identifiedVersion String versionOverride = System.getenv("VERSION") ?: null try { - identifiedVersion = versionOverride == null ? gitVersion() : versionOverride + // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty + if (versionOverride == null) { + def gitDetails = versionDetails() + def isDirty = gitVersion().endsWith(".dirty") // No public API for this, isCleanTag has a different meaning + String branchName = gitDetails.branchName ?: (System.getenv('GIT_BRANCH') ?: 'git') + if (branchName.startsWith('origin/')) { + branchName = branchName.minus('origin/') + } + branchName = branchName.replaceAll("[^a-zA-Z0-9-]+", "-") // sanitize branch names for semver + identifiedVersion = gitDetails.lastTag ?: '${gitDetails.gitHash}' + if (gitDetails.commitDistance > 0) { + identifiedVersion += "-${branchName}.${gitDetails.commitDistance}+${gitDetails.gitHash}" + if (isDirty) { + identifiedVersion += "-dirty" + } + } else if (isDirty) { + identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty" + } + } else { + identifiedVersion = versionOverride + } } catch (Exception ignored) { out.style(Style.Failure).text( @@ -379,9 +429,13 @@ if (identifiedVersion == versionOverride) { group = "com.github.GTNewHorizons" if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) { - archivesBaseName = customArchiveBaseName + base { + archivesName = customArchiveBaseName + } } else { - archivesBaseName = modId + base { + archivesName = modId + } } @@ -465,10 +519,19 @@ sourceSets { } } -if (file('addon.gradle').exists()) { +if (file('addon.gradle.kts').exists()) { + apply from: 'addon.gradle.kts' +} else if (file('addon.gradle').exists()) { apply from: 'addon.gradle' } +// File for local tweaks not commited to Git +if (file('addon.local.gradle.kts').exists()) { + apply from: 'addon.local.gradle.kts' +} else if (file('addon.local.gradle').exists()) { + apply from: 'addon.local.gradle' +} + // Allow unsafe repos but warn repositories.configureEach { repo -> if (repo instanceof org.gradle.api.artifacts.repositories.UrlArtifactRepository) { @@ -479,7 +542,14 @@ repositories.configureEach { repo -> } } -apply from: 'repositories.gradle' +if (file('repositories.gradle.kts').exists()) { + apply from: 'repositories.gradle.kts' +} else if (file('repositories.gradle').exists()) { + apply from: 'repositories.gradle' +} else { + logger.error("Neither repositories.gradle.kts nor repositories.gradle was found, make sure you extracted the full ExampleMod template.") + throw new RuntimeException("Missing repositories.gradle[.kts]") +} configurations { runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable) @@ -520,9 +590,6 @@ repositories { maven { name 'Overmind forge repo mirror' url 'https://gregtech.overminddl1.com/' - mavenContent { - excludeGroup("net.minecraftforge") // missing the `universal` artefact - } } maven { name = "GTNH Maven" @@ -537,24 +604,34 @@ repositories { } } if (includeWellKnownRepositories.toBoolean()) { - maven { - name "CurseMaven" - url "https://cursemaven.com" - content { + exclusiveContent { + forRepository { + maven { + name "CurseMaven" + url "https://cursemaven.com" + } + } + filter { includeGroup "curse.maven" } } - maven { - name = "ic2" - url = "https://maven.ic2.player.to/" - metadataSources { - mavenPom() - artifact() + exclusiveContent { + forRepository { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + } + filter { + includeGroup "maven.modrinth" } } maven { - name = "ic2-mirror" - url = "https://maven2.ic2.player.to/" + name = "ic2" + url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/") + content { + includeGroup "net.industrial-craft" + } metadataSources { mavenPom() artifact() @@ -569,11 +646,13 @@ 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 +def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json' + dependencies { if (usesMixins.toBoolean()) { annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3') @@ -585,7 +664,7 @@ dependencies { } } if (usesMixins.toBoolean()) { - implementation(mixinProviderSpec) + implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap)) } else if (forceEnableMixins.toBoolean()) { runtimeOnlyNonPublishable(mixinProviderSpec) } @@ -611,12 +690,32 @@ configurations.all { } } -apply from: 'dependencies.gradle' +dependencies { + constraints { + def minGtnhLibVersion = "0.0.13" + implementation("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + runtimeOnly("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + devOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + } +} -def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json' -def mixinTmpDir = buildDir.path + File.separator + 'tmp' + File.separator + 'mixins' -def refMap = "${mixinTmpDir}" + File.separator + mixingConfigRefMap -def mixinSrg = "${mixinTmpDir}" + File.separator + "mixins.srg" +if (file('dependencies.gradle.kts').exists()) { + apply from: 'dependencies.gradle.kts' +} else if (file('dependencies.gradle').exists()) { + apply from: 'dependencies.gradle' +} else { + logger.error("Neither dependencies.gradle.kts nor dependencies.gradle was found, make sure you extracted the full ExampleMod template.") + throw new RuntimeException("Missing dependencies.gradle[.kts]") +} tasks.register('generateAssets') { group = "GTNH Buildscript" @@ -648,46 +747,17 @@ tasks.register('generateAssets') { } if (usesMixins.toBoolean()) { - tasks.named("reobfJar", ReobfuscatedJar).configure { - extraSrgFiles.from(mixinSrg) - } - tasks.named("processResources").configure { dependsOn("generateAssets") } tasks.named("compileJava", JavaCompile).configure { - doFirst { - new File(mixinTmpDir).mkdirs() - } options.compilerArgs += [ - "-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}", - "-AoutSrgFile=${mixinSrg}", - "-AoutRefMapFile=${refMap}", // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code "-XDenableSunApiLintControl", "-XDignore.symbol.file" ] } - - pluginManager.withPlugin('org.jetbrains.kotlin.kapt') { - kapt { - correctErrorTypes = true - javacOptions { - option("-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}") - option("-AoutSrgFile=$mixinSrg") - option("-AoutRefMapFile=$refMap") - } - } - tasks.configureEach { task -> - if (task.name == "kaptKotlin") { - task.doFirst { - new File(mixinTmpDir).mkdirs() - } - } - } - } - } tasks.named("processResources", ProcessResources).configure { @@ -705,7 +775,6 @@ tasks.named("processResources", ProcessResources).configure { } if (usesMixins.toBoolean()) { - from refMap dependsOn("compileJava", "compileScala") } } @@ -724,23 +793,14 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies" } dependencies { - def lwjgl3ifyVersion = '1.3.5' - def asmVersion = '9.4' + def lwjgl3ifyVersion = '1.5.1' if (modId != 'lwjgl3ify') { java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}") } if (modId != 'hodgepodge') { - java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.13') + java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17') } - java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false} - java17PatchDependencies("org.ow2.asm:asm:${asmVersion}") - java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}") - java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}") - java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}") - java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}") - java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1') - java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0") java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false} } @@ -979,6 +1039,9 @@ idea { } } runConfigurations { + "0. Build and Test"(Gradle) { + taskNames = ["build"] + } "1. Run Client"(Gradle) { taskNames = ["runClient"] } @@ -1098,6 +1161,14 @@ tasks.named("processIdeaSettings").configure { dependsOn("injectTags") } +tasks.named("ideVirtualMainClasses").configure { + // Make IntelliJ "Build project" build the mod jars + dependsOn("jar", "reobfJar") + if (!disableSpotless) { + dependsOn("spotlessCheck") + } +} + // workaround variable hiding in pom processing def projectConfigs = project.configurations @@ -1116,14 +1187,15 @@ publishing { version = System.getenv("RELEASE_VERSION") ?: identifiedVersion } } - repositories { - maven { - url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases" - allowInsecureProtocol = true - credentials { - username = System.getenv("MAVEN_USER") ?: "NONE" - password = System.getenv("MAVEN_PASSWORD") ?: "NONE" + if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) { + maven { + url = mavenPublishUrl + allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven + credentials { + username = System.getenv("MAVEN_USER") ?: "NONE" + password = System.getenv("MAVEN_PASSWORD") ?: "NONE" + } } } } @@ -1238,7 +1310,7 @@ def addCurseForgeRelation(String type, String name) { // Updating -def buildscriptGradleVersion = "8.1.1" +def buildscriptGradleVersion = "8.2.1" tasks.named('wrapper', Wrapper).configure { gradleVersion = buildscriptGradleVersion @@ -1276,12 +1348,14 @@ tasks.register('faq') { description = 'Prints frequently asked questions about building a project' doLast { - print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " + - "versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" + - "The links can be found in repositories.gradle and build.gradle:repositories, " + - "not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" + + print("If your build fails to fetch dependencies, run './gradlew updateDependencies'. " + + "Or you can manually check if the versions are still on the distributing sites - " + + "the links can be found in repositories.gradle and build.gradle:repositories, " + + "but not build.gradle:buildscript.repositories - those ones are for gradle plugin metadata.\n\n" + "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " + - "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties.") + "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties. " + + "However, keep in mind that Jabel enables only syntax features, but not APIs that were introduced in " + + "Java 9 or later.") } } @@ -1342,8 +1416,14 @@ boolean isNewBuildScriptVersionAvailable() { String currentBuildScript = getFile("build.gradle").getText() String currentBuildScriptHash = getVersionHash(currentBuildScript) - String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() - String availableBuildScriptHash = getVersionHash(availableBuildScript) + String availableBuildScriptHash + try { + String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() + availableBuildScriptHash = getVersionHash(availableBuildScript) + } catch (IOException e) { + logger.warn("Could not check for buildscript update availability: {}", e.message) + return false + } boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash return !isUpToDate @@ -1508,3 +1588,36 @@ def getSecondaryArtifacts() { if (apiPackage) secondaryArtifacts += [apiJar] return secondaryArtifacts } + +def getURL(String main, String fallback) { + return pingURL(main, 10000) ? main : fallback +} + +// credit: https://stackoverflow.com/a/3584332 +def pingURL(String url, int timeout) { + url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates. + try { + HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection() + connection.setConnectTimeout(timeout) + connection.setReadTimeout(timeout) + connection.setRequestMethod("HEAD") + int responseCode = connection.getResponseCode() + return 200 <= responseCode && responseCode <= 399 + } catch (IOException ignored) { + return false + } +} + +// For easier scripting of things that require variables defined earlier in the buildscript +if (file('addon.late.gradle.kts').exists()) { + apply from: 'addon.late.gradle.kts' +} else if (file('addon.late.gradle').exists()) { + apply from: 'addon.late.gradle' +} + +// File for local tweaks not commited to Git +if (file('addon.late.local.gradle.kts').exists()) { + apply from: 'addon.late.local.gradle.kts' +} else if (file('addon.late.local.gradle').exists()) { + apply from: 'addon.late.local.gradle' +} diff --git a/dependencies.gradle b/dependencies.gradle index 0b4732a..4fe8fd5 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -3,23 +3,23 @@ dependencies { api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-213-GTNH:dev") { + compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-290-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:waila:1.6.0:dev") { + compileOnly("com.github.GTNewHorizons:waila:1.6.5:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.53-GTNH:dev") { + compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.4.12-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:OpenComputers:1.9.5-GTNH:dev") { + compileOnly("com.github.GTNewHorizons:OpenComputers:1.9.19-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.43.39:dev") { + compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.44.91:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.33:dev") { + compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.37:dev") { transitive = false } compileOnly("curse.maven:bigreactors-241994:2282591") { diff --git a/repositories.gradle b/repositories.gradle index 7c7c514..c227b16 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,22 +1,4 @@ // Add any additional repositories for your dependencies here repositories { - maven { - name = "GTNH Maven" - url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - } - maven { - name = "ic2" - url = "https://maven.ic2.player.to/" - metadataSources { - mavenPom() - artifact() - } - } - maven { - url "https://cursemaven.com" - } - maven { - url = "https://jitpack.io" - } } diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/CommonProxy.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/CommonProxy.java index 76eb837..9e745d9 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/CommonProxy.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/CommonProxy.java @@ -14,7 +14,17 @@ import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.Subblock; import shedar.mods.ic2.nuclearcontrol.containers.ContainerRemoteMonitor; import shedar.mods.ic2.nuclearcontrol.gui.GuiRemoteMonitor; -import shedar.mods.ic2.nuclearcontrol.tileentities.*; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityAdvancedInfoPanel; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityAdvancedInfoPanelExtender; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityAverageCounter; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityEnergyCounter; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityHowlerAlarm; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityIndustrialAlarm; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityInfoPanel; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityInfoPanelExtender; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityRangeTrigger; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityRemoteThermo; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityThermo; public class CommonProxy implements IGuiHandler { diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/IC2NuclearControl.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/IC2NuclearControl.java index 9728d12..bcef5c0 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/IC2NuclearControl.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/IC2NuclearControl.java @@ -31,7 +31,24 @@ import shedar.mods.ic2.nuclearcontrol.crossmod.ic2.IC2Type; import shedar.mods.ic2.nuclearcontrol.crossmod.opencomputers.CrossOpenComputers; import shedar.mods.ic2.nuclearcontrol.crossmod.railcraft.CrossRailcraft; -import shedar.mods.ic2.nuclearcontrol.items.*; +import shedar.mods.ic2.nuclearcontrol.items.ItemCard55Reactor; +import shedar.mods.ic2.nuclearcontrol.items.ItemCardEnergyArrayLocation; +import shedar.mods.ic2.nuclearcontrol.items.ItemCardEnergySensorLocation; +import shedar.mods.ic2.nuclearcontrol.items.ItemCardLiquidArrayLocation; +import shedar.mods.ic2.nuclearcontrol.items.ItemCardMultipleSensorLocation; +import shedar.mods.ic2.nuclearcontrol.items.ItemCardReactorSensorLocation; +import shedar.mods.ic2.nuclearcontrol.items.ItemCardText; +import shedar.mods.ic2.nuclearcontrol.items.ItemKitEnergySensor; +import shedar.mods.ic2.nuclearcontrol.items.ItemKitMultipleSensor; +import shedar.mods.ic2.nuclearcontrol.items.ItemKitReactorSensor; +import shedar.mods.ic2.nuclearcontrol.items.ItemNuclearControlLight; +import shedar.mods.ic2.nuclearcontrol.items.ItemNuclearControlMain; +import shedar.mods.ic2.nuclearcontrol.items.ItemPanelMemoryCard; +import shedar.mods.ic2.nuclearcontrol.items.ItemRemoteMonitor; +import shedar.mods.ic2.nuclearcontrol.items.ItemTimeCard; +import shedar.mods.ic2.nuclearcontrol.items.ItemToolDigitalThermometer; +import shedar.mods.ic2.nuclearcontrol.items.ItemToolThermometer; +import shedar.mods.ic2.nuclearcontrol.items.ItemUpgrade; import shedar.mods.ic2.nuclearcontrol.network.ChannelHandler; import shedar.mods.ic2.nuclearcontrol.panel.ScreenManager; import shedar.mods.ic2.nuclearcontrol.recipes.RecipesNew; diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/blocks/BlockNuclearControlMain.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/blocks/BlockNuclearControlMain.java index 19c29bd..182f69d 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/blocks/BlockNuclearControlMain.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/blocks/BlockNuclearControlMain.java @@ -37,7 +37,18 @@ import ic2.api.tile.IWrenchable; import ic2.core.item.tool.ItemToolPainter; import shedar.mods.ic2.nuclearcontrol.IC2NuclearControl; -import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.*; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.AdvancedInfoPanel; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.AdvancedInfoPanelExtender; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.AverageCounter; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.EnergyCounter; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.HowlerAlarm; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.IndustrialAlarm; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.InfoPanel; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.InfoPanelExtender; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.RangeTrigger; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.RemoteThermo; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.Subblock; +import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.ThermalMonitor; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityHowlerAlarm; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityIndustrialAlarm; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityInfoPanel; @@ -45,7 +56,11 @@ import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityRangeTrigger; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityRemoteThermo; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityThermo; -import shedar.mods.ic2.nuclearcontrol.utils.*; +import shedar.mods.ic2.nuclearcontrol.utils.BlockDamages; +import shedar.mods.ic2.nuclearcontrol.utils.DyeUtil; +import shedar.mods.ic2.nuclearcontrol.utils.NuclearHelper; +import shedar.mods.ic2.nuclearcontrol.utils.RedstoneHelper; +import shedar.mods.ic2.nuclearcontrol.utils.WrenchHelper; public class BlockNuclearControlMain extends BlockContainer { diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverInfoPanel.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverInfoPanel.java index 542545e..866f660 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverInfoPanel.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverInfoPanel.java @@ -9,7 +9,6 @@ import li.cil.oc.api.network.ManagedEnvironment; import li.cil.oc.api.prefab.DriverTileEntity; import li.cil.oc.integration.ManagedTileEntityEnvironment; -import shedar.mods.ic2.nuclearcontrol.crossmod.opencomputers.DriverAdvancedInfoPanel.Environment; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityInfoPanel; /** diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverThermalMonitor.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverThermalMonitor.java index 6e31fbc..4b5293f 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverThermalMonitor.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/opencomputers/DriverThermalMonitor.java @@ -9,7 +9,6 @@ import li.cil.oc.api.network.ManagedEnvironment; import li.cil.oc.api.prefab.DriverTileEntity; import li.cil.oc.integration.ManagedTileEntityEnvironment; -import shedar.mods.ic2.nuclearcontrol.crossmod.opencomputers.DriverInfoPanel.Environment; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityThermo; public class DriverThermalMonitor extends DriverTileEntity { diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/waila/CrossWaila.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/waila/CrossWaila.java index 6c521c6..6ee60d9 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/waila/CrossWaila.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/crossmod/waila/CrossWaila.java @@ -1,7 +1,11 @@ package shedar.mods.ic2.nuclearcontrol.crossmod.waila; import mcp.mobius.waila.api.IWailaRegistrar; -import shedar.mods.ic2.nuclearcontrol.tileentities.*; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityAverageCounter; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityEnergyCounter; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityHowlerAlarm; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityInfoPanel; +import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityThermo; public class CrossWaila { diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/items/ItemCardEnergySensorLocation.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/items/ItemCardEnergySensorLocation.java index 00fc3a7..e14dcf6 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/items/ItemCardEnergySensorLocation.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/items/ItemCardEnergySensorLocation.java @@ -13,7 +13,12 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import shedar.mods.ic2.nuclearcontrol.api.*; +import shedar.mods.ic2.nuclearcontrol.api.CardState; +import shedar.mods.ic2.nuclearcontrol.api.ICardWrapper; +import shedar.mods.ic2.nuclearcontrol.api.IRangeTriggerable; +import shedar.mods.ic2.nuclearcontrol.api.IRemoteSensor; +import shedar.mods.ic2.nuclearcontrol.api.PanelSetting; +import shedar.mods.ic2.nuclearcontrol.api.PanelString; import shedar.mods.ic2.nuclearcontrol.crossmod.EnergyStorageData; import shedar.mods.ic2.nuclearcontrol.panel.CardWrapperImpl; import shedar.mods.ic2.nuclearcontrol.utils.EnergyStorageHelper; diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/network/ChannelHandler.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/network/ChannelHandler.java index 512e1eb..db3b7d7 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/network/ChannelHandler.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/network/ChannelHandler.java @@ -3,7 +3,22 @@ import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; -import shedar.mods.ic2.nuclearcontrol.network.message.*; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketAcounter; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketAlarm; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketChat; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientColor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientDisplaySettings; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientRangeTrigger; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientRemoteMonitor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientRequest; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientSensor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientSound; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketDispSettingsAll; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketDispSettingsUpdate; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketEncounter; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketSensor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketSensorTitle; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketServerUpdate; public class ChannelHandler { diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/network/message/PacketClientRemoteMonitor.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/network/message/PacketClientRemoteMonitor.java index 37b8a45..a4c688d 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/network/message/PacketClientRemoteMonitor.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/network/message/PacketClientRemoteMonitor.java @@ -1,6 +1,10 @@ package shedar.mods.ic2.nuclearcontrol.network.message; -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/tileentities/TileEntityRangeTrigger.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/tileentities/TileEntityRangeTrigger.java index 77315f7..4fb1679 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/tileentities/TileEntityRangeTrigger.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/tileentities/TileEntityRangeTrigger.java @@ -26,7 +26,10 @@ import shedar.mods.ic2.nuclearcontrol.IRotation; import shedar.mods.ic2.nuclearcontrol.ISlotItemFilter; import shedar.mods.ic2.nuclearcontrol.ITextureHelper; -import shedar.mods.ic2.nuclearcontrol.api.*; +import shedar.mods.ic2.nuclearcontrol.api.CardState; +import shedar.mods.ic2.nuclearcontrol.api.IPanelDataSource; +import shedar.mods.ic2.nuclearcontrol.api.IRangeTriggerable; +import shedar.mods.ic2.nuclearcontrol.api.IRemoteSensor; import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.RangeTrigger; import shedar.mods.ic2.nuclearcontrol.items.ItemUpgrade; import shedar.mods.ic2.nuclearcontrol.panel.CardWrapperImpl; diff --git a/src/main/java/shedar/mods/ic2/nuclearcontrol/utils/NuclearNetworkHelper.java b/src/main/java/shedar/mods/ic2/nuclearcontrol/utils/NuclearNetworkHelper.java index 90e27ed..8772dff 100644 --- a/src/main/java/shedar/mods/ic2/nuclearcontrol/utils/NuclearNetworkHelper.java +++ b/src/main/java/shedar/mods/ic2/nuclearcontrol/utils/NuclearNetworkHelper.java @@ -14,7 +14,19 @@ import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.network.simpleimpl.IMessage; import shedar.mods.ic2.nuclearcontrol.network.ChannelHandler; -import shedar.mods.ic2.nuclearcontrol.network.message.*; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketAcounter; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketChat; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientColor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientDisplaySettings; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientRangeTrigger; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientRequest; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientSensor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketClientSound; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketDispSettingsAll; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketDispSettingsUpdate; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketEncounter; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketSensor; +import shedar.mods.ic2.nuclearcontrol.network.message.PacketSensorTitle; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityAverageCounter; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityEnergyCounter; import shedar.mods.ic2.nuclearcontrol.tileentities.TileEntityInfoPanel;