Jump to content

[SOLVED][1.6.2] [Forge] Custom Drops for Existing Mobs


Recommended Posts

Posted

I wouldn't do that. I (I am probably going to be told a better way) would use Forge events. For this specific thing I would use LivingDeathEvent. Then, checking if the entity that died was a mob I wanted to add a drop too, I would spawn a new EntityItem with the drop I wanted at the location the entity died in. Not sure how efficient it is (like I said, I will probably be told a better way), but it will work.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

I wouldn't do that. I (I am probably going to be told a better way) would use Forge events. For this specific thing I would use LivingDeathEvent. Then, checking if the entity that died was a mob I wanted to add a drop too, I would spawn a new EntityItem with the drop I wanted at the location the entity died in. Not sure how efficient it is (like I said, I will probably be told a better way), but it will work.

 

Can you give me the code? I'm kinda noobish with coding still...

 

Look at the vanilla coding (if you are using BASE classes)

 

I was hoping for not putting the code in the base class. Also I tried it. doesn't work.

 

Posted

I suggest you go look at pahimars github repository, it has a EntityLicingHandler class that has the LivingDeathEvent event. If you look around in his repository, you'll find all the things you need for your mod.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

ok

1 make a class that will handle LivingDropEvent look up at tutorials if you dont know how

2 add your drops inside the handler

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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.