Jump to content

Forge live development?


whitephoenix

Recommended Posts

I saw Ichun's video here:

 

And I noticed that he changed his code and then just un-minimized minecraft, e.g. he already had it running, as I though you had to restart minecraft everytime which takes about 30sec-minute each time, how is this done? It would be a pretty big time saver.

Link to comment
Share on other sites

This is nothing forge specific. You need to run Java in debug mode (google) and voila, you have hot-swap support.

 

Actually I have another question. I googled it and I think I understand most of the basics, breakpoints mean suspend when code is encountered... etc.

 

So in this image...

 

Ob574.jpg

 

 

I think I set it up correctly, but say for example I want to change the healAmount (not sure if right name, the amount of food bars it gives) of the item for the class open in eclipse (hotbar slot 1) from 6 to 20, from what I understand, I need to change it in the variable view, but the variable area is empty, so how would I do this?

Link to comment
Share on other sites

The debug views allows to instantly import SOME changes of the code directly into a running java programm.

Best example (for minecraft) is developing a GUI. If u got a GUI opened the draw method is called every.. frame or tick im not sure I think it was frame.

Which means if u change something in the draw method it is changed with the next draw, which is quite fast.

Some other chings might not be changed, like creation of a new method.

Also some things might not other things might not work. Like setting the amount a food you get by eating something if you set it in the constructor.

This is because the constructor is only called ONCE and that is when setting up minecraft to get started.

Hope this helps you a bit.

 

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.



×
×
  • Create New...

Important Information

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