MCreator Max Mod Elements

Submitted by KreatorB on Thu, 09/27/2018 - 13:20
Issue description

Hello Klemen,

I know your busy and do not want to bug you with possible bugs, but felt this one was a bit warranted!

So My mod is basically very large as it has become 2 in one and I will be splitting it apart to manage it better and resolve the following issue. However, before I did that I came across this a Gradle Error which I posted below. I have noted that this error occurs when I hit 1395 Mod Elements, if I delete one element the Gradle can preform as required.

Now I can provide you with a copy of the file if you like but am uncertain you would need it to recreate the bug, but if you do tell me where to send it as I would rather not share my file with everyone.

Also due to the fact that I have come across this issue, I had a few questions that might be considered ideas for future releases.

1. is there a way to delete multiple elements from the work-space at once as to speed the process of separating the mod?

2. Is it possible to make multiple Mods dependent of one another, example Mod1 has elements that Mod2 would need in order to function?

Thank you for all you time and effort

KreatorB

 

C:\Pylo\MCreator180\forge\build\sources\main\java\mod\mcreator\testenvironmentmod.java:4227: error: code too large
    public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
                ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

 

 

NOTE; Once I had 1394 items the Gradle compiled as needed. OutPut BElow

Executing gradle command: clean build
Build info: MCreator 1.8.0, 64-bit, 16335 MB, Windows 10, JVM 1.8.0_172
C:\Pylo\MCreator180\forge>gradlew -Dorg.gradle.daemon=true -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xms6144m -Xmx10240m" clean build 
This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
:clean
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
:compileJava
:processResources
:classes
:jar
:sourceTestJava
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:getVersionJson
:extractUserdev
:genSrgs SKIPPED
:reobfJar
:extractAnnotationsJar
:extractRangemapReplacedMain
C:\Pylo\MCreator180\forge\build\sources\main\java
:retromapReplacedMain
remapping source...
:sourceJar
:assemble
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 17 mins 37.187 secs
C:\Pylo\MCreator180\forge>
Task completed with return code 0 in 1057828 milliseconds

Issue comments

Submitted by Klemen on Thu, 09/27/2018 - 17:10

This is a very critical bug. I am not sure how we will fix this yet, but it would help me a lot if you could share your workspace file with me. You can send it to support (at) pylo.co so we can use it for testing. Thanks!

Submitted by Klemen on Thu, 09/27/2018 - 17:11

Regarding a way to delete multiple elements at once, we will consider implementing this too.

Submitted by Klemen on Sat, 10/13/2018 - 11:41

I have fixed this bug. New mod element limit is 65535 mod elements which is the number of elements where this will be the last issue to worry about. The fix will be released in MCreator 1.8.1.

Keep in mind that this change affects the format of mod elements, so mod elements with code locked will have to be manually updated to extend ModElement class like this:

public class mcreator_customModElement extends testenvironmentmod.ModElement {

 

so any element code we locked, will have to have this snippet of code (public class mcreator_customModElement extends testenvironmentmod.ModElement {) put into the element manually. 

Is this CORREECT?  if so is there a specific area the code need to be placed or will it be at the end of element code?

No, this was just example. If you had this line before:

public class mcreator_customModElement {

you will have to change it to

public class mcreator_customModElement extends testenvironmentmod.ModElement {

But keep in mind this won't work in 1.8.0, this will be the change in 1.8.1.

As far as locking goes, in case of your workspace, you have a lot of unnecessary code locks. You should only lock code if you have a very good reason for this because if you lock code, the mod won't be able to update, fix all the bugs that are fixed in updates and upgrade to new versions of Minecraft.

okay, so I have unlocked all elements and when I update to 1.8.1 I will need to check every element, if it has the following line of code

public class mcreator_customModElement {

I will need to change that old code to the following new one.

public class mcreator_customModElement extends testenvironmentmod.ModElement {

Thank you

If you have all elements unlocked, you don't need to do anything as MCreator will do this change for you. But if you have mod elements that are locked, MCreator can't update the code and you have to do it manually.