(Help) How can I have a mob spawn near player location when a recipe is crafted?

Started by FullMetalAvatar on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Help) How can I have a mob spawn near player location when a recipe is crafted?

Hiya!
I'm really new to modding, and I am going to be learning how to code properly from skillshare in the near future, but if someone can help me with this topic I'd really appreciate it!

I basically want to add a procedure into a test mod I'm making for my friends, which will spawn a custom entity around the players location when they craft a certain food recipe. They'll craft a 'chicken wrap' and this doing this will spawn a mob that will try and steal the wrap from you (i've already made the stealing procedure that works) I just need to work out how to spawn the mob! I'm really stuck and have tried a few different ways of doing it with no success, so this is a last minute call for help if anyone has any advice!

I appreciate the time, thank you in advance! <3

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
when item is crafted global…
Thu, 03/25/2021 - 06:36

when item is crafted global trigger

if provided itemstack = chicken wrap

spawn the entity

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This helped me so much! I…
Sat, 03/27/2021 - 00:51

This helped me so much! I really appreciate you replying, thank you!