Started by
Kleiders
on
Topic category: Help with Minecraft modding (Java Edition)
Those are the code lines that I have for my modifier system, but it's only 2/5 of the code and I think that it having already 6544 lines is a lot, is there anyway to simplify it?
It can indeed be optimized, but I would recommend doing it from scratch manually.
Code generator needs to adapt to the fact Java is hard typed language but blocks are not, that there are many more checks required to ensure reliability in all block combinations so there is much longer code needed to account for all situations where ceratin blocks might be used.
Optimizing such code to the extent of hand-written code is simply not possible with the current advancements in the code generation technologies possible.
You could split the procedure into smaller parts too.
In many cases, the whole blocks structure can be optimized too and the code will be shorter too.