Jump to content

Recommended Posts

Posted

I am making a mod that uses emeralds as money and there are buyable things. However, there needs be be a way to make emeralds more obtainable, and I thought I could make hostile mobs drop emeralds with or instead of their normal drop. So I looked at some of the code of vanilla Minecraft and saw that the class EntityZombie or EntityAnimalZombie (I forgot; under package hostile) had the method getItemDrops() or something like that, and all it does is return an item (rotten flesh).

 

So I thought I could simply change the line return Item.rottenFlesh.getItemID(); to return Item.emeralds.getItemID();. However, I didn't know how I would put the class EntityZombie into the mod since the class already exists in vanilla Minecraft. Could I simply put it in the folder with the additional class files that I compiled after writing myself? Or is there another way to change the item drops of a hostile mob? I haven't fully read all the code of Minecraft or the documentation of forge so I don't really know of any other way to do this.

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.