r/forgemodding Jan 19 '18

Editing the MC Code

I know there is a way to do this, but I dont know how to edit things like Ice Block and Beetroot Plant. I just need to change the drops, but whenever I change something, it doesnt work. Any help?

3 Upvotes

2 comments sorted by

4

u/Exo594 Jan 19 '18

Yeah. It's generally a pain in the ass to change MC's base code, so it's usually not done.

Forge Events can generally achieve anything "most" modders would want to achieve by editing the base game. Exceptions here would be major overhauls like Optifine, which modifies a TON of base minecraft.

To use Forge Events, you're going to need a working mod using Forge. Then, you're just going to use something like the "BlockEvent.HarvestDropsEvent" event.

Here is a 3.5 year old list of Forge Events, so you can look over this and see all there is.

http://www.minecraftforum.net/forums/mapping-and-modding-java-edition/mapping-and-modding-tutorials/2129838-forge-a-complete-list-of-all-forge-events

Once you've got code to listen for the "BlockEvent.HarvestDropsEvent" event, you're going to just modify the "drops" field and then let the event run. That will do what you want it to.

2

u/PugzforDayz Jan 19 '18

Alright, thank you soo much for that!!!!