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

Started by FullMetalAvatar on Thu, 03/18/2021 - 15:57

Topic category: Help with modding (Java Edition)

Last seen on 19:44, 9. May 2022
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
(Help) How can I have a mob spawn near player location when a recipe is crafted?
Thu, 03/18/2021 - 15:57

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

Last seen on 01:48, 23. Aug 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 19:44, 9. May 2022
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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!