Fix IDE not reconising preprocessor

This commit is contained in:
TomTheFurry
2022-03-10 17:29:27 +08:00
parent f66e27b077
commit 11910d0f28
4 changed files with 14 additions and 16 deletions
+11 -4
View File
@@ -12,6 +12,11 @@ plugins {
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false
}
def writeBuildGradlePredefine() {
def excapedMCVersion = rootProject.minecraft_version.replace(".", "_")
new File(projectDir, "build.properties").text = "MC_VERSION_${excapedMCVersion}=\n"
}
def loadProperties() {
def defaultMcVersion = '1.18.2'
if (!project.hasProperty("mcVer")) {
@@ -28,6 +33,7 @@ def loadProperties() {
rootProject.ext.set(prop.key, prop.value)
// println "Added prop [key:" + prop.key + ", value:" + prop.value + "]"
}
writeBuildGradlePredefine()
}
loadProperties()
@@ -170,11 +176,12 @@ allprojects { p ->
tasks.withType(JavaCompile) {
// Add Manifold Preprocessor
def excapedMCVersion = rootProject.minecraft_version.replace(".", "_")
options.compilerArgs += ['-Xplugin:Manifold', "-AMC_VERSION_${excapedMCVersion}"]
// def excapedMCVersion = rootProject.minecraft_version.replace(".", "_")
// options.compilerArgs += ['-Xplugin:Manifold', "-AMC_VERSION_${excapedMCVersion}"]
//
options.compilerArgs += ['-Xplugin:Manifold']
// println options.compilerArgs
if (p != project(":core")) {
options.release = rootProject.java_version as Integer
+1
View File
@@ -0,0 +1 @@
MC_VERSION_1_18_2=
@@ -29,21 +29,12 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IWorldGenerator;
#define CONFIG
#if MC_VERSION_1.18.2
stafdqvsrevasbhyuicwegyhio
#endif
/**
* This handles any configuration the user has access to.
* @author coolGi2007
* @version 12-12-2021
*/
#if CONFIG
public class Config
//public class Config extends TinyConfig
{
@@ -296,5 +287,4 @@ public class Config
}
}
}
}
#endif
}
+1 -1
View File
@@ -17,4 +17,4 @@ toml_version=3.6.4
manifold_version=2022.1.5
##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS:
mcVer=1.18.1
mcVer=1.18.2