How to change mob drops?

Started by FireBlast on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined Jul 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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);
     }
 

Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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"

Joined Jun 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

 

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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?