How do i make vanilla mobs drop custom items.

Started by poguxd on Sat, 04/09/2016 - 23:22

Topic category: Help with MCreator modding

Last seen on 21:20, 18. Apr 2016
Joined Sep 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How do i make vanilla mobs drop custom items.
Sat, 04/09/2016 - 23:22

i am making a food mod but i don't know how to get pigs to drop bacon and ham. anyone know if you can do that in mcreator?

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
You can do it with event
Sat, 04/09/2016 - 23:32

You can do it with event handler. Put there "LivingDropsEvent" event , check for the mob (for example "EntityPig") and put here code for drop item. (for example "    event.entityLiving.dropItem(Items.bone, 4);")

Last seen on 21:20, 18. Apr 2016
Joined Sep 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
thanks i try that
Sun, 04/10/2016 - 13:35

thanks i try that

Last seen on 21:20, 18. Apr 2016
Joined Sep 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:You can do it with event
Fri, 04/15/2016 - 20:51

@#1 hold on which event handler and where it is? still kinda new to this program

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
RE:RE:You can do it with event
Fri, 04/15/2016 - 22:23

@#1.1 Use (empty) GUI Overlay element.