How to change mob drops?

Started by FireBlast on

Topic category: Help with modding (Java Edition)

Last seen on 01:19, 22. Jul 2016
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.

Last seen on 22:13, 3. Apr 2024
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.

Last seen on 17:09, 29. Mar 2017
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);
     }
 

Last seen on 08:11, 6. May 2018
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"

Last seen on 13:10, 28. Nov 2021
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.

 

Last seen on 18:31, 5. Sep 2022
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?