Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to course page

Forging a Minecraft mod

Basic Minecraft modding with Minecraft Forge

Changing vanilla drops

  • 2014-03-20 14:45:43
    Hey guys, for my mod I wanna make tall grass drop some of my mod crops (f.e. like Natura)
    How do you change vanilla item drops?
    I tried looking in Natura source code, but I didn't find anything :(

    Really would like some help :)
  • 2014-03-20 22:30:40
    You will have to use forge events, which will allow you to run some code when a certain thing happens and one of those events is when tall grass are destroyed. Check out this link here: http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/ and this one for the full list of events: www.minecraftforge.net/wiki/Event_Reference
  • 2014-03-21 14:15:30
    Thanks, man!

    BTW, is there an actual event for destroying tall grass or do I have to use a destroying event and test if it's tall grass?
  • 2014-03-21 17:19:30
    I think there is an event dedicated to it, yeah. The list I gave you seems to be slightly out of date. As in that list was made for Forge: 6.4.0 and the latest version is 9.11.1.
  • 2014-03-21 17:22:23
    Yeah, if you go into the minecraft src in your dev environment and navigate to: net.minecraftforge.event.world; You will see a class called: BlockEvent That is the one you want, it has an event inside it which is called when a block goes to drop it's items. You can do a simple check within the event to see if it is the block you want and then drop your items.
  • Log in or sign up to reply to this thread