Jump to content

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


SuperHB

Recommended Posts

Okay so I'm making a mod MobDrops(http://www.planetminecraft.com/mod/125-mobdrops/), I have an issue with the drops. The drops won't drop. Does anyone have the code for 1.6.2? I don't have an code except my old one... but that edits the base code, and I wouldn't like that. It would be better to have a different class file that extends it.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

ย 

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

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.

ย 

okay i'll take a look

ย 

EDIT: I took a look and didn't work...

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.