Jump to content

How to - edit core classes for debugging?


TheGreyGhost

Recommended Posts

hi all

 

The new gradle setup for Forge has put the Forge and Minecraft sources into a library.  Previously I used to edit the vanilla classes to add diagnostics etc when I was trying to figure out how the vanilla worked (or more often - why my own code didn't work).

 

I'm hoping that I can still do this just by removing the forge jar from the library, extracting all the files into a test workspace, tweaking the build config (should be fun! have no idea about gradle), and editing them directly as in ye happy days of olde. 

 

Thoughts from people who know more about gradle and IDEA than me?

 

-TGG

 

 

Link to comment
Share on other sites

Sorry, I don't have an answer,

 

I was just writing to add that I, too, am curious as to how this can be done.  I have needed this ability at various points to track down strange issues or to more-closely examine how the base MC source works.

 

It would be a shame to have to set up an entire Forge/FML dev environment just to add some temporary debug output to a base-class.

Link to comment
Share on other sites

You can still put breakpoints and run client/server debug.

yeah that's true, and in 3/4 of the cases that works fine for what I need.  I'm thinking of those cases where it's more effective to modify the code to log or to see what happens if I comment out part of the code.  Especially for rendering, or for code that gets executed many times and I need to break if a particular condition becomes true.

 

I'll give the extraction idea a crack, can't be that hard surely :-)

 

Link to comment
Share on other sites

Officially, the answer is that you can't We are trying to drive home the point that modders SHOULD NOT be editing base classes.

However, if you're smart enough to setup project dependancies, and know how to keep your code seperate from the minecraft code then there is nothing stopping you from doing it.

Go forth and figure it out!

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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



×
×
  • Create New...

Important Information

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