From 348b3a8df7bcdd4cffc6e682061786aec5cfcd67 Mon Sep 17 00:00:00 2001 From: bombcar Date: Wed, 20 Dec 2023 09:29:57 -0600 Subject: [PATCH 1/2] add RandomThings to naming for spirit --- src/main/resources/assets/randomthings/lang/en_US.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/randomthings/lang/en_US.lang b/src/main/resources/assets/randomthings/lang/en_US.lang index 1e77d1c..5181c3c 100644 --- a/src/main/resources/assets/randomthings/lang/en_US.lang +++ b/src/main/resources/assets/randomthings/lang/en_US.lang @@ -89,7 +89,7 @@ imbue.wither=Wither Imbue imbue.weakness=Weakness Imbue imbue.spectre=Spectre Imbue -entity.spirit.name=Spirit +entity.RandomThings.spirit.name=Spirit entity.bloodmoonCircle.name=Bloodmoon Circle text.tooltip.item.dropFilter.generic=Takes Item Filter @@ -174,4 +174,4 @@ text.enderLetter.empty=You can't send an empty letter text.bloodmoon.command=There will be a Bloodmoon next night text.bloodmoon.notify=The Blood Moon is rising... -text.bloodmoon.nosleep=You don't feel tired right now \ No newline at end of file +text.bloodmoon.nosleep=You don't feel tired right now From 68309c5b00ea2de4adbd0d97f32119af162504c2 Mon Sep 17 00:00:00 2001 From: bombcar Date: Wed, 20 Dec 2023 09:30:58 -0600 Subject: [PATCH 2/2] update buildscript and spotless apply --- README.md | 2 +- build.gradle | 290 ++++++++++++------ dependencies.gradle | 6 +- repositories.gradle | 4 - .../computercraft/api/filesystem/IMount.java | 2 + .../api/filesystem/IWritableMount.java | 2 + .../api/peripheral/IComputerAccess.java | 2 + .../randomthings/Client/GuiHandler.java | 15 +- .../Client/ParticleSystem/ParticleSystem.java | 29 +- .../randomthings/Client/RenderUtils.java | 10 +- .../Client/Renderer/RenderBlut.java | 14 +- .../randomthings/Core/Commands/RTCommand.java | 6 +- .../randomthings/Handler/RTEventHandler.java | 23 +- .../randomthings/Network/PacketHandler.java | 14 +- .../randomthings/Potions/PotionImbue.java | 2 +- .../randomthings/Proxy/ClientProxy.java | 15 +- 16 files changed, 317 insertions(+), 119 deletions(-) diff --git a/README.md b/README.md index 095525f..9520278 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Feel free to make pull requests for anything. ## License -GTNH modifications Copyright (c) 2022 The GTNH Team +GTNH modifications Copyright (c) 2022-2024 The GTNH Team This code is licensed LGPL v3.0 or later. Feel free to use our changes, just give back any changes you make to the community as well! diff --git a/build.gradle b/build.gradle index 3930990..50c3291 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1685785062 +//version: 1702141377 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -28,27 +28,12 @@ import java.util.concurrent.TimeUnit buildscript { repositories { - mavenCentral() - - maven { - name 'forge' - url 'https://maven.minecraftforge.net' - } maven { // GTNH RetroFuturaGradle and ASM Fork name "GTNH Maven" url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" allowInsecureProtocol = true } - maven { - name 'sonatype' - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - maven { - name 'Scala CI dependencies' - url 'https://repo1.maven.org/maven2/' - } - mavenLocal() } } @@ -69,7 +54,7 @@ plugins { id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.3.14' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26' } print("You might want to check out './gradlew :faq' if your build fails.\n") @@ -89,6 +74,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 +117,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 +142,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 +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) @@ -357,7 +372,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 +414,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 +504,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 +527,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 +575,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 +589,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://maven2.ic2.player.to/", "https://maven.ic2.player.to/") + content { + includeGroup "net.industrial-craft" + } metadataSources { mavenPom() artifact() @@ -569,11 +631,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 +649,7 @@ dependencies { } } if (usesMixins.toBoolean()) { - implementation(mixinProviderSpec) + implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap)) } else if (forceEnableMixins.toBoolean()) { runtimeOnlyNonPublishable(mixinProviderSpec) } @@ -608,15 +672,37 @@ 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') } } -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 +734,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 +762,6 @@ tasks.named("processResources", ProcessResources).configure { } if (usesMixins.toBoolean()) { - from refMap dependsOn("compileJava", "compileScala") } } @@ -724,23 +780,14 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies" } dependencies { - def lwjgl3ifyVersion = '1.3.5' - def asmVersion = '9.4' + def lwjgl3ifyVersion = '1.5.7' 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.35') } - 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 +1026,9 @@ idea { } } runConfigurations { + "0. Build and Test"(Gradle) { + taskNames = ["build"] + } "1. Run Client"(Gradle) { taskNames = ["runClient"] } @@ -1098,6 +1148,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 +1174,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 +1297,7 @@ def addCurseForgeRelation(String type, String name) { // Updating -def buildscriptGradleVersion = "8.1.1" +def buildscriptGradleVersion = "8.5" tasks.named('wrapper', Wrapper).configure { gradleVersion = buildscriptGradleVersion @@ -1344,8 +1403,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 @@ -1510,3 +1575,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 1c6ccaa..1cb3230 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,10 +1,8 @@ // Add your dependencies here dependencies { - compileOnly("com.github.GTNewHorizons:OpenComputers:1.9.8-GTNH:api") { + compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.0-GTNH:api") { transitive = false } - compile("com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev") - compile("com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev") - compile("com.github.GTNewHorizons:NotEnoughItems:2.3.55-GTNH:dev") + api("com.github.GTNewHorizons:NotEnoughItems:2.4.13-GTNH:dev") } diff --git a/repositories.gradle b/repositories.gradle index 2409103..d372f27 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,8 +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/" - } } \ No newline at end of file diff --git a/src/api/java/dan200/computercraft/api/filesystem/IMount.java b/src/api/java/dan200/computercraft/api/filesystem/IMount.java index b7dbd7b..73a24c1 100644 --- a/src/api/java/dan200/computercraft/api/filesystem/IMount.java +++ b/src/api/java/dan200/computercraft/api/filesystem/IMount.java @@ -9,6 +9,8 @@ import java.io.InputStream; import java.util.List; +import net.minecraft.world.World; + /** * Represents a read only part of a virtual filesystem that can be mounted onto a computercraft using * IComputerAccess.mount(). Ready made implementations of this interface can be created using diff --git a/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java b/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java index fa41b95..2e10370 100644 --- a/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java +++ b/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java @@ -8,6 +8,8 @@ import java.io.IOException; import java.io.OutputStream; +import net.minecraft.world.World; + /** * Represents a part of a virtual filesystem that can be mounted onto a computercraft using IComputerAccess.mount() or * IComputerAccess.mountWritable(), that can also be written to. Ready made implementations of this interface can be diff --git a/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java b/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java index 8f9f016..dac06c2 100644 --- a/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java +++ b/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java @@ -5,6 +5,8 @@ */ package dan200.computercraft.api.peripheral; +import net.minecraft.world.World; + import dan200.computercraft.api.filesystem.IMount; import dan200.computercraft.api.filesystem.IWritableMount; diff --git a/src/main/java/lumien/randomthings/Client/GuiHandler.java b/src/main/java/lumien/randomthings/Client/GuiHandler.java index 67e65d4..4b28716 100644 --- a/src/main/java/lumien/randomthings/Client/GuiHandler.java +++ b/src/main/java/lumien/randomthings/Client/GuiHandler.java @@ -1,6 +1,19 @@ package lumien.randomthings.Client; -import static lumien.randomthings.Library.GuiIds.*; +import static lumien.randomthings.Library.GuiIds.ADVANCED_ITEMCOLLECTOR; +import static lumien.randomthings.Library.GuiIds.DROP_FILTER; +import static lumien.randomthings.Library.GuiIds.DYEING_MACHINE; +import static lumien.randomthings.Library.GuiIds.ENDER_ENERGY_DISTRIBUTOR; +import static lumien.randomthings.Library.GuiIds.ENDER_LETTER; +import static lumien.randomthings.Library.GuiIds.ENERGY_DISTRIBUTOR; +import static lumien.randomthings.Library.GuiIds.IMBUING_STATION; +import static lumien.randomthings.Library.GuiIds.ITEM_FILTER; +import static lumien.randomthings.Library.GuiIds.MAGNETIC_FORCE; +import static lumien.randomthings.Library.GuiIds.ONLINE_DETECTOR; +import static lumien.randomthings.Library.GuiIds.OP_SPECTRE_KEY; +import static lumien.randomthings.Library.GuiIds.PLAYER_INTERFACE; +import static lumien.randomthings.Library.GuiIds.SOUND_RECORDER; +import static lumien.randomthings.Library.GuiIds.VOID_STONE; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; diff --git a/src/main/java/lumien/randomthings/Client/ParticleSystem/ParticleSystem.java b/src/main/java/lumien/randomthings/Client/ParticleSystem/ParticleSystem.java index 2894fb3..2a21c24 100644 --- a/src/main/java/lumien/randomthings/Client/ParticleSystem/ParticleSystem.java +++ b/src/main/java/lumien/randomthings/Client/ParticleSystem/ParticleSystem.java @@ -1,8 +1,31 @@ package lumien.randomthings.Client.ParticleSystem; -import static org.lwjgl.opengl.GL11.*; -import static org.lwjgl.opengl.GL15.*; -import static org.lwjgl.opengl.GL20.*; +import static org.lwjgl.opengl.GL11.GL_FLOAT; +import static org.lwjgl.opengl.GL11.GL_LIGHTING; +import static org.lwjgl.opengl.GL11.GL_POINTS; +import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D; +import static org.lwjgl.opengl.GL11.glDisable; +import static org.lwjgl.opengl.GL11.glDrawArrays; +import static org.lwjgl.opengl.GL11.glEnable; +import static org.lwjgl.opengl.GL11.glPointSize; +import static org.lwjgl.opengl.GL15.GL_ARRAY_BUFFER; +import static org.lwjgl.opengl.GL15.GL_STREAM_DRAW; +import static org.lwjgl.opengl.GL15.glBindBuffer; +import static org.lwjgl.opengl.GL15.glBufferData; +import static org.lwjgl.opengl.GL15.glGenBuffers; +import static org.lwjgl.opengl.GL20.GL_FRAGMENT_SHADER; +import static org.lwjgl.opengl.GL20.GL_VERTEX_SHADER; +import static org.lwjgl.opengl.GL20.glAttachShader; +import static org.lwjgl.opengl.GL20.glCompileShader; +import static org.lwjgl.opengl.GL20.glCreateProgram; +import static org.lwjgl.opengl.GL20.glCreateShader; +import static org.lwjgl.opengl.GL20.glDeleteShader; +import static org.lwjgl.opengl.GL20.glDisableVertexAttribArray; +import static org.lwjgl.opengl.GL20.glEnableVertexAttribArray; +import static org.lwjgl.opengl.GL20.glLinkProgram; +import static org.lwjgl.opengl.GL20.glShaderSource; +import static org.lwjgl.opengl.GL20.glUseProgram; +import static org.lwjgl.opengl.GL20.glVertexAttribPointer; import java.io.BufferedReader; import java.io.FileInputStream; diff --git a/src/main/java/lumien/randomthings/Client/RenderUtils.java b/src/main/java/lumien/randomthings/Client/RenderUtils.java index 62c75df..cafab1c 100644 --- a/src/main/java/lumien/randomthings/Client/RenderUtils.java +++ b/src/main/java/lumien/randomthings/Client/RenderUtils.java @@ -1,6 +1,14 @@ package lumien.randomthings.Client; -import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL11.GL_BLEND; +import static org.lwjgl.opengl.GL11.GL_SCISSOR_TEST; +import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D; +import static org.lwjgl.opengl.GL11.GL_TEXTURE_HEIGHT; +import static org.lwjgl.opengl.GL11.GL_TEXTURE_WIDTH; +import static org.lwjgl.opengl.GL11.glColor3f; +import static org.lwjgl.opengl.GL11.glDisable; +import static org.lwjgl.opengl.GL11.glEnable; +import static org.lwjgl.opengl.GL11.glScissor; import java.awt.Color; import java.nio.IntBuffer; diff --git a/src/main/java/lumien/randomthings/Client/Renderer/RenderBlut.java b/src/main/java/lumien/randomthings/Client/Renderer/RenderBlut.java index d7b0f65..774a9a4 100644 --- a/src/main/java/lumien/randomthings/Client/Renderer/RenderBlut.java +++ b/src/main/java/lumien/randomthings/Client/Renderer/RenderBlut.java @@ -1,6 +1,18 @@ package lumien.randomthings.Client.Renderer; -import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL11.GL_BLEND; +import static org.lwjgl.opengl.GL11.GL_LIGHTING; +import static org.lwjgl.opengl.GL11.GL_QUADS; +import static org.lwjgl.opengl.GL11.glBegin; +import static org.lwjgl.opengl.GL11.glDisable; +import static org.lwjgl.opengl.GL11.glEnable; +import static org.lwjgl.opengl.GL11.glEnd; +import static org.lwjgl.opengl.GL11.glPopMatrix; +import static org.lwjgl.opengl.GL11.glPushMatrix; +import static org.lwjgl.opengl.GL11.glRotatef; +import static org.lwjgl.opengl.GL11.glTexCoord2d; +import static org.lwjgl.opengl.GL11.glTranslated; +import static org.lwjgl.opengl.GL11.glVertex3d; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; diff --git a/src/main/java/lumien/randomthings/Core/Commands/RTCommand.java b/src/main/java/lumien/randomthings/Core/Commands/RTCommand.java index 5276fb0..7fae6fa 100644 --- a/src/main/java/lumien/randomthings/Core/Commands/RTCommand.java +++ b/src/main/java/lumien/randomthings/Core/Commands/RTCommand.java @@ -4,7 +4,11 @@ import java.util.List; import net.minecraft.block.Block; -import net.minecraft.command.*; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.command.PlayerNotFoundException; +import net.minecraft.command.WrongUsageException; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; diff --git a/src/main/java/lumien/randomthings/Handler/RTEventHandler.java b/src/main/java/lumien/randomthings/Handler/RTEventHandler.java index e19be37..9097d4b 100644 --- a/src/main/java/lumien/randomthings/Handler/RTEventHandler.java +++ b/src/main/java/lumien/randomthings/Handler/RTEventHandler.java @@ -1,6 +1,12 @@ package lumien.randomthings.Handler; -import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL11.GL_BLEND; +import static org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA; +import static org.lwjgl.opengl.GL11.GL_SRC_ALPHA; +import static org.lwjgl.opengl.GL11.glAlphaFunc; +import static org.lwjgl.opengl.GL11.glBlendFunc; +import static org.lwjgl.opengl.GL11.glColor4f; +import static org.lwjgl.opengl.GL11.glEnable; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.I18n; @@ -36,8 +42,13 @@ import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; -import net.minecraftforge.event.entity.player.*; +import net.minecraftforge.event.entity.player.AttackEntityEvent; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.event.entity.player.PlayerDropsEvent; import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed; +import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; +import net.minecraftforge.event.entity.player.UseHoeEvent; import net.minecraftforge.event.world.BlockEvent.BreakEvent; import net.minecraftforge.event.world.WorldEvent; @@ -63,7 +74,13 @@ import lumien.randomthings.Handler.Bloodmoon.ClientBloodmoonHandler; import lumien.randomthings.Handler.Bloodmoon.ServerBloodmoonHandler; import lumien.randomthings.Handler.Spectre.SpectreHandler; -import lumien.randomthings.Items.*; +import lumien.randomthings.Items.ItemBloodstone; +import lumien.randomthings.Items.ItemCreativeSword; +import lumien.randomthings.Items.ItemDropFilter; +import lumien.randomthings.Items.ItemFilter; +import lumien.randomthings.Items.ItemSpectreArmor; +import lumien.randomthings.Items.ItemWhiteStone; +import lumien.randomthings.Items.ModItems; import lumien.randomthings.Library.DimensionCoordinate; import lumien.randomthings.Library.PotionEffects; import lumien.randomthings.Mixins.Minecraft.EntityLivingAccessor; diff --git a/src/main/java/lumien/randomthings/Network/PacketHandler.java b/src/main/java/lumien/randomthings/Network/PacketHandler.java index 3a1e1be..aeba137 100644 --- a/src/main/java/lumien/randomthings/Network/PacketHandler.java +++ b/src/main/java/lumien/randomthings/Network/PacketHandler.java @@ -1,6 +1,18 @@ package lumien.randomthings.Network; -import lumien.randomthings.Network.Messages.*; +import lumien.randomthings.Network.Messages.MessageAnswerTeleport; +import lumien.randomthings.Network.Messages.MessageBloodmoon; +import lumien.randomthings.Network.Messages.MessageChangeItemProperty; +import lumien.randomthings.Network.Messages.MessageContainerProperty; +import lumien.randomthings.Network.Messages.MessageItemCollector; +import lumien.randomthings.Network.Messages.MessageItemFilter; +import lumien.randomthings.Network.Messages.MessageMagneticForceParticle; +import lumien.randomthings.Network.Messages.MessageNotification; +import lumien.randomthings.Network.Messages.MessageOnlineDetector; +import lumien.randomthings.Network.Messages.MessagePaintBiome; +import lumien.randomthings.Network.Messages.MessageRequestTeleport; +import lumien.randomthings.Network.Messages.MessageSpectreData; +import lumien.randomthings.Network.Messages.MessageWhitestone; public class PacketHandler { diff --git a/src/main/java/lumien/randomthings/Potions/PotionImbue.java b/src/main/java/lumien/randomthings/Potions/PotionImbue.java index 60085bf..e242ecc 100644 --- a/src/main/java/lumien/randomthings/Potions/PotionImbue.java +++ b/src/main/java/lumien/randomthings/Potions/PotionImbue.java @@ -1,6 +1,6 @@ package lumien.randomthings.Potions; -import java.awt.*; +import java.awt.Color; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; diff --git a/src/main/java/lumien/randomthings/Proxy/ClientProxy.java b/src/main/java/lumien/randomthings/Proxy/ClientProxy.java index f90c103..b98b4e4 100644 --- a/src/main/java/lumien/randomthings/Proxy/ClientProxy.java +++ b/src/main/java/lumien/randomthings/Proxy/ClientProxy.java @@ -18,8 +18,19 @@ import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; import lumien.randomthings.Client.ClientTickHandler; -import lumien.randomthings.Client.Renderer.*; -import lumien.randomthings.Entity.*; +import lumien.randomthings.Client.Renderer.RenderBloodmoonCircle; +import lumien.randomthings.Client.Renderer.RenderHealingOrb; +import lumien.randomthings.Client.Renderer.RenderItemCollector; +import lumien.randomthings.Client.Renderer.RenderRTItem; +import lumien.randomthings.Client.Renderer.RenderReviveCircle; +import lumien.randomthings.Client.Renderer.RenderSoul; +import lumien.randomthings.Client.Renderer.RenderSpirit; +import lumien.randomthings.Client.Renderer.RenderWirelessLever; +import lumien.randomthings.Entity.EntityBloodmoonCircle; +import lumien.randomthings.Entity.EntityHealingOrb; +import lumien.randomthings.Entity.EntityReviveCircle; +import lumien.randomthings.Entity.EntitySoul; +import lumien.randomthings.Entity.EntitySpirit; import lumien.randomthings.Handler.Bloodmoon.ClientBloodmoonHandler; import lumien.randomthings.Items.ItemGinto; import lumien.randomthings.Items.ModItems;