How to change mob drops?

Started by FireBlast on

Topic category: Help with Minecraft modding (Java Edition)

Active 8 years ago
Joined Apr 2015
Points:
719

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
How to change mob drops?

I want that a zombie drop rotten flesh and bones, and the chicken just drops raw chicken.

Is there some way to change the mobs drops?

P.S: Sorry for my bad English, i'm not from US or UK.

Active 12 months ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
RE:RE:You DON'T must make new mobs.
Wed, 03/29/2017 - 16:37

@#2.3 Actually, I use it for few months for all entities and it didn't happen. You would have to use LivingUpdateEvent.

Active 8 years ago
Joined Jul 2015
Points:
712

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
RE:RE:RE:You DON'T must make new mobs.
Wed, 03/29/2017 - 17:09

@#2.3.1 yeah I've had a look at it, it seems more logical to call it on the LivingDeath event but it's just what the event is called.

however, I've been trying this myself (I'm manually coding in Intellij though) and I got it to work, but somehow it tends to spawn items that can't be picked up and I have no idea what's causing this nor how to fix it.

the code:
if (event.EntityLiving instanceof EntityMob) {
         event.entityLiving.dropItem(Item.getItemById(12), 1);
     }
 

Active 6 years ago
Joined Apr 2014
Points:
721

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
RE:You DON'T must make new mobs.
Fri, 06/02/2017 - 12:59

@#2 could you help me out with what you said please. I'm not sure what you mean by "overlay"

Active 3 years ago
Joined Jun 2014
Points:
730

User statistics:

  • Modifications: 1
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
Hi, personnally i've tried…
Fri, 06/01/2018 - 19:20

Hi, personnally i've tried this method and it doesn't work for me..
I have this error :

C:\Pylo\MCreator179\forge\build\sources\main\java\mod\mcreator\mcreator_overlayTest.java:23: error: cannot find symbol
{ public void playerKilledZombie(LivingDropsEvent event)
                                 ^
  symbol:   class LivingDropsEvent
  location: class GUIRenderEventClass
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Can you help me please ? Thanks a lot.

 

Active 2 years ago
Joined Aug 2021
Points:
479

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
I am trying to make Wither…
Mon, 09/27/2021 - 20:31

I am trying to make Wither Skeletons drop Withered Bones instead of regular bones, any way to do that?