Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8283236
Add option to adjust thread priorities (#162)
embeddedt Apr 23, 2023
3496e03
Update to use RetroFuturaGradle instead of ForgeGradle 2.3
Rongmario Apr 24, 2023
f2205fd
Deobf baubles + IE for dev
Rongmario Apr 24, 2023
711f219
Fixed import + embed configuration not working
Rongmario Apr 24, 2023
543e119
Mixin AP + RFG update
Rongmario May 17, 2023
3895bc2
IntelliJ moment
Rongmario May 17, 2023
6dd8d19
Fixes #125
Rongmario May 17, 2023
25fbb74
Fixes #135
Rongmario May 17, 2023
b0e4b68
Bump to 5.7
Rongmario May 17, 2023
3c0e588
Re-add clamping logic from vanilla for render builder count (#167)
embeddedt May 18, 2023
c09f8c3
Bump to 5.8
Rongmario May 18, 2023
168616a
Revamp releaseSpriteFramesCache (#168)
embeddedt May 22, 2023
81cb55d
Bump to 5.9
Rongmario May 24, 2023
4559857
Fix FramesTextureData not actually generating mipmaps (#170)
embeddedt May 24, 2023
dca225f
Bump to 5.10
Rongmario May 26, 2023
880c8d7
Fix Thermal Expansion machine item texture bug (#172)
ISurrealI May 29, 2023
3023648
Fixed incompatibility with MixinBooter's crash section for mixins
Rongmario Jun 2, 2023
75a4dc3
Bump to 5.11
Rongmario Jun 2, 2023
184502f
Alleviate some misery 8u51 users are having by updating CA Certs
Rongmario Jun 3, 2023
4c01d0f
Bump to 5.12
Rongmario Jun 3, 2023
63a8001
Optimize iteration over ticking FramesTextureData instances (#175)
embeddedt Jun 7, 2023
32baf24
Fix `player.setInvulnerable(true);` not working (#173)
Desoroxxx Jun 12, 2023
583c8c4
Bump to 5.13
Rongmario Jun 12, 2023
c43b448
Optimize updateAnimations iteration (#182)
embeddedt Jun 16, 2023
8d4d594
Magma compatibility (#184)
Rongmario Jul 3, 2023
f165b63
Bump to 5.14
Rongmario Jul 4, 2023
44cb4df
Config "threadPriorityFix" now disables mixin as well (#199)
MojangPlsFix Aug 17, 2023
57f99c7
Fix a crash with SGCraft passing a null TextureAtlasSprite through it…
TheComputerizer Sep 23, 2023
389c9ad
Fixes #189
Rongmario Sep 23, 2023
b5b4a02
Bump to 5.15
Rongmario Sep 23, 2023
687adb1
Fix makeEventsSingletons breaking capabilities (#213)
TheComputerizer Sep 24, 2023
c2b3af0
Typo, use the uncasted NeighborNotifyEvent
Rongmario Sep 24, 2023
5188a58
Refactored some of `IRefreshEvent` + avoid World objs from leaking
Rongmario Sep 24, 2023
3d951e6
Implement BlockEvent stuff in NeighborNotifyEvent for now
Rongmario Sep 24, 2023
49b7f0d
Bump to 5.16
Rongmario Sep 26, 2023
bffa567
Fixes #218
Rongmario Oct 4, 2023
a8f243f
Bump to 5.17
Rongmario Oct 4, 2023
1f4f25c
Move BufferBuilder texture detection logic to a public method (#219)
embeddedt Oct 14, 2023
a81de58
Bump to 5.18
Rongmario Oct 15, 2023
049e478
Fixes #239 that was introduced in embeddedt@8b42398
Rongmario Feb 19, 2024
1fb96d5
Bump to 5.19
Rongmario Feb 19, 2024
cbe4034
Set squashBakedQuads to false if any sodium ports are installed
Rongmario Apr 12, 2024
593abe8
Update cacerts
Rongmario Apr 13, 2024
8e690c6
Allow normalasm to load earlier (stupid forge gimmick)
Rongmario Apr 13, 2024
da76575
Bump to 5.20, I swear v6 is coming soon!
Rongmario Apr 13, 2024
46c05f8
fix optimizeNBTTagCompoundBackingMap option (#269)
CaliforniaDemise Jan 22, 2025
6a01841
Bump to 5.21, we stray further away from v6
Rongmario Jan 23, 2025
790b5f2
Fixes #270, fixes #271
Rongmario Jan 25, 2025
e2bb422
Bump to 5.22
Rongmario Jan 25, 2025
946ffbb
Disable on demand animations when Optifine is installed
Rongmario Feb 2, 2025
642179a
Bump to 5.23
Rongmario Feb 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 138 additions & 91 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar
import org.jetbrains.gradle.ext.Gradle

plugins {
id 'java'
id 'java-library'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.9'
id 'com.matthewprenger.cursegradle' version '1.4.0'
}

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'

version = "5.6"
group = "mirror.normalasm"
archivesBaseName = "normalasm"
version = project.mod_version
group = project.maven_group
archivesBaseName = project.archives_base_name

sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL)
}
// Generate sources and javadocs jars when building and publishing
withSourcesJar()
// withJavadocJar()
}

minecraft {
version = "1.12.2-14.23.5.2847"
runDir = "run"
mappings = "stable_39"
mcVersion = '1.12.2'
def args = [
"-ea:${project.group}",
'-Dfml.coreMods.load=mirror.normalasm.core.NormalLoadingPlugin',
'-Dmixin.hotSwap=true',
'-Dmixin.checks.interfaces=true',
'-Dmixin.debug.export=true'
'-Dmixin.debug.export=true'
]
clientJvmArgs.addAll(args)
serverJvmArgs.addAll(args)
useDepAts = true
makeObfSourceJar = false
extraRunJvmArguments.addAll(args)
}

configurations {
Expand All @@ -44,112 +42,161 @@ configurations {

repositories {
jcenter()
maven {
url 'https://repo.spongepowered.org/maven'
}
maven {
url "https://maven.cleanroommc.com"
url 'https://maven.cleanroommc.com'
}
maven {
url "http://chickenbones.net/maven"
url 'http://chickenbones.net/maven'
allowInsecureProtocol = true
}
maven {
url "http://maven.covers1624.net"
url 'http://maven.covers1624.net'
allowInsecureProtocol = true
}
maven {
url "https://www.cursemaven.com"
url 'https://www.cursemaven.com'
}
maven {
url "https://dvs1.progwml6.com/files/maven/"
url 'https://dvs1.progwml6.com/files/maven/'
}
maven {
url "https://modmaven.k-4u.nl/"
url 'https://modmaven.k-4u.nl/'
}
maven {
url "https://maven.blamejared.com"
url 'https://maven.blamejared.com'
}
maven {
url "https://maven.thiakil.com"
url 'https://maven.thiakil.com'
}
maven {
url "https://repo.codemc.io/repository/maven-public/"
url 'https://repo.codemc.io/repository/maven-public/'
}
maven {
url "http://maven.tterrag.com"
url 'http://maven.tterrag.com'
allowInsecureProtocol = true
}
// maven {
// url = "http://maven.bluexin.be/repository/snapshots/"
// url = 'http://maven.bluexin.be/repository/snapshots/'
// }
}

dependencies {
embed "me.nallar.whocalled:WhoCalled:1.1"
deobfProvided "com.enderio.core:EnderCore:1.12.2-+"
deobfProvided ("com.enderio:EnderIO:1.12.2-+") {
embed 'me.nallar.whocalled:WhoCalled:1.1'
implementation 'zone.rong:mixinbooter:7.1'
implementation files('./etc/spark-forge-deobf.jar')

compileOnly 'com.enderio.core:EnderCore:1.12.2-+'
compileOnly ('com.enderio:EnderIO:1.12.2-+') {
transitive = false
}
compileOnly 'codechicken:ChickenASM:1.12-1.0.2.9'
compileOnly 'epicsquid.mysticallib:mysticallib:1.12.2-+'
compileOnly 'mezz.jei:jei_1.12.2:4.15.0.293'
compileOnly 'slimeknights.mantle:Mantle:1.12-1.3.3.55'
compileOnly 'slimeknights:TConstruct:1.12.2-2.13.0.183'
compileOnly 'betterwithmods:BetterWithMods:1.12-2.3.20-1030'

compileOnly rfg.deobf('codechicken:CodeChickenLib:1.12.2-3.2.3.358:universal')
compileOnly rfg.deobf('com.azanor.baubles:Baubles:1.12-1.5.2')
compileOnly rfg.deobf('blusunrize:ImmersiveEngineering:0.12-92-+')

compileOnly rfg.deobf('curse.maven:astral-sorcery-241721:3044416')
compileOnly rfg.deobf('curse.maven:tfcraft-302973:3268988')
compileOnly rfg.deobf('curse.maven:foamfix-optimization-mod-278494:3327893')
compileOnly rfg.deobf('curse.maven:electroblobs-wizardry-265642:3189062')
// deobfCompile 'curse.maven:qmd-362056:3474533'
// deobfCompile 'cofh:CoFHCore:1.12.2-+:universal'
// compile 'com.teamwizardry.librarianlib:librarianlib-1.12:4.0-SNAPSHOT:deobf'
compileOnly rfg.deobf('curse.maven:extra-utilities-225561:2678374')
compileOnly rfg.deobf('curse.maven:gottschcore-272450:3748293')
compileOnly rfg.deobf('curse.maven:treasure2-289760:3758107')
compileOnly rfg.deobf('curse.maven:time-speed-mod-221053:2991593')
compileOnly rfg.deobf('curse.maven:gregtech-ce-unofficial-557242:3745499')

api ('org.spongepowered:mixin:0.8.3') {
transitive = false
}
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
annotationProcessor 'com.google.guava:guava:24.1.1-jre'
annotationProcessor 'com.google.code.gson:gson:2.8.6'
annotationProcessor ('org.spongepowered:mixin:0.8.3') {
transitive = false
}
compile "codechicken:ChickenASM:1.12-1.0.2.9"
provided "epicsquid.mysticallib:mysticallib:1.12.2-+"
compile "mezz.jei:jei_1.12.2:4.15.0.293"
compile "zone.rong:mixinbooter:4.2"
// compile files("./etc/spark-forge-deobf.jar", "./etc/preview_OptiFine_1.12.2_HD_U_G6_pre1-deobf.jar")
compile files("./etc/spark-forge-deobf.jar")

deobfCompile 'slimeknights.mantle:Mantle:1.12-1.3.3.55+'
deobfCompile 'slimeknights:TConstruct:1.12.2-2.13.0.183+'

deobfProvided "betterwithmods:BetterWithMods:1.12-2.3.20-1030"

deobfCompile "codechicken:CodeChickenLib:1.12.2-3.2.3.358:universal"
deobfProvided "com.azanor.baubles:Baubles:1.12-1.5.2"
deobfProvided "blusunrize:ImmersiveEngineering:0.12-92-+"
deobfProvided "curse.maven:astral-sorcery-241721:3044416"
deobfProvided "curse.maven:tfcraft-302973:3268988"
deobfProvided "curse.maven:foamfix-optimization-mod-278494:3327893"
deobfProvided "curse.maven:electroblobs-wizardry-265642:3189062"
// deobfCompile "curse.maven:qmd-362056:3474533"
// deobfCompile "cofh:CoFHCore:1.12.2-+:universal"
// compile "com.teamwizardry.librarianlib:librarianlib-1.12:4.0-SNAPSHOT:deobf"
deobfProvided "curse.maven:extra-utilities-225561:2678374"
deobfProvided "curse.maven:gottschcore-272450:3748293"
deobfProvided "curse.maven:treasure2-289760:3758107"
deobfProvided "curse.maven:time-speed-mod-221053:2991593"
deobfCompile "curse.maven:gregtech-ce-unofficial-557242:3745499"
}

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
def mixinConfigRefMap = 'mixins.' + project.archives_base_name + '.refmap.json'
def mixinTmpDir = buildDir.path + File.separator + 'tmp' + File.separator + 'mixins'
def refMap = "${mixinTmpDir}" + File.separator + mixinConfigRefMap
def mixinSrg = "${mixinTmpDir}" + File.separator + 'mixins.srg'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
tasks.named('reobfJar', ReobfuscatedJar).configure {
extraSrgFiles.from(mixinSrg)
}

// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
tasks.named('compileJava', JavaCompile).configure {
doFirst {
new File(mixinTmpDir).mkdirs()
}
options.compilerArgs += ["-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}", "-AoutSrgFile=${mixinSrg}", "-AoutRefMapFile=${refMap}",]
}

sourceSets {
main {
ext.refMap = "mixins.normalasm.refmap.json"
processResources {
inputs.property 'version', project.version
inputs.property 'mcversion', project.minecraft.version

filesMatching('mcmod.info') { fcd ->
include 'mcmod.info'
// replace version and mcversion
fcd.expand ('version': project.version, 'mcversion': project.minecraft.version)
}

from refMap
dependsOn 'compileJava'
}

jar {
from (configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude 'LICENSE.txt', 'META-INF/MANIFSET.MF', 'META-INF/maven/**', 'META-INF/*.RSA', 'META-INF/*.SF'
from provider {
configurations.embed.collect {it.isDirectory() ? it : zipTree(it)}
}
manifest {
attributes([
"FMLCorePluginContainsFMLMod": true,
"FMLCorePlugin": 'mirror.normalasm.core.NormalLoadingPlugin',
"ForceLoadAsMod": project.gradle.startParameter.taskNames[0] == "build",
"TweakClass": 'org.spongepowered.asm.launch.MixinTweaker',
"FMLAT": "normalasm_at.cfg"
'FMLCorePluginContainsFMLMod': true,
'FMLCorePlugin': 'mirror.normalasm.core.NormalLoadingPlugin',
'ForceLoadAsMod': project.gradle.startParameter.taskNames[0] == 'build',
'FMLAT': 'normalasm_at.cfg'
])
}
}

idea {
module {
inheritOutputDirs = true
}
project {
settings {
runConfigurations {
'1. Run Client'(Gradle) {
taskNames = ['runClient']
}
'2. Run Server'(Gradle) {
taskNames = ['runServer']
}
'3. Run Obfuscated Client'(Gradle) {
taskNames = ['runObfClient']
}
'4. Run Obfuscated Server'(Gradle) {
taskNames = ['runObfServer']
}
}
compiler.javac {
afterEvaluate {
javacAdditionalOptions = '-encoding utf8'
moduleJavacAdditionalOptions = [(project.name + '.main'): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')]
}
}
}
}
}
9 changes: 6 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.jvmargs = -Xmx3G

# Mod Information
mod_version = 5.23
maven_group = mirror.normalasm
archives_base_name = normalasm
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
24 changes: 24 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pluginManagement {
repositories {
maven {
// RetroFuturaGradle
name = 'GTNH Maven'
url = uri 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol = true
mavenContent {
includeGroup 'com.gtnewhorizons'
includeGroup 'com.gtnewhorizons.retrofuturagradle'
}
}
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
}

plugins {
// Automatic toolchain provisioning
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
}

rootProject.name = 'NormalASM'
7 changes: 7 additions & 0 deletions src/main/java/mirror/normalasm/NormalReflector.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ public static boolean doesTweakExist(String tweakName) {
return ((List<String>) Launch.blackboard.get("TweakClasses")).contains(tweakName);
}

public static Class<?> getNullableClass(String className) {
try {
return Class.forName(className);
} catch (ClassNotFoundException ignored) { }
return null;
}

public static Optional<Class<?>> getClass(String className) {
try {
return Optional.of(Class.forName(className));
Expand Down
Loading