How do i make vanilla mobs drop custom items.

Started by poguxd on

Topic category: Help with Minecraft modding (Java Edition)

Active 9 years ago
Joined Sep 2014
Points:
726

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
How do i make vanilla mobs drop custom items.

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?

Active 1 year ago
Joined Aug 2013
Points:
1163

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
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);")

Active 9 years ago
Joined Sep 2014
Points:
726

User statistics:

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

thanks i try that

Active 9 years ago
Joined Sep 2014
Points:
726

User statistics:

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

Active 1 year ago
Joined Aug 2013
Points:
1163

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
RE:RE:You can do it with event
Fri, 04/15/2016 - 22:23

@#1.1 Use (empty) GUI Overlay element.