Jump to content

[1.6.4] Can I change vanilla Minecraft files?


NNJAWarfare

Recommended Posts

Hi, I used to mod Minecraft using ModLoader and it let you change something in the games vanilla files (like EntityCreeper.java, for example) and it would change it when you installed the mod. I was just wondering, is there a way to do this in forge? I have changed something in the vanilla file and it works in the eclipse run option but when I install the mod into the actual game, the changes are not there.

Link to comment
Share on other sites

Never modify base classes as it makes your mod incompatible with other mods and 95% of what you need to do can be done without base edits. However on the off chance you actually need to change a base class you should use Asm byte code manipulation which you can find tutorials for just by a google search.

Link to comment
Share on other sites

Note:

ASM is superadvanged Java and requires an intimate knowledge of compiled Java bytecode.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Never modify base classes as it makes your mod incompatible with other mods and 95% of what you need to do can be done without base edits. However on the off chance you actually need to change a base class you should use Asm byte code manipulation which you can find tutorials for just by a google search.

 

The mod I'm making (I should say updating from ModLoader to Forge) isn't exactly the kind of mod you use with other mods. It's more of a mod that you screw around with and have fun, nothing too serious. Even if it's the only mod installed, will I still have to use ASM? I've also been told that using an event handler (ex: MinecraftForge.EVENT_BUS.register(new EntityLivingHandler()); ) can be used instead of changing vanilla files. Should I use something like that instead?

Link to comment
Share on other sites

Pre-gradle you can modify the base classes to your heart's content without ASM.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

]But keep in mind that if you do that, it'll be a PITA to install your mod.

Maybe you should tell us, what you want to achieve and why you think you need to edit base classes. Forge has hooks for a lot of stuff, and most of the time you don't need to actually edit base classes.

 

This is my mod I'm updating from ModLoader to Forge: http://www.planetminecraft.com/mod/modloader-unnecessary-explosions-mod/

 

Basically when a mob/entity does something (such as a chicken laying an egg, an arrow hits something) it generates an explosion. So it's pretty much finding where these events happen in the base code and adding an explosion.

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.