From 59a42b77f83aa6df5088348a0fcd93f54404bae9 Mon Sep 17 00:00:00 2001 From: miozune Date: Tue, 12 Jul 2022 23:29:48 +0900 Subject: updateBuildScript & spotlessApply --- build.gradle | 233 ++- dependencies.gradle | 52 +- repositories.gradle | 44 +- .../java/com/elisis/gtnhlanth/GTNHLanthanides.java | 79 +- src/main/java/com/elisis/gtnhlanth/Tags.java | 1 - .../com/elisis/gtnhlanth/client/ClientProxy.java | 4 +- .../com/elisis/gtnhlanth/common/CommonProxy.java | 13 +- .../common/register/BotWerkstoffMaterialPool.java | 290 ++- .../gtnhlanth/common/register/LanthItemList.java | 20 +- .../common/register/WerkstoffMaterialPool.java | 1282 ++++++------ .../gtnhlanth/common/tileentity/Digester.java | 323 ++- .../common/tileentity/DissolutionTank.java | 433 ++-- .../com/elisis/gtnhlanth/loader/BotRecipes.java | 933 ++++++--- .../gtnhlanth/loader/MetaTileEntity_Loader.java | 4 +- .../com/elisis/gtnhlanth/loader/RecipeAdder.java | 222 +- .../com/elisis/gtnhlanth/loader/RecipeLoader.java | 2161 ++++++++++---------- .../elisis/gtnhlanth/loader/ZPMRubberChanges.java | 550 +++-- .../gtnhlanth/util/DescTextLocalization.java | 11 +- .../elisis/gtnhlanth/xmod/nei/DigesterHandler.java | 25 +- .../elisis/gtnhlanth/xmod/nei/DisstankHandler.java | 25 +- .../java/com/elisis/gtnhlanth/xmod/nei/IMC.java | 3 +- .../com/elisis/gtnhlanth/xmod/nei/NEI_Config.java | 38 +- 22 files changed, 3550 insertions(+), 3196 deletions(-) diff --git a/build.gradle b/build.gradle index 656f439f7a..5073008f95 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1644894948 +//version: 1656760732 /* DO NOT CHANGE THIS FILE! @@ -12,7 +12,12 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.gradle.internal.logging.text.StyledTextOutput.Style import org.gradle.internal.logging.text.StyledTextOutputFactory +import java.nio.file.Files +import java.nio.file.Paths import java.util.concurrent.TimeUnit +import java.util.zip.ZipEntry +import java.util.zip.ZipInputStream +import java.util.zip.ZipOutputStream buildscript { repositories { @@ -44,13 +49,15 @@ plugins { id 'eclipse' id 'scala' id 'maven-publish' - id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false - id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false + id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false + id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false + id 'com.google.devtools.ksp' version '1.5.30-1.0.0' apply false id 'org.ajoberstar.grgit' version '4.1.1' id 'com.github.johnrengelman.shadow' version '4.0.4' - id 'com.palantir.git-version' version '0.13.0' apply false + id 'com.palantir.git-version' version '0.13.0' apply false id 'de.undercouch.download' version '5.0.1' - id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false + id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false + id "com.diffplug.spotless" version "6.7.2" } if (project.file('.git/HEAD').isFile()) { @@ -77,6 +84,37 @@ idea { } } +// Spotless autoformatter +// See https://github.com/diffplug/spotless/tree/main/plugin-gradle +// Can be locally toggled via spotless:off/spotless:on comments +spotless { + encoding 'UTF-8' + + format 'misc', { + target '.gitignore' + + trimTrailingWhitespace() + indentWithSpaces(4) + endWithNewline() + } + java { + toggleOffOn() + importOrder() + removeUnusedImports() + palantirJavaFormat('1.1.0') // last version supporting jvm 8 + } + kotlin { + toggleOffOn() + ktfmt('0.39') + } + groovyGradle { + toggleOffOn() + importOrder() + target '*.gradle' + greclipse('4.19.0') // last version supporting jvm 8 + } +} + if(JavaVersion.current() != JavaVersion.VERSION_1_8) { throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current()) } @@ -103,6 +141,11 @@ checkPropertyExists("usesShadowedDependencies") checkPropertyExists("developmentEnvironmentUserName") boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false +boolean usesMixinDebug = project.findProperty('usesMixinDebug') ?: project.usesMixins.toBoolean() +boolean forceEnableMixins = project.findProperty('forceEnableMixins') ? project.forceEnableMixins.toBoolean() : false +String channel = project.findProperty('channel') ? project.channel : 'stable' +String mappingsVersion = project.findProperty('mappingsVersion') ? project.mappingsVersion : '12' +String remoteMappings = project.findProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/' String javaSourceDir = "src/main/java/" String scalaSourceDir = "src/main/scala/" @@ -213,11 +256,11 @@ else { def arguments = [] def jvmArguments = [] -if (usesMixins.toBoolean()) { +if (usesMixins.toBoolean() || forceEnableMixins) { arguments += [ "--tweakClass org.spongepowered.asm.launch.MixinTweaker" ] - if (!project.hasProperty(usesMixinDebug) || usesMixinDebug.toBoolean()) { + if (usesMixinDebug.toBoolean()) { jvmArguments += [ "-Dmixin.debug.countInjections=true", "-Dmixin.debug.verbose=true", @@ -278,7 +321,7 @@ repositories { name 'Overmind forge repo mirror' url 'https://gregtech.overminddl1.com/' } - if(usesMixins.toBoolean()) { + if(usesMixins.toBoolean() || forceEnableMixins) { maven { name 'sponge' url 'https://repo.spongepowered.org/repository/maven-public' @@ -295,6 +338,8 @@ dependencies { annotationProcessor('com.google.guava:guava:24.1.1-jre') annotationProcessor('com.google.code.gson:gson:2.8.6') annotationProcessor('org.spongepowered:mixin:0.8-SNAPSHOT') + } + if(usesMixins.toBoolean() || forceEnableMixins) { // using 0.8 to workaround a issue in 0.7 which fails mixin application compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') { // Mixin includes a lot of dependencies that are too up-to-date @@ -567,7 +612,7 @@ publishing { artifact source: shadowJar, classifier: "" } if(!noPublishedSources) { - artifact source: sourcesJar, classifier: "src" + artifact source: sourcesJar, classifier: "sources" } artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev" if (apiPackage) { @@ -667,7 +712,103 @@ configure(updateBuildScript) { description = 'Updates the build script to the latest version' } -// Deobfuscation +// Parameter Deobfuscation + +task deobfParams { + doLast { + + String mcpDir = "$project.gradle.gradleUserHomeDir/caches/minecraft/de/oceanlabs/mcp/mcp_$channel/$mappingsVersion" + String mcpZIP = "$mcpDir/mcp_$channel-$mappingsVersion-${minecraftVersion}.zip" + String paramsCSV = "$mcpDir/params.csv" + + download.run { + src "https://maven.minecraftforge.net/de/oceanlabs/mcp/mcp_$channel/$mappingsVersion-$minecraftVersion/mcp_$channel-$mappingsVersion-${minecraftVersion}.zip" + dest mcpZIP + overwrite false + } + + if(!file(paramsCSV).exists()) { + println("Extracting MCP archive ...") + unzip(mcpZIP, mcpDir) + } + + println("Parsing params.csv ...") + Map params = new HashMap<>() + Files.lines(Paths.get(paramsCSV)).forEach{line -> + String[] cells = line.split(",") + if(cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) { + params.put(cells[0], cells[1]) + } + } + + out.style(Style.Success).println("Modified ${replaceParams(file("$projectDir/src/main/java"), params)} files!") + out.style(Style.Failure).println("Don't forget to verify that the code still works as before!\n It could be broken due to duplicate variables existing now\n or parameters taking priority over other variables.") + } +} + +static int replaceParams(File file, Map params) { + int fileCount = 0 + + if(file.isDirectory()) { + for(File f : file.listFiles()) { + fileCount += replaceParams(f, params) + } + return fileCount + } + println("Visiting ${file.getName()} ...") + try { + String content = new String(Files.readAllBytes(file.toPath())) + int hash = content.hashCode() + params.forEach{key, value -> + content = content.replaceAll(key, value) + } + if(hash != content.hashCode()) { + Files.write(file.toPath(), content.getBytes("UTF-8")) + return 1 + } + } catch(Exception e) { + e.printStackTrace() + } + return 0 +} + +// Credit: bitsnaps (https://gist.github.com/bitsnaps/00947f2dce66f4bbdabc67d7e7b33681) +static unzip(String zipFileName, String outputDir) { + byte[] buffer = new byte[16384] + ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFileName)) + ZipEntry zipEntry = zis.getNextEntry() + while (zipEntry != null) { + File newFile = new File(outputDir + File.separator, zipEntry.name) + if (zipEntry.isDirectory()) { + if (!newFile.isDirectory() && !newFile.mkdirs()) { + throw new IOException("Failed to create directory $newFile") + } + } else { + // fix for Windows-created archives + File parent = newFile.parentFile + if (!parent.isDirectory() && !parent.mkdirs()) { + throw new IOException("Failed to create directory $parent") + } + // write file content + FileOutputStream fos = new FileOutputStream(newFile) + int len = 0 + while ((len = zis.read(buffer)) > 0) { + fos.write(buffer, 0, len) + } + fos.close() + } + zipEntry = zis.getNextEntry() + } + zis.closeEntry() + zis.close() +} + +configure(deobfParams) { + group = 'forgegradle' + description = 'Rename all obfuscated parameter names inherited from Minecraft classes' +} + +// Dependency Deobfuscation def deobf(String sourceURL) { try { @@ -680,7 +821,7 @@ def deobf(String sourceURL) { fileName = fileName.substring(lastSlash + 1) } //get rid of extension: - if(fileName.endsWith(".jar")) { + if(fileName.endsWith(".jar") || fileName.endsWith(".litemod")) { fileName = fileName.substring(0, fileName.lastIndexOf(".")) } @@ -692,26 +833,40 @@ def deobf(String sourceURL) { Collections.reverse(parts) hostName = String.join(".", parts) - return deobf(sourceURL, hostName + "/" + fileName) + return deobf(sourceURL, "$hostName/$fileName") } catch(Exception e) { - return deobf(sourceURL, "deobf/" + String.valueOf(sourceURL.hashCode())) + return deobf(sourceURL, "deobf/${sourceURL.hashCode()}") } } // The method above is to be preferred. Use this method if the filename is not at the end of the URL. -def deobf(String sourceURL, String fileName) { - String cacheDir = System.getProperty("user.home") + "/.gradle/caches/" - String bon2Dir = cacheDir + "forge_gradle/deobf" - String bon2File = bon2Dir + "/BON2-2.5.0.jar" - String obfFile = cacheDir + "modules-2/files-2.1/" + fileName + ".jar" - String deobfFile = cacheDir + "modules-2/files-2.1/" + fileName + "-deobf.jar" +def deobf(String sourceURL, String rawFileName) { + String bon2Version = "2.5.1" + String fileName = URLDecoder.decode(rawFileName, "UTF-8") + String cacheDir = "$project.gradle.gradleUserHomeDir/caches" + String bon2Dir = "$cacheDir/forge_gradle/deobf" + String bon2File = "$bon2Dir/BON2-${bon2Version}.jar" + String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar" + String deobfFile = "$cacheDir/modules-2/files-2.1/${fileName}-deobf.jar" if(file(deobfFile).exists()) { return files(deobfFile) } + String mappingsVer + if(remoteMappings) { + String id = "${forgeVersion.split("\\.")[3]}-$minecraftVersion" + String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip" + + zipMappings(mappingsZIP, remoteMappings, bon2Dir) + + mappingsVer = "snapshot_$id" + } else { + mappingsVer = "${channel}_$mappingsVersion" + } + download.run { - src 'https://github.com/GTNewHorizons/BON2/releases/download/2.5.0/BON2-2.5.0.CUSTOM-all.jar' + src "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/com/github/parker8283/BON2/$bon2Version-CUSTOM/BON2-$bon2Version-CUSTOM-all.jar" dest bon2File quiet true overwrite false @@ -725,14 +880,48 @@ def deobf(String sourceURL, String fileName) { } exec { - commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', '1.7.10', '--mappingsVer', 'stable_12', '--notch' + commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', minecraftVersion, '--mappingsVer', mappingsVer, '--notch' workingDir bon2Dir - standardOutput = new ByteArrayOutputStream() + standardOutput = new FileOutputStream("${deobfFile}.log") } return files(deobfFile) } +def zipMappings(String zipPath, String url, String bon2Dir) { + File zipFile = new File(zipPath) + if(zipFile.exists()) { + return + } + + String fieldsCache = "$bon2Dir/data/fields.csv" + String methodsCache = "$bon2Dir/data/methods.csv" + + download.run { + src "${url}fields.csv" + dest fieldsCache + quiet true + } + download.run { + src "${url}methods.csv" + dest methodsCache + quiet true + } + + zipFile.getParentFile().mkdirs() + ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile)) + + zos.putNextEntry(new ZipEntry("fields.csv")) + Files.copy(Paths.get(fieldsCache), zos) + zos.closeEntry() + + zos.putNextEntry(new ZipEntry("methods.csv")) + Files.copy(Paths.get(methodsCache), zos) + zos.closeEntry() + + zos.close() +} + // Helper methods def checkPropertyExists(String propertyName) { diff --git a/dependencies.gradle b/dependencies.gradle index 8b9aa29518..2e91d093ad 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,39 +1,39 @@ // Add your dependencies here dependencies { - compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.40.41:dev') + compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.40.41:dev') compile('com.github.GTNewHorizons:NewHorizonsCoreMod:1.9.21:dev') - compile('com.github.GTNewHorizons:StructureLib:1.0.16:dev') - compile('com.github.GTNewHorizons:GTplusplus:1.7.30:dev') - compile('com.github.GTNewHorizons:GoodGenerator:0.4.1:dev') - compile('com.github.GTNewHorizons:TecTech:5.0.6:dev') - compile('com.github.GTNewHorizons:ForestryMC:4.4.6:dev') - compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-79-GTNH:dev') - compile('com.github.GTNewHorizons:bartworks:0.5.42:dev') - compile('com.github.GTNewHorizons:BuildCraft:7.1.27:dev') - compile('com.github.GTNewHorizons:NotEnoughItems:2.2.8-GTNH:dev') - - compile('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev') - - compileOnly('com.github.GTNewHorizons:EnderCore:0.2.6:dev') {transitive=false} - compileOnly('com.github.GTNewHorizons:AppleCore:3.1.9:dev') {transitive = false} - compileOnly('com.github.GTNewHorizons:Railcraft:9.13.6:dev') {transitive = false} - compileOnly('com.github.GTNewHorizons:EnderIO:2.3.1.31:dev') {transitive=false} - compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.9:dev') {transitive=false} - - compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false} + compile('com.github.GTNewHorizons:StructureLib:1.0.16:dev') + compile('com.github.GTNewHorizons:GTplusplus:1.7.30:dev') + compile('com.github.GTNewHorizons:GoodGenerator:0.4.1:dev') + compile('com.github.GTNewHorizons:TecTech:5.0.6:dev') + compile('com.github.GTNewHorizons:ForestryMC:4.4.6:dev') + compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-79-GTNH:dev') + compile('com.github.GTNewHorizons:bartworks:0.5.42:dev') + compile('com.github.GTNewHorizons:BuildCraft:7.1.27:dev') + compile('com.github.GTNewHorizons:NotEnoughItems:2.2.8-GTNH:dev') + + compile('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev') + + compileOnly('com.github.GTNewHorizons:EnderCore:0.2.6:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:AppleCore:3.1.9:dev') {transitive = false} + compileOnly('com.github.GTNewHorizons:Railcraft:9.13.6:dev') {transitive = false} + compileOnly('com.github.GTNewHorizons:EnderIO:2.3.1.31:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.9:dev') {transitive=false} + + compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false} //compile('com.github.GTNewHorizons:GalacticGregGT5:1.0.7:dev') //compile('com.github.GTNewHorizons:TecTech:5.0.6:dev') //compile('com.github.GTNewHorizons:Galacticraft:3.0.40-GTNH:dev') - //compileOnly('com.github.GTNewHorizons:Avaritia:1.25) + //compileOnly('com.github.GTNewHorizons:Avaritia:1.25) //compile files('ThaumicTinkerer-1.7.10-2.5-4-dev.jar') - //compile files('Botdustries-1.7.10-1.0.1.jar') + //compile files('Botdustries-1.7.10-1.0.1.jar') - //runtime('com.github.GTNewHorizons:Baubles:1.0.1.14:dev') - //runtime('com.github.GTNewHorizons:Yamcl:0.5.82:dev') - runtime('curse.maven:cofh-core-69162:2388751') //for GT++ - runtime('curse.maven:advsolar-362768:2885953') //for GT++ + //runtime('com.github.GTNewHorizons:Baubles:1.0.1.14:dev') + //runtime('com.github.GTNewHorizons:Yamcl:0.5.82:dev') + runtime('curse.maven:cofh-core-69162:2388751') //for GT++ + runtime('curse.maven:advsolar-362768:2885953') //for GT++ } diff --git a/repositories.gradle b/repositories.gradle index 1dc4c3cb4c..911d3c94a5 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,26 +1,26 @@ // Add any additional repositories for your dependencies here repositories { - maven { - name 'GTNH Maven' - url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/' - allowInsecureProtocol - } - maven { - name 'ic2' - url 'https://maven.ic2.player.to/' - metadataSources { - mavenPom() - artifact() - } - } - maven { - url 'https://cursemaven.com' - content { - includeGroup 'curse.maven' - } - } - maven { - url 'https://jitpack.io' - } + maven { + name 'GTNH Maven' + url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/' + allowInsecureProtocol + } + maven { + name 'ic2' + url 'https://maven.ic2.player.to/' + metadataSources { + mavenPom() + artifact() + } + } + maven { + url 'https://cursemaven.com' + content { + includeGroup 'curse.maven' + } + } + maven { + url 'https://jitpack.io' + } } diff --git a/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java b/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java index e15c3bcf33..a19ffd0e45 100644 --- a/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java +++ b/src/main/java/com/elisis/gtnhlanth/GTNHLanthanides.java @@ -1,8 +1,5 @@ package com.elisis.gtnhlanth; -import java.util.Arrays; -import java.util.logging.Logger; - import com.elisis.gtnhlanth.common.CommonProxy; import com.elisis.gtnhlanth.common.register.BotWerkstoffMaterialPool; import com.elisis.gtnhlanth.common.register.LanthItemList; @@ -13,7 +10,6 @@ import com.elisis.gtnhlanth.loader.ZPMRubberChanges; import com.elisis.gtnhlanth.xmod.nei.IMC; import com.github.bartimaeusnek.bartworks.API.WerkstoffAdderRegistry; import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; - import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.SidedProxy; @@ -26,25 +22,31 @@ import cpw.mods.fml.common.event.FMLServerStartedEvent; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_Log; +import java.util.Arrays; +import java.util.logging.Logger; import net.minecraftforge.oredict.OreDictionary; -@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, - dependencies = "required-after:IC2; " + "required-after:gregtech; " - + "required-after:bartworks; " - + "required-after:GoodGenerator; " - + "before:miscutils; " - + "required-after:dreamcraft; " - ) +@Mod( + modid = Tags.MODID, + version = Tags.VERSION, + name = Tags.MODNAME, + dependencies = "required-after:IC2; " + "required-after:gregtech; " + + "required-after:bartworks; " + + "required-after:GoodGenerator; " + + "before:miscutils; " + + "required-after:dreamcraft; ") public class GTNHLanthanides { - + public static Logger LOG = Logger.getLogger("GTNH:Lanthanides"); - + @Mod.Instance public static GTNHLanthanides instance; - - @SidedProxy(clientSide = "com.elisis.gtnhlanth.client.ClientProxy",serverSide = "com.elisis.gtnhlanth.common.CommonProxy") + + @SidedProxy( + clientSide = "com.elisis.gtnhlanth.client.ClientProxy", + serverSide = "com.elisis.gtnhlanth.common.CommonProxy") public static CommonProxy proxy; - + @EventHandler public static void preInit(FMLPreInitializationEvent e) { WerkstoffAdderRegistry.addWerkstoffAdder(new WerkstoffMaterialPool()); @@ -53,14 +55,14 @@ public class GTNHLanthanides { GregTech_API.sAfterGTPostload.add(new ZPMRubberChanges()); proxy.preInit(e); } - + @EventHandler public static void init(FMLInitializationEvent e) { proxy.init(e); WerkstoffMaterialPool.runInit(); IMC.IMCSender(); } - + @EventHandler public static void postInit(FMLPostInitializationEvent e) { RecipeLoader.loadGeneral(); @@ -68,41 +70,36 @@ public class GTNHLanthanides { RecipeLoader.addRandomChemCrafting(); BotRecipes.addGTRecipe(); BotRecipes.addFuels(); - //RecipeLoader.loadZylonRecipes(); + // RecipeLoader.loadZylonRecipes(); proxy.postInit(e); - //GT_Log.out.print(FluidRegistry.getFluid("Sodium Tungstate").getName()); - + // GT_Log.out.print(FluidRegistry.getFluid("Sodium Tungstate").getName()); + GT_Log.out.print(Arrays.toString(Werkstoff.werkstoffNameHashMap.keySet().toArray())); GT_Log.out.print(Arrays.toString(Werkstoff.werkstoffHashMap.keySet().toArray())); - - GT_Log.out.print("HMMM " + Arrays.toString(OreDictionary.getOreIDs(WerkstoffMaterialPool.DephosphatedSamariumConcentrate.get(OrePrefixes.dust, 1)))); - - + + GT_Log.out.print("HMMM " + + Arrays.toString(OreDictionary.getOreIDs( + WerkstoffMaterialPool.DephosphatedSamariumConcentrate.get(OrePrefixes.dust, 1)))); } - + @EventHandler public static void onModLoadingComplete(FMLLoadCompleteEvent e) { - GT_Log.out.print("AAAAAAAAAAAAAA"); - // - GT_Log.out.print("We are done loading"); - BotRecipes.removeRecipes(); - - GT_Log.out.print("blah blah " + WerkstoffMaterialPool.PTMEGElastomer.hasGenerationFeature(OrePrefixes.ingot)); - - - + GT_Log.out.print("AAAAAAAAAAAAAA"); + // + GT_Log.out.print("We are done loading"); + BotRecipes.removeRecipes(); + + GT_Log.out.print("blah blah " + WerkstoffMaterialPool.PTMEGElastomer.hasGenerationFeature(OrePrefixes.ingot)); } - + // This is horrifying and I'm sorry @EventHandler public static void onServerAboutToStart(FMLServerAboutToStartEvent e) { - //RecipeLoader.removeCeriumSources(); + // RecipeLoader.removeCeriumSources(); } - + @EventHandler public static void onServerStart(FMLServerStartedEvent e) { - RecipeLoader.removeCeriumSources(); + RecipeLoader.removeCeriumSources(); } - - } diff --git a/src/main/java/com/elisis/gtnhlanth/Tags.java b/src/main/java/com/elisis/gtnhlanth/Tags.java index bd71de9398..901da11c18 100644 --- a/src/main/java/com/elisis/gtnhlanth/Tags.java +++ b/src/main/java/com/elisis/gtnhlanth/Tags.java @@ -6,5 +6,4 @@ public class Tags { public static final String MODNAME = "GRADLETOKEN_MODNAME"; public static final String VERSION = "GRADLETOKEN_VERSION"; public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME"; - } diff --git a/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java b/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java index d663dcde51..e2dea1c619 100644 --- a/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java +++ b/src/main/java/com/elisis/gtnhlanth/client/ClientProxy.java @@ -2,6 +2,4 @@ package com.elisis.gtnhlanth.client; import com.elisis.gtnhlanth.common.CommonProxy; -public class ClientProxy extends CommonProxy { - -} +public class ClientProxy extends CommonProxy {} diff --git a/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java b/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java index a1022cf699..8bf0c8bb46 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java +++ b/src/main/java/com/elisis/gtnhlanth/common/CommonProxy.java @@ -6,16 +6,9 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; public class CommonProxy { - public void preInit(FMLPreInitializationEvent e) { - - } + public void preInit(FMLPreInitializationEvent e) {} - public void init(FMLInitializationEvent e) { - - } - - public void postInit(FMLPostInitializationEvent e) { - - } + public void init(FMLInitializationEvent e) {} + public void postInit(FMLPostInitializationEvent e) {} } diff --git a/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java b/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java index 73e6ec8607..f7c2569cbb 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java +++ b/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java @@ -1,14 +1,12 @@ package com.elisis.gtnhlanth.common.register; -import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; -import com.github.bartimaeusnek.bartworks.util.Pair; - -import static gregtech.api.enums.Materials.*; -import static gregtech.api.enums.TextureSet.*; - import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.Types.*; import static com.github.bartimaeusnek.bartworks.util.BW_Util.subscriptNumbers; +import static gregtech.api.enums.Materials.*; +import static gregtech.api.enums.TextureSet.*; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.util.Pair; /* * @@ -18,20 +16,19 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Util.subscriptNumbers; @SuppressWarnings("unchecked") public class BotWerkstoffMaterialPool implements Runnable { - public static final Werkstoff TungsticAcid = new Werkstoff( - new short[]{0xf5, 0xf1, 0x16}, + public static final Werkstoff TungsticAcid = new Werkstoff( + new short[] {0xf5, 0xf1, 0x16}, "Tungstic Acid", new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust().enforceUnification(), 29900, SET_SHINY, - new Pair<>(Hydrogen,2), - new Pair<>(Tungsten,1), - new Pair<>(Oxygen,4) - ); + new Pair<>(Hydrogen, 2), + new Pair<>(Tungsten, 1), + new Pair<>(Oxygen, 4)); public static final Werkstoff TungstenTrioxide = new Werkstoff( - new short[]{0x0f,0x5,0x16}, + new short[] {0x0f, 0x5, 0x16}, "Tungsten Trioxide", new Werkstoff.Stats(), COMPOUND, @@ -39,384 +36,347 @@ public class BotWerkstoffMaterialPool implements Runnable { 29901, SET_SHINY, new Pair<>(Tungsten, 1), - new Pair<>(Oxygen,3) - ); -// public static final Werkstoff TungstenSteelOxide = new Werkstoff( -// new short[]{0x1f,0x27,0x69}, -// "Tungstensteel Oxide", -// new Werkstoff.Stats(), -// COMPOUND, -// new Werkstoff.GenerationFeatures().onlyDust(), -// 29902, -// SET_FINE, -// new Pair<>(Tungsten, 1), -// new Pair<>(Oxygen,3), -// new Pair<>(Steel,1) -// ); + new Pair<>(Oxygen, 3)); + // public static final Werkstoff TungstenSteelOxide = new Werkstoff( + // new short[]{0x1f,0x27,0x69}, + // "Tungstensteel Oxide", + // new Werkstoff.Stats(), + // COMPOUND, + // new Werkstoff.GenerationFeatures().onlyDust(), + // 29902, + // SET_FINE, + // new Pair<>(Tungsten, 1), + // new Pair<>(Oxygen,3), + // new Pair<>(Steel,1) + // ); public static final Werkstoff AmmoniumNitrate = new Werkstoff( - new short[]{0x81,0xcc,0x00}, + new short[] {0x81, 0xcc, 0x00}, "Ammonium Nitrate", new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29903, SET_FINE, - new Pair<>(Nitrogen,1), - new Pair<>(Hydrogen,4), - new Pair<>(Nitrogen,1), - new Pair<>(Oxygen,3) - ); + new Pair<>(Nitrogen, 1), + new Pair<>(Hydrogen, 4), + new Pair<>(Nitrogen, 1), + new Pair<>(Oxygen, 3)); public static final Werkstoff SodiumTungstate = new Werkstoff( - new short[]{0xc, 0xed, 0xd7,0}, + new short[] {0xc, 0xed, 0xd7, 0}, "Sodium Tungstate", subscriptNumbers("Na2WO4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29904, - SET_FINE - ); + SET_FINE); public static final Werkstoff Phosgene = new Werkstoff( - new short[]{0x15,0xa1,0x1a}, + new short[] {0x15, 0xa1, 0x1a}, "Phosgene", subscriptNumbers("COCl2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29905, - SET_FINE - ); + SET_FINE); public static final Werkstoff Ethylchloroformate = new Werkstoff( - new short[]{0x0a,0xc2,0xcc}, + new short[] {0x0a, 0xc2, 0xcc}, "Ethyl Chloroformate", subscriptNumbers("C3H5ClO2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29906, - SET_FINE - ); + SET_FINE); public static final Werkstoff Ethylcarbamate = new Werkstoff( - new short[]{0x0d,0xa9,0xb8}, + new short[] {0x0d, 0xa9, 0xb8}, "Ethyl Carbamate", subscriptNumbers("CH3CH2O2CNH2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29907, - SET_FINE - ); + SET_FINE); public static final Werkstoff EthylNnitrocarbamate = new Werkstoff( - new short[]{0x0d,0x85,0xb8}, + new short[] {0x0d, 0x85, 0xb8}, "Ethyl N-nitrocarbamate", subscriptNumbers("C3H6N2O4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29908, - SET_FINE - ); + SET_FINE); public static final Werkstoff AmmoniumNnitrourethane = new Werkstoff( - new short[]{0x0d,0x54,0xb8}, + new short[] {0x0d, 0x54, 0xb8}, "Ammonium N-nitrourethane", subscriptNumbers("C3H9N3O4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29909, - SET_FINE - ); + SET_FINE); public static final Werkstoff EthylDinitrocarbamate = new Werkstoff( - new short[]{0x39,0x08,0xc2}, + new short[] {0x39, 0x08, 0xc2}, "Ethyl Dinitrocarbamate", subscriptNumbers("C3H5N3O6"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29910, - SET_FINE - ); + SET_FINE); public static final Werkstoff DinitrogenPentoxide = new Werkstoff( - new short[]{0xcf,0xeb,0x34}, + new short[] {0xcf, 0xeb, 0x34}, "Dinitrogen Pentoxide", subscriptNumbers("N2O5"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29911, - SET_FINE - ); + SET_FINE); public static final Werkstoff AmmoniumDinitramide = new Werkstoff( - new short[]{0x8a,0x0f,0xd1}, + new short[] {0x8a, 0x0f, 0xd1}, "Ammonium Dinitramide", subscriptNumbers("H4N4O4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29912, - SET_FINE - ); + SET_FINE); public static final Werkstoff LMP103S = new Werkstoff( - new short[]{0xbf,0x2f,0xc2}, + new short[] {0xbf, 0x2f, 0xc2}, "LMP-103S", new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29913, - SET_FINE - ); + SET_FINE); public static final Werkstoff OXylene = new Werkstoff( - new short[]{0x88,0x94,0xa8}, + new short[] {0x88, 0x94, 0xa8}, "O-Xylene", subscriptNumbers("C8H10"), new Werkstoff.Stats().setGas(true), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29915, - SET_FINE - ); + SET_FINE); public static final Werkstoff PhthalicAnhydride = new Werkstoff( - new short[]{0x7c,0x99,0x42}, + new short[] {0x7c, 0x99, 0x42}, "Phthalic Anhydride", subscriptNumbers("C8H4O3"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29916, - SET_METALLIC - ); - public static final Werkstoff VanadiumPentoxide = new Werkstoff( - new short[]{0x69,0x69,0x69}, + SET_METALLIC); + public static final Werkstoff VanadiumPentoxide = new Werkstoff( + new short[] {0x69, 0x69, 0x69}, "Vanadium Pentoxide", subscriptNumbers("V2O5"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29917, - SET_METALLIC - ); - public static final Werkstoff TertButylbenzene = new Werkstoff( - new short[]{0,0,0}, + SET_METALLIC); + public static final Werkstoff TertButylbenzene = new Werkstoff( + new short[] {0, 0, 0}, "Tert-Butylbenzene", subscriptNumbers("C10H14"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29918, - SET_METALLIC - ); - public static final Werkstoff TwoTertButylAnthraquinone = new Werkstoff( - new short[]{0xcc,0x86,0x5a}, + SET_METALLIC); + public static final Werkstoff TwoTertButylAnthraquinone = new Werkstoff( + new short[] {0xcc, 0x86, 0x5a}, "2-tert-butyl-anthraquinone", subscriptNumbers("C18H16O2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29919, - SET_METALLIC - ); - public static final Werkstoff TwoTertButylAnthrahydroquinone = new Werkstoff( - new short[]{0xad,0x53,0x1a}, + SET_METALLIC); + public static final Werkstoff TwoTertButylAnthrahydroquinone = new Werkstoff( + new short[] {0xad, 0x53, 0x1a}, "2-tert-butyl-anthrahydroquinone", subscriptNumbers("C18H17O2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29920, - SET_METALLIC - ); - public static final Werkstoff HydrogenPeroxide = new Werkstoff( - new short[]{0xad,0x53,0x1a}, + SET_METALLIC); + public static final Werkstoff HydrogenPeroxide = new Werkstoff( + new short[] {0xad, 0x53, 0x1a}, "Hydrogen Peroxide", subscriptNumbers("H2O2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(), 29921, - SET_METALLIC - ); - public static final Werkstoff Hydrazine = new Werkstoff( - new short[]{0xb5,0x07,0x07}, + SET_METALLIC); + public static final Werkstoff Hydrazine = new Werkstoff( + new short[] {0xb5, 0x07, 0x07}, "hydrazine", subscriptNumbers("N2H4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29922, - SET_METALLIC - ); - public static final Werkstoff DimethylSulfate = new Werkstoff( - new short[]{0xff,0xfb,0x00}, + SET_METALLIC); + public static final Werkstoff DimethylSulfate = new Werkstoff( + new short[] {0xff, 0xfb, 0x00}, "Dimethyl Sulfate", subscriptNumbers("(CH3O)2SO2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29923, - SET_METALLIC - ); - public static final Werkstoff Monomethylhydrazine = new Werkstoff( - new short[]{0xff,0x61,0x00}, + SET_METALLIC); + public static final Werkstoff Monomethylhydrazine = new Werkstoff( + new short[] {0xff, 0x61, 0x00}, "Monomethylhydrazine", subscriptNumbers("CH6N2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29924, - SET_METALLIC - ); - public static final Werkstoff Formaldehyde = new Werkstoff( - new short[]{0x2e,0xd9,0x83}, + SET_METALLIC); + public static final Werkstoff Formaldehyde = new Werkstoff( + new short[] {0x2e, 0xd9, 0x83}, "Formaldehyde", subscriptNumbers("CH2O"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29925, - SET_METALLIC - ); - public static final Werkstoff EthylAcetate = new Werkstoff( - new short[]{0x0c,0xfb,0x32b}, + SET_METALLIC); + public static final Werkstoff EthylAcetate = new Werkstoff( + new short[] {0x0c, 0xfb, 0x32b}, "Ethyl Acetate", subscriptNumbers("C4H8O2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29926, - SET_METALLIC - ); - public static final Werkstoff Acetylhydrazine = new Werkstoff( - new short[]{0xd1,0x5c,0x5c}, + SET_METALLIC); + public static final Werkstoff Acetylhydrazine = new Werkstoff( + new short[] {0xd1, 0x5c, 0x5c}, "Acetylhydrazine", subscriptNumbers("C2H6N2O"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29927, - SET_METALLIC - ); - public static final Werkstoff UnsymmetricalDimethylhydrazine = new Werkstoff( - new short[]{0x80,0x06,0x00}, + SET_METALLIC); + public static final Werkstoff UnsymmetricalDimethylhydrazine = new Werkstoff( + new short[] {0x80, 0x06, 0x00}, "Unsymmetrical Dimethylhydrazine", subscriptNumbers("H2NN(CH3)2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29928, - SET_METALLIC - ); - public static final Werkstoff MonomethylhydrazineFuelMix = new Werkstoff( - new short[]{0x78,0xe3,0xa7}, + SET_METALLIC); + public static final Werkstoff MonomethylhydrazineFuelMix = new Werkstoff( + new short[] {0x78, 0xe3, 0xa7}, "Monomethylhydrazine Fuel Mix", new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29929, - SET_METALLIC - ); - public static final Werkstoff UnsymmetricalDimethylhydrazineFuelMix = new Werkstoff( - new short[]{0xc8,0xff,0x00}, + SET_METALLIC); + public static final Werkstoff UnsymmetricalDimethylhydrazineFuelMix = new Werkstoff( + new short[] {0xc8, 0xff, 0x00}, "Unsymmetrical Dimethylhydrazine Fuel Mix", new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29930, - SET_METALLIC - ); - public static final Werkstoff Nitromethane = new Werkstoff( - new short[]{0x87,0x7d,0x60}, + SET_METALLIC); + public static final Werkstoff Nitromethane = new Werkstoff( + new short[] {0x87, 0x7d, 0x60}, "Nitromethane", subscriptNumbers("CH3NO2"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29914, - SET_METALLIC - ); - public static final Werkstoff BoronTrioxide = new Werkstoff( - new short[]{0xe3,0xa6,0xd3}, + SET_METALLIC); + public static final Werkstoff BoronTrioxide = new Werkstoff( + new short[] {0xe3, 0xa6, 0xd3}, "Boron Trioxide", subscriptNumbers("B2O3"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29931, - SET_METALLIC - ); - public static final Werkstoff BoronTrifluoride = new Werkstoff( - new short[]{0xd0,0xe0,0x3f}, + SET_METALLIC); + public static final Werkstoff BoronTrifluoride = new Werkstoff( + new short[] {0xd0, 0xe0, 0x3f}, "Boron Trifluoride", subscriptNumbers("BF3"), new Werkstoff.Stats().setGas(true), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29932, - SET_METALLIC - ); - public static final Werkstoff NitroniumTetrafluoroborate = new Werkstoff( - new short[]{0x57,0x69,0x2d}, + SET_METALLIC); + public static final Werkstoff NitroniumTetrafluoroborate = new Werkstoff( + new short[] {0x57, 0x69, 0x2d}, "Nitronium Tetrafluoroborate", subscriptNumbers("NO2BF4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29933, - SET_METALLIC - ); - public static final Werkstoff Trinitramid = new Werkstoff( - new short[]{0x28,0x2b,0x70}, + SET_METALLIC); + public static final Werkstoff Trinitramid = new Werkstoff( + new short[] {0x28, 0x2b, 0x70}, "Trinitramid", subscriptNumbers("N4O6"), new Werkstoff.Stats().setGas(true), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29934, - SET_METALLIC - ); - public static final Werkstoff AmmoniaBoronfluorideSolution = new Werkstoff( - new short[]{0x28,0x2b,0x70}, + SET_METALLIC); + public static final Werkstoff AmmoniaBoronfluorideSolution = new Werkstoff( + new short[] {0x28, 0x2b, 0x70}, "Ammonia Boronfluoride Solution", subscriptNumbers("NH4BF4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29935, - SET_METALLIC - ); - public static final Werkstoff SodiumTetrafluoroborate = new Werkstoff( - new short[]{0xbe,0x6e,0xe0}, + SET_METALLIC); + public static final Werkstoff SodiumTetrafluoroborate = new Werkstoff( + new short[] {0xbe, 0x6e, 0xe0}, "Sodium Tetrafluoroborate", subscriptNumbers("NaBF4"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29936, - SET_METALLIC - ); - public static final Werkstoff SodiumFluoride = new Werkstoff( - new short[]{0x9f,0x70,0xe6}, + SET_METALLIC); + public static final Werkstoff SodiumFluoride = new Werkstoff( + new short[] {0x9f, 0x70, 0xe6}, "Sodium Fluoride", subscriptNumbers("NaF"), new Werkstoff.Stats(), COMPOUND, new Werkstoff.GenerationFeatures().onlyDust(), 29937, - SET_METALLIC - ); - public static final Werkstoff Tetrafluoroborate = new Werkstoff( - new short[]{0x6a,0x53,0x8c}, + SET_METALLIC); + public static final Werkstoff Tetrafluoroborate = new Werkstoff( + new short[] {0x6a, 0x53, 0x8c}, "Tetrafluoroboric Acid", subscriptNumbers("HBF4"), new Werkstoff.Stats().setGas(true), COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), 29938, - SET_METALLIC - ); - @Override - public void run() { - // TODO Auto-generated method stub + SET_METALLIC); - } + @Override + public void run() { + // TODO Auto-generated method stub + } } diff --git a/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java b/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java index 14f58394d6..abed46df99 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java +++ b/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java @@ -2,21 +2,17 @@ package com.elisis.gtnhlanth.common.register; import com.elisis.gtnhlanth.common.tileentity.Digester; import com.elisis.gtnhlanth.common.tileentity.DissolutionTank; - import net.minecraft.item.ItemStack; public final class LanthItemList { - - public static ItemStack DIGESTER; - public static ItemStack DISSOLUTION_TANK; - public static void register() { - - LanthItemList.DIGESTER = new Digester(10500, "Digester", "Digester").getStackForm(1L); - LanthItemList.DISSOLUTION_TANK = new DissolutionTank(10501, "Dissolution Tank", "Dissolution Tank").getStackForm(1L); - - } - - + public static ItemStack DIGESTER; + public static ItemStack DISSOLUTION_TANK; + + public static void register() { + LanthItemList.DIGESTER = new Digester(10500, "Digester", "Digester").getStackForm(1L); + LanthItemList.DISSOLUTION_TANK = + new DissolutionTank(10501, "Dissolution Tank", "Dissolution Tank").getStackForm(1L); + } } diff --git a/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java b/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java index d12fb95510..d26cb932f5 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java +++ b/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java @@ -2,16 +2,11 @@ package com.elisis.gtnhlanth.common.register; import static com.github.bartimaeusnek.bartworks.util.BW_Util.subscriptNumbers; -import java.util.Arrays; - import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; -import com.github.bartimaeusnek.bartworks.util.EnumUtils; import com.github.bartimaeusnek.bartworks.util.Pair; - import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; import gregtech.api.enums.TextureSet; +import java.util.Arrays; @SuppressWarnings({"unchecked"}) public class WerkstoffMaterialPool implements Runnable { @@ -21,28 +16,31 @@ public class WerkstoffMaterialPool implements Runnable { private static final int offsetID3 = 11_300; /* - * public static final Werkstoff __ = new Werkstoff( - new short[] {_, _, _}, - "__", - new Werkstoff.Stats(), - Werkstoff.Types.MIXTURE, - new Werkstoff.GenerationFeatures().disable(), - offsetID_, - TextureSet.SET_DULL - ); - */ + * public static final Werkstoff __ = new Werkstoff( + new short[] {_, _, _}, + "__", + new Werkstoff.Stats(), + Werkstoff.Types.MIXTURE, + new Werkstoff.GenerationFeatures().disable(), + offsetID_, + TextureSet.SET_DULL + ); + */ - //Misc. + // Misc. public static final Werkstoff Hafnium = new Werkstoff( new short[] {232, 224, 219}, "Hafnium", subscriptNumbers("Hf"), new Werkstoff.Stats(), Werkstoff.Types.ELEMENT, - new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().enforceUnification(), //Perhaps use hafnia liquid in elemental hafnium synthesis + new Werkstoff.GenerationFeatures() + .disable() + .onlyDust() + .addMetalItems() + .enforceUnification(), // Perhaps use hafnia liquid in elemental hafnium synthesis offsetID, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff LowPurityHafnium = new Werkstoff( new short[] {240, 223, 208}, @@ -50,10 +48,11 @@ public class WerkstoffMaterialPool implements Runnable { subscriptNumbers("??Hf??"), new Werkstoff.Stats(), Werkstoff.Types.COMPOUND, - new Werkstoff.GenerationFeatures().disable().onlyDust(), //Perhaps use hafnia liquid in elemental hafnium synthesis + new Werkstoff.GenerationFeatures() + .disable() + .onlyDust(), // Perhaps use hafnia liquid in elemental hafnium synthesis offsetID + 1, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff Hafnia = new Werkstoff( new short[] {247, 223, 203}, @@ -61,10 +60,11 @@ public class WerkstoffMaterialPool implements Runnable { subscriptNumbers("HfO2"), new Werkstoff.Stats(), Werkstoff.Types.COMPOUND, - new Werkstoff.GenerationFeatures().disable().onlyDust(), //Perhaps use hafnia liquid in elemental hafnium synthesis + new Werkstoff.GenerationFeatures() + .disable() + .onlyDust(), // Perhaps use hafnia liquid in elemental hafnium synthesis offsetID + 2, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff HafniumTetrachloride = new Werkstoff( new short[] {238, 247, 249}, @@ -74,8 +74,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 3, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff HafniumTetrachlorideSolution = new Werkstoff( new short[] {238, 247, 249}, @@ -85,8 +84,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().addCells(), offsetID + 4, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff HafniumIodide = new Werkstoff( new short[] {216, 60, 1}, @@ -96,43 +94,41 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 5, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff HafniumRunoff = new Werkstoff( - new short[] {74, 65, 42}, //Literally the statistically ugliest colour + new short[] {74, 65, 42}, // Literally the statistically ugliest colour "Hafnium Runoff", subscriptNumbers("??????"), new Werkstoff.Stats(), Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 6, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff Zirconium = new Werkstoff( - new short[] {225,230,225}, + new short[] {225, 230, 225}, "Zirconium", subscriptNumbers("Zr"), new Werkstoff.Stats().setBlastFurnace(true), Werkstoff.Types.COMPOUND, - new Werkstoff.GenerationFeatures().disable().onlyDust().addMetalItems().enforceUnification(), + new Werkstoff.GenerationFeatures() + .disable() + .onlyDust() + .addMetalItems() + .enforceUnification(), offsetID + 7, - TextureSet.SET_DULL - - ); + TextureSet.SET_DULL); public static final Werkstoff Zirconia = new Werkstoff( - new short[] {177,152,101}, + new short[] {177, 152, 101}, "Zirconia", subscriptNumbers("ZrO2"), new Werkstoff.Stats(), Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 8, - TextureSet.SET_DULL - - ); + TextureSet.SET_DULL); public static final Werkstoff ZirconiumTetrachloride = new Werkstoff( new short[] {179, 164, 151}, @@ -142,8 +138,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 9, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff ZirconiumTetrachlorideSolution = new Werkstoff( new short[] {179, 164, 151}, @@ -151,10 +146,12 @@ public class WerkstoffMaterialPool implements Runnable { subscriptNumbers("ZrCl4"), new Werkstoff.Stats(), Werkstoff.Types.COMPOUND, - new Werkstoff.GenerationFeatures().disable().addCells(), //Blast Furnace needs liquid input because it can't do 3 item inputs so have a shitty material + new Werkstoff.GenerationFeatures() + .disable() + .addCells(), // Blast Furnace needs liquid input because it can't do 3 item inputs so have a shitty + // material offsetID + 10, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff HafniaZirconiaBlend = new Werkstoff( new short[] {247, 223, 203}, @@ -164,22 +161,24 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 11, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff Iodine = new Werkstoff( new short[] {171, 40, 175}, "Iodine", subscriptNumbers("I"), - new Werkstoff.Stats().setProtons(53).setMass(127).setSublimation(true).setBoilingPoint(484).setGas(true), + new Werkstoff.Stats() + .setProtons(53) + .setMass(127) + .setSublimation(true) + .setBoilingPoint(484) + .setGas(true), Werkstoff.Types.ELEMENT, new Werkstoff.GenerationFeatures().disable().onlyDust().addCells().enforceUnification(), offsetID + 12, - TextureSet.SET_FLUID - ); - + TextureSet.SET_FLUID); - //Lanthanide Line + // Lanthanide Line public static final Werkstoff MuddyRareEarthMonaziteSolution = new Werkstoff( new short[] {111, 78, 55}, "Muddy Monazite Rare Earth Solution", @@ -188,8 +187,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().addCells(), offsetID + 14, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff DilutedRareEarthMonaziteMud = new Werkstoff( new short[] {160, 120, 90}, @@ -199,8 +197,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().addCells(), offsetID + 15, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff DilutedMonaziteSulfate = new Werkstoff( new short[] {237, 201, 175}, @@ -210,8 +207,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().addCells(), offsetID + 16, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff NitratedRareEarthMonaziteConcentrate = new Werkstoff( new short[] {250, 223, 173}, @@ -221,8 +217,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().addCells(), offsetID + 17, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff NitricMonaziteLeachedConcentrate = new Werkstoff( new short[] {244, 202, 22}, @@ -232,8 +227,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().addCells(), offsetID + 18, - TextureSet.SET_FLUID - ); + TextureSet.SET_FLUID); public static final Werkstoff MonaziteSulfate = new Werkstoff( new short[] {152, 118, 84}, @@ -243,8 +237,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 19, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff AcidicMonazitePowder = new Werkstoff( new short[] {50, 23, 77}, @@ -254,8 +247,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 20, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff MonaziteRareEarthFiltrate = new Werkstoff( new short[] {72, 60, 50}, @@ -265,8 +257,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 21, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff NeutralizedMonaziteRareEarthFiltrate = new Werkstoff( new short[] {50, 23, 77}, @@ -276,8 +267,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 22, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff MonaziteRareEarthHydroxideConcentrate = new Werkstoff( new short[] {193, 154, 107}, @@ -287,8 +277,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 23, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff DriedMonaziteRareEarthConcentrate = new Werkstoff( new short[] {250, 214, 165}, @@ -298,8 +287,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 24, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff CeriumDioxide = new Werkstoff( new short[] {255, 255, 255}, @@ -309,8 +297,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable().onlyDust().enforceUnification(), offsetID + 25, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff CeriumChloride = new Werkstoff( new short[] {255, 255, 255}, @@ -320,8 +307,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 26, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff CeriumOxalate = new Werkstoff( new short[] {255, 255, 224}, @@ -331,8 +317,7 @@ public class WerkstoffMaterialPool implements Runnable { Werkstoff.Types.COMPOUND, new Werkstoff.GenerationFeatures().disable().onlyDust(), offsetID + 27, - TextureSet.SET_DULL - ); + TextureSet.SET_DULL); public static final Werkstoff CeriumIIIOxide = new Werkstoff( new short[] {255, 255, 102}, @@ -345,19 +330,17 @@ public class WerkstoffMaterialPool implements Runnable { TextureSet.SET_DULL, Arrays.asList(Materials.Cerium, Materials.Oxygen), new Pair<>(Materials.Cerium, 2), - new Pair<>(Materials.Oxygen, 3) -