-
Earlier today I tried to set up a development environment for ProjectRed, in order to debug an issue I was having. However, I hit a couple of stumbling blocks, and I wanted to check if they were expected or not.
I assume you're not hitting these, so wanted to check what I was doing wrong! I've included the changes which I was using to get things working, if it's helpful to explain my problems (and workarounds): diff --git a/core/src/main/resources/META-INF/accesstransformer.cfg b/core/src/main/resources/META-INF/accesstransformer.cfg
index c5baedbb..b822e9f7 100644
--- a/core/src/main/resources/META-INF/accesstransformer.cfg
+++ b/core/src/main/resources/META-INF/accesstransformer.cfg
@@ -17,3 +17,6 @@ public net.minecraft.world.inventory.AbstractContainerMenu m_182420_(II)V # upda
public net.minecraft.world.phys.shapes.VoxelShape <init>(Lnet/minecraft/world/phys/shapes/DiscreteVoxelShape;)V # <init>
public net.minecraft.world.phys.shapes.VoxelShape f_83211_ # shape
public net.minecraft.world.phys.shapes.VoxelShape m_7700_(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; # getCoords
+public net.minecraft.world.phys.shapes.ArrayVoxelShape m_7700_(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; # getCoords
+public net.minecraft.world.phys.shapes.CubeVoxelShape m_7700_(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; # getCoords
+public net.minecraft.world.phys.shapes.SliceShape m_7700_(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; # getCoords
diff --git a/gradle.properties b/gradle.properties
index 7343cc12..7795107d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,3 +1,5 @@
+org.gradle.jvmargs=-Xmx3G
+
java_lang_version=17
mc_version=1.18.2
forge_version=40.2.4
diff --git a/transmission/build.gradle b/transmission/build.gradle
index a8f0be3a..224bb9e2 100644
--- a/transmission/build.gradle
+++ b/transmission/build.gradle
@@ -11,24 +11,23 @@ minecraft {
mappings channel: mcp_mappings, version: mc_version
accessTransformer = file("src/main/resources/META-INF/accesstransformer.cfg")
runs {
- client {
- workingDirectory file('run')
+ all {
+ property 'mixin.env.remapRefMap', 'true'
+ property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
mods {
- '${mod_id}' { source sourceSets.main }
+ "projectred-core" { source project(":core").sourceSets.main }
+ "${mod_id}" { source sourceSets.main }
}
}
+ client {
+ workingDirectory file('run')
+ }
server {
workingDirectory file('run')
- mods {
- '${mod_id}' { source sourceSets.main }
- }
}
datagen {
workingDirectory file('run')
args '--mod', mod_id, '--all', '--output', file("src/main/generated"), '--existing', file("src/main/resources")
- mods {
- '${mod_id}' { source sourceSets.main }
- }
}
}
}
@@ -39,7 +38,7 @@ dependencies {
implementation fg.deobf("codechicken:CodeChickenLib:${mc_version}-${ccl_version}:universal")
implementation fg.deobf("codechicken:CBMultipart:${mc_version}-${cbm_version}:universal")
- compileOnly project(":core")
+ implementation project(":core")
}
curseforge { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Weird, considering it actually builds just fine. I typically setup up my environments manually so I can have all of the dependencies like CCL/CBM all open in the same IntelliJ workspace at the same time, so maybe this is an issue with setting it up the automatic way by just importing the Gradle project directly. If it comes down to it, I can just add those AT entries. The runs seems like a valid change. Again, I don't run it this way, so I just missed this missing runtime dep. Probably what we want is to have a single run that has all modules instead of separate ones for each module. The compileOnly -> implementation also seems like a valid change. I have it at compileOnly because I observed weird build issues at one point when a module depends on multiple modules (i.e. Fabrication module which is on another branch), but technically it should be implementation as it does have a runtime dep. I'll look more into it later today. Thanks for letting me know. |
Beta Was this translation helpful? Give feedback.
Weird, considering it actually builds just fine. I typically setup up my environments manually so I can have all of the dependencies like CCL/CBM all open in the same IntelliJ workspace at the same time, so maybe this is an issue with setting it up the automatic way by just importing the Gradle project directly. If it comes down to it, I can just add those AT entries.
The runs seems like a valid change. Again, I don't run it this way, so I just missed this missing runtime dep. Probably what we want is to have a single run that has all modules instead of separate ones for each module.
The compileOnly -> implementation also seems like a valid change. I have it at compileOnly because I obser…