Jump to content

How to make a Core mods


Mew

Recommended Posts

I was wondering, how would I go about making a core mod? From what I understand, core mods allow you to "edit" base classes without actually editing them. And if that is true, then I definitely need it for my mod.

 

And I believe this is done with ASM transformers? How would I use those?

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

I've never made one, but it looks like you just sort of... compile your replacement code and paste it into the .class file, or perhaps the memory image of the class file? Like with any bytecode, if you literally just write in instructions after an instruction in the bytecode, then those instructions you added will happen ater the one you inserted after, and before the one after that. (conditionals nonwithstanding)

Link to comment
Share on other sites

Hmm... maybe....

 

 

What I really want to know is what a core mod does, and what are good uses for them

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

Hmm... I'm thinking that if I want to give the vanilla items custom abilities then I should use this...

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

So, what are good uses for core mods?

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

So, what are good uses for core mods?

 

Well, my future coremod will inject a new method in the Item class, which gets called by injected code in the EntityPlayerSP class. Also it creates some public getters and setters for stuff. But it's more worth it if you actually want to inject or edit a code snippet / a (new) method / interface / etc.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

Ahh. Thank you good sir. Jolly good show wot?

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

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.