The source code for Advanced Creation mod for Minecraft 1.12.2 This version uses forge-1.12.2-14.23.5.2855 which is important for the core mod to work
Much of this README is outdated information. I can't get the dev environment to run anymore due to the mixins giving errors that I have, thus far, been unable to resolve.
Author: ChryonicWolf
-
extendPlayerReach transformerfunction in GeneralTransformers is no longer necessary instead:
- SPPlayerProperties.updatePlayerProperties(TickEvent.PlayerTickEvent event)
contains the line:event.player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).setBaseValue(ModPlayerControllerMP.getCustomReachDistance()); - MPPlayerProperties.updatePlayerProperties(TickEvent.PlayerTickEvent event)
contains the line:event.player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).setBaseValue(ModPlayerControllerMP.getCustomReachDistance());
instead of :if (event.player instanceof EntityPlayerMP) ((EntityPlayerMP) event.player).interactionManager.setBlockReachDistance(ModPlayerControllerMP.getCustomReachDistance());
- SPPlayerProperties.updatePlayerProperties(TickEvent.PlayerTickEvent event)
-
The moveRelative function in Entity that is transformed by allowRelativeMovement transforming GeneralTransformers has been overrided by the child Class EntityLivingBase so:
- allowRelativeMovement now transforms EntityLivingBase to call the parent method in Entity
- AllowEntityRelativeMovement does the transformation of the Entity class with the exact same code as in 1.12
With the use of the ASMHelper as submodule in git you need to follow different steps to setup a working workspace
-
Load the project as a gradle project
Intellij should ask you if you want to load it as a gradle project when you first open it -
setup decomp workspace
gradlew setupDecompWorkspaceWith me the terminal command didn't work but the gradle task via the intellij interface did. -
build the project using the normal gradle build task !!The Build task should fail with a "duplicate entry" error. Its purpose will still be complete.
-
setup intellijRuns
gradlew genIntellijRuns
DCEVM hotswapper allows you to reload changed classes during debug run including new methods and classes£.
-
downloaded DCEVM installer: https://github.com/dcevm/dcevm/releases/tag/light-jdk8u181%2B2
-
Change the JRE used on the Minecraft Client run configuration to the 8u181 version.
-
Change the projectsettings => buildtools => gradle to the 8u181 jdk
-
change the Minecraft Client run configuration VM arguments to:
-Dfml.coreMods.load=com.deadtiger.advcreation.plugin.AdvCreationCorePlugin -Xmx4G -Xms3G -XXaltjvm=dcevm -XX:+UnlockExperimentalVMOptions
(needed to apply accessTransformers see *_at.cfg file)
-
setup decomp workspace
gradlew setupDecompWorkspace -
setup intellijRuns
gradlew genIntellijRuns
notes:- if the gradlew genIntellijRuns give a NullPointerReference error, refresh gradle and run genIntellijRuns via the intellij GUI gradle view
(Has a bug where dependencies are not refreshed(can't find mod resourceLocation (assets)))
1.Make sure the following lines are in the build.gradle file at the bottom
(not in processResources just the bottom)
sourceSets {
main { output.resourcesDir = output.classesDir }
}
-
setup decomp workspace with refreshed dependencies
gradlew setupDecompWorkspace idea --refresh-dependencies -
setup intellijRuns (Might not be necessary but can't hurt)
gradlew genIntellijRuns
notes:
- to build the jars you have to comment out the lines in step 1 and run step 2 again and delete the ".gradle" and "build" folders before running the build task
-
make sure you have "add VM options" enabled in the "modify Options" dropdown box in the "edit configurations..." menu of the Minecraft Client task
-
add the following to the VM options :
-Dfml.coreMods.load=com.deadtiger.advcreation.plugin.AdvCreationCorePlugin -XX:+UnlockCommercialFeatures -Xmx4G -Xms3G -
make sure you have "use classpath of module" enabled in the "modify Options" dropdown box in the "edit configurations..." menu of the Minecraft Client task
-
choose "advancedcreation.main" as classpath
-
gradle task cleanCache
gradlew cleanCache -
gradle task setupDecompWorkspace
gradlew setupDecompWorkspace
This should work I think.
-
gradle task cleanCache
gradlew clean -
gradle task setupDecompWorkspace
gradlew buildDependents
an error like this:
Client thread/ERROR] [FML]:
There was a problem reading the entry module-info.class in the jar
C:\Users\Liplum\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-analysis\6.2\
c7d9a90d221cbb977848d2c777eb3aa7637e89df\asm-analysis-6.2.jar
- probably a corrupt zip
net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentExceptiongradlew clean
Fix:
this doesn't always work
Good Fix!:
- Set java environment variable to jdk1.8.0_181: do this by removing all java paths in the path system variable and adding C:\Program Files\Java\jdk1.8.0_181\bin instead https://www.geeksforgeeks.org/how-to-set-java-path-in-windows-and-linux/
- Set JAVA_HOME system environment variable to C:\Program Files\Java\jdk1.8.0_181\
- Set the gradle setting in Intellij to C:\Program Files\Java\jdk1.8.0_181
- Set the run configuration compiler to C:\Program Files\Java\jdk1.8.0_181
- probably because JAVA_HOME is not set to the right version of java
left arrow: 203
down arrow: 208
right arrow: 205
up arrow: 200
page up: 201
page down: 209

