Jump to content

Add Rare Drops to existing Mobs


Tsiumi

Recommended Posts

Hello and sry 4 my silly questions again. xD

I tried a normal drop as well but it dont works..

I'm familiar with the codes from 1.6... but 1.8 is different. v.v

I tried to update the 1.6 code to 1.8:

public class ItemLooting {
    public static double rand;
    public Random r = new Random();


    public void onEntityDrop(LivingDropsEvent event) {
  	  if(event.entityLiving instanceof EntityCreeper) {
  		  event.entityLiving.dropItem(BasicEWM.fireCore, r.nextInt(2));
  	  }
    }
            
}

And add this to my ModDatabase:

MinecraftForge.EVENT_BUS.register(new ItemLooting());

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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.