Jump to content

Forge one-time injection


MGlolenstine

Recommended Posts

1 minute ago, diesieben07 said:

Forge is not "injecting minecraft.jar". The game code is transformed on the fly as it is loaded from disk. That is not the slow part of starting up Minecraft. The slow part is (among other things) the model creating, which just takes a long time with a lot of mods.

Oh, ok so I misunderstood the whole concept of forge :P 

But why is it creating models at every launch?

Couldn't you just store them?

Edited by MGlolenstine
Link to comment
Share on other sites

4 minutes ago, diesieben07 said:

Not necessarily. There is no easy way for Forge to know whether something in a mod has changed that would change the generated model to change. Has this config file you changed caused the Model to change? We don't know. Is this Model download from an URL which has a different model every time? We don't know.

All this prevents from Forge "just storing models". As very often in Computer Science the obvious "just do X" answer is sadly not correct.

Ok, I was wrong and I'm sorry. :P 

Link to comment
Share on other sites

  • 1 year later...

Actually, you are not wrong. I know this is a necropost, but the reason this is not wrong, is because instead of loading all the mods into the RAM, using up CPU power (older machines don't have a lot, so it takes a long time to load mods sometimes), Forge can do a 1 time load onto the hard drive, and leave it like that, and keep an MD5 checksum of every mod, and recheck the MD5 checksum every launch, and if it remains the same, just allow the game to load as NORMAL. This is the only way I can really think of, (yes, I know you can also do an SHA256 and SHA1 checksum, but MD5 is faster to calculate) and if anyone has more idea's of ways, or a way to prove me wrong, please reply to this thread. Thank you, goodbye.

Link to comment
Share on other sites

3 minutes ago, GameGlitz said:

Actually, you are not wrong. I know this is a necropost, but the reason this is not wrong, is because instead of loading all the mods into the RAM, using up CPU power (older machines don't have a lot, so it takes a long time to load mods sometimes), Forge can do a 1 time load onto the hard drive, and leave it like that, and keep an MD5 checksum of every mod, and recheck the MD5 checksum every launch, and if it remains the same, just allow the game to load as NORMAL. This is the only way I can really think of, (yes, I know you can also do an SHA256 and SHA1 checksum, but MD5 is faster to calculate) and if anyone has more idea's of ways, or a way to prove me wrong, please reply to this thread. Thank you, goodbye.

First of all, thank you for replying to this post ?. I was thinking of the same thing, with the hashing and storing everything on the HDD, but I think that the problem with mod updates isa great one, I know you could only rebuild it when mods updare, but still... Thing that I think would be the most trouble, would have to be the different mod distinction, as some mods inject directly into the code and it's hard for Forge to determine which mod the change is coming from.

 

Thanks again, and I hope that we get something along these lines in the future ?

Link to comment
Share on other sites

I think your best shot at skipping the loading screen would be to load Minecraft in a Virtual Machine and saving it's state to disk without quitting Minecraft, instead of shutting it down.

Edited by Busti

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

On 1/27/2019 at 3:08 PM, Busti said:

 

"I think your best shot at skipping the loading screen would be to load Minecraft in a Virtual Machine and saving it's state to disk without quitting Minecraft, instead of shutting it down." - Busti

 

This makes sense, as Java uses it's own Virtual Machine, called the JVM. Running another JVM inside the main JVM via the framework itself will allow us to run Minecraft once, and then save the state. Then we can launch that machine every time the game starts, but check the MD5 hash of mods and files before starting. This speeds up a LOT.

 

On 1/22/2019 at 7:10 PM, diesieben07 said:

Have you looked at how mod loading works? Probably not, because this is not feasible.

RUDE.

Link to comment
Share on other sites

  1. Forge one-time injection

    diesieben07 replied to MGlolenstine's topic in General Discussion

    Please clarify how I was rude?
  2. diesieben07

    Ore Variant Textures Not Working Properly

    diesieben07 replied to Viking 2481's topic in Modder Support

    That is literally how any programming language works...
  3. diesieben07

    Access transformers doesn't work with forge classes

    diesieben07 replied to hohserg's topic in Modder Support

    No! Don't do this. You must not be accessing the world in your model, since the model may be rendered on a different thread, so you will cause random and seemingly inexplicable crashes. Any information necessary for the model to render must be stored in the IBlockState.
  4. diesieben07

    Access transformers doesn't work with forge classes

    diesieben07 replied to hohserg's topic in Modder Support

    What are you trying to achieve? Why do you need access to this class?
  5. 1.7.10 and older are no longer supported on this forum due to their age. Update to a modern version of Minecraft to receive support. You have been told this already, consider this a warning.

 

This is a paste of all the rude things you have said, PLEASE take it down. It is very selfish.

  • Confused 1
Link to comment
Share on other sites

Updates are not required, as what I am talking about is different. If you intergrate a VM for forge to load mods, and then pass the session over to the JVM on the host computer, it is possible. I have started to experiment in Eclipse, and I have to say I am VERY close to getting this core-mod to work.

Link to comment
Share on other sites

I have actually done it. This core-mod still isn't ready for production, but it works PERFECTLY for me. What I have done is created a Linux distro that contains a very simple architecture (just Java on Arch Linux) which will boot up at Minecraft's start, and then reload mods to the drive if the MD5 hash of any files have changed (apart from the Minecraft settings and Optifine settings). Then, it will hibernate the VM, and then put the session onto a container on the main PC, which will put you on a loading screen overlaying the title screen, which will then take the session out of the container, and close Minecraft, replacing it with the loaded modded version. Then it will close the container, and leave the VM hibernated. This is a very complicated method, and if you manually delete the VM files from the .minecraft\config\GameGlitzVM\ folder, it will have to load each mod again, resulting in no difference of load times. However, when you close the game, shutdown your computer, leave it for 2 mins, and boot it back up, then launch Minecraft, it will automatically restore the session into a container, then onto the host computer.

I am now working on a re-auth system to auth you to the official Minecraft servers again, so that you can play on servers (else what is the use). I have seen a mod called ReAuth that does what I need, but it requires you to enter your account details, so I will find a way to use the account that the launcher used to start the game. Please reply with any way to help me reauth.

Link to comment
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.
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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My journey into crypto trading began tentatively, with me dipping my toes into the waters by purchasing my first Bitcoin through a seasoned trader. With an initial investment of $5,000, I watched as my investment grew, proving to be both fruitful and lucrative. Encouraged by this success, I decided to increase my investment to $150,000, eager to capitalize on the growing popularity of cryptocurrency, However, as cryptocurrency gained mainstream attention, so too did the number of self-proclaimed "experts" in the field. Suddenly, everyone seemed to be a crypto guru, and more and more people were eager to jump on the bandwagon without fully understanding the intricacies of this complex world. With promises of quick and easy profits, these con artists preyed on the uninformed, luring them into schemes that often ended in disappointment and financial loss. Unfortunately, I fell victim to one such scheme. Seduced by the allure of easy money, I entrusted my hard-earned funds to a dubious trading platform, granting them access to my accounts in the hopes of seeing my investment grow. For a brief period, everything seemed to be going according to plan, with regular withdrawals and promising returns on my investment. However, my hopes were soon dashed when, without warning, communication from the platform ceased, and my Bitcoin holdings vanished into thin air. Feeling helpless and betrayed, I confided in a family member about my predicament. They listened sympathetically and offered a glimmer of hope in the form of a recommendation for Wizard Web Recovery. Intrigued by the possibility of reclaiming what I had lost, I decided to explore this option further. From the moment I reached out to Wizard Web Recovery, I was met with professionalism and empathy. They took the time to understand my situation and reassured me that I was not alone in my plight. With their guidance, I embarked on a journey to reclaim what was rightfully mine. Wizard Web Recovery's expertise and dedication were evident from the start. They meticulously analyzed the details of my case, uncovering crucial evidence that would prove invaluable in our quest for justice. With each step forward, they kept me informed and empowered, instilling in me a newfound sense of hope and determination. Through their tireless efforts and unwavering support, Wizard Web Recovery succeeded in recovering my lost Bitcoin holdings. It was a moment of triumph and relief, knowing that justice had been served and that I could finally put this chapter behind me. In conclusion, My experience with Wizard Web Recovery  was nothing short of transformative. Their professionalism, expertise, and unwavering commitment to their clients set them apart as true leaders in the field of cryptocurrency recovery. I am forever grateful for their assistance and would highly recommend their services to anyone in need of help navigating the treacherous waters of cryptocurrency scams. 
    • Ok so: Two things to note: It got stuck due to my dimension type. It was previously the same as the overworld dimension tpye but after changing it , it didn't freeze during spawn generation. ALSO, APPARENTLY, the way I'm doing things, the game can't have two extremely-rich dimensions or it will make the new chunk generation be veeery VEEERY slow. I'm doing the dimension file genreation all in the data generation step now, so it's all good. Mostly. If anybody has any tips regarding how can i more efficently generate a biome-rich dimension, im all ears.
    • https://mclo.gs/qTo3bUE  
    • Check for the mods ingame - create a new world in creative mod and check the creative inventory  
    • I installed forge 49.0.22 with Minecraft 1.20.4 because I want to play this mod: AgeOfWeapons-Reforged-1.20.4-(v.1.3.3) I able able to launch forge from Minecraft launcher but then the menu doesn't show the "mods" button. The menu says 3 mods are loaded even though I have 2 mods in the mods folder. When I start the game it seems that the AgeOfWeapons mod isn't loaded, but I can't be sure. How can I check which mods are loaded so that I can play with the AgeOfWeapons mod?
  • Topics

×
×
  • Create New...

Important Information

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