Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • Nashorn
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Damon

Nashorn

By Damon, November 23, 2020 in General Discussion

  • Reply to this topic
  • Start new topic

Recommended Posts

Damon    0

Damon

Damon    0

  • Tree Puncher
  • Damon
  • Members
  • 0
  • 6 posts
Posted November 23, 2020 (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 November 23, 2020 by Damon
Removed the Header sublink of the zgc Link
  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7696

diesieben07

diesieben07    7696

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7696
  • 56376 posts
Posted November 23, 2020

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.

  • Quote

Share this post


Link to post
Share on other sites

Damon    0

Damon

Damon    0

  • Tree Puncher
  • Damon
  • Members
  • 0
  • 6 posts
Posted November 23, 2020
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?

 

 

 

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7696

diesieben07

diesieben07    7696

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7696
  • 56376 posts
Posted November 24, 2020

I don't think there are other fundamental issues like the module system that lie ahead now. How can I say that? Well, during the 1.13 update Forge rewrote much of its internal tools and infrastructure, such as the whole loader (the new "CoreMods" repository is part of that). This new system uses much more standard Java mechanics instead of the "ugly hacks" that were employed previously (which ceased to work on Java 9).

 

11 hours ago, Damon said:

I never thought about users playing Minecraft on rigs that support Java 8 to their max, however.

That's not what I am saying. What I am saying is that Mojang ships Java 8 in their launcher, so that is what they target and what Forge must target as well, at least as the main target.

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • brok4d
      OBJ MODELS

      By brok4d · Posted 36 minutes ago

      Hello, this mod is the source, you have to get boredhttps://gitlab.com/Lycanite/LycanitesMobs
    • JayNeedsHelp
      Logger not working

      By JayNeedsHelp · Posted 1 hour ago

      So I'm currently creating a forge mod and I'm having an issue where the console stops logging after some errors. It seems to be connected to the access transformers that I'm using as before I added at's my console was working fine.   Here is my at file:  public-f net.minecraft.client.Minecraft session public net.minecraft.client.Minecraft timer public net.minecraft.client.gui.GuiScreen buttonList public net.minecraft.util.Timer tickLength public net.minecraft.network.play.client.CPacketPlayer onGround public net.minecraft.network.play.server.SPacketEntityVelocity motionX public net.minecraft.network.play.server.SPacketEntityVelocity motionY public net.minecraft.network.play.server.SPacketEntityVelocity motionZ public net.minecraft.network.play.server.SPacketExplosion motionX public net.minecraft.network.play.server.SPacketExplosion motionY public net.minecraft.network.play.server.SPacketExplosion motionZ public net.minecraft.client.renderer.entity.RenderManager renderPosX public net.minecraft.client.renderer.entity.RenderManager renderPosY public net.minecraft.client.renderer.entity.RenderManager renderPosZ   Any help is greatly appreciated thank you!
    • cadbane86140
      Minecraft: Hunger Games Game #36- Shear FIGHT!

      By cadbane86140 · Posted 2 hours ago

      Hello There! Today we are back on Hunger Games after a little break but we are finally back! In this episode we are on the good ol' map Survival Games 4 and it ACTUALLY went well for once. Also we have so many great battles on rooftops, small rooms and just out in the open! We also use shears to fight at one point and that was pretty crazy! There are so many hilarious moments in this episode that I know you guys are gonna love! I hope you all enjoy this video and if you did don't forget to like and sub for more Hunger Games in the future!  
    • Sad Whale
      Game crashes whenever I try to increase the RAM

      By Sad Whale · Posted 2 hours ago

      latest.log
    • diesieben07
      Game crashes whenever I try to increase the RAM

      By diesieben07 · Posted 2 hours ago

      In the logs folder of your game directory.
  • Topics

    • Milk_Shak3s
      1
      OBJ MODELS

      By Milk_Shak3s
      Started 16 hours ago

    • JayNeedsHelp
      0
      Logger not working

      By JayNeedsHelp
      Started 1 hour ago

    • cadbane86140
      0
      Minecraft: Hunger Games Game #36- Shear FIGHT!

      By cadbane86140
      Started 2 hours ago

    • Sad Whale
      6
      Game crashes whenever I try to increase the RAM

      By Sad Whale
      Started 3 hours ago

    • Unusualty
      0
      GUI'S and player editing

      By Unusualty
      Started 2 hours ago

  • Who's Online (See full list)

    • xcheetoezx
    • brok4d
    • Twu
    • dresacraft
    • Sad Whale
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • Nashorn
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community