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.