Jump to content

Recommended Posts

Posted (edited)

Wait!

Before you post "stop using newer java", this thread isn't meant exactly for that - it's more that I'm curious, so this is more an essay than a complaint or anything.

 

The last time I've been heading into the guts of Forge-modded Minecraft was before I started an apprenticeship, however I recently caught the news that Java 15 now saw the light of the day - and that there's a new garbace collector coming with it (sort-ish).

 

The collector I'm talking about is the Z-Garbage Collector, but I won't go into details about it. If you're curious as well, go here (I think it's super intriguing!).

And as all things go, curious me installed the latest openjdk version (can't be bothered to take the Sun JRE - yet), just to be greeted with what had been coming with Java 11 (?): Nashorn is no more! And, well, as was my Minecraft process. 
Forge's Coremod Engine appears to depend on it in some way.

 

In particular, it appears that loading coremods is what causes the coupling, which is surprising for me.
As far as I know, Nashorn is a Javascript Engine and I'd normally expect to see one of those in the vincinity of the Web APIs I build at my workplace, so why should it end up in Minecraft, out of all places?

Well, I did some more research.

 

I started out with looking for the CoreModEngine class on GitHub, only to find it not being located in Forge itself.

Then were does it come from? Here!

 

Core Mods, according to the project description, are supposed to only do replacements of certain hardocded things. Well, that's at least how much has settled in my mind from briefly skimming the introduction, but it also stated that coremod loading is based on Javascript because of exactly this reason: Keep the core-modding clean(er)(ish)(I think?).

 

But what does this mean for Forge? Well, I think it is safe to say that Forge depends on the CoreMod part. This means that if Forge considerd to add support for newer Java versions, the CoreMod part would need to be updatet.

Updating, however, doesn't necessarily mean that Nashorn must be replaced!

 

OpenJDK has a repo up for Nashorn exclusively, you can check it out here.

Whether or not that will be enough for the module stuff introduced in a version after 8 (lost interest in Java around that time) is something I cannot assess, however I think that we might be able to, well, actually do that.

 

Possibly.

 

If this cannot be done for some reason my lacking experience disallows me to comprehend, well, it'd mean that the respective could would need to be replaced, which seems like a PITA, just judging from what I have seen so far.


 

But that sums it up for this post!

 

 

Best Regards.

Edited by Damon
Removed the Header sublink of the zgc Link
Posted
2 minutes ago, diesieben07 said:

Most of what you have said the Forge team is well aware of :) In fact the CoreMod repository is made by the same people who write Forge, it is only used by Forge.

There have already been plans for replacing Nashorn with Rhino, prior to the announcement of OpenJDK continuing Nashorn as a standalone project.

 

And you can trust that Forge will work on Java 15 and beyond at some point - it is just not the highest of priorities, after all Mojang still targets and ships Java 8.

Let me apologize first, I didn't mean to make it sound like you guys wouldn't know about this already!

 

I tried to skim the forums for a little but stopped after page 2 of the search results 😅

However, I wanted to write down my process of thought so that any other curious User, who has wondered about the same things, might stumble upon this one day.

That is, by the way, why I really hope that the information I amassed up is correct.

 

But despite the danger of drifting into off-topic here: How many other bigger issues with Java version bumps are out there, still? The module aspect is what I could imagine, but were any other bigger changes introduced since the release of Java 9/10?

 

I never thought about users playing Minecraft on rigs that support Java 8 to their max, however. I remember that Mojang did the Version bump to Java 8 with the knowledge that, iirc, less than 1% of the playerbase was still on Java 7.

 

Assuming this is actually an issue: Would Mojang be willing to share such information with the dev team?

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.