How to make a mob spawn on certain blocks

Started by yorik on Tue, 07/19/2022 - 17:46

Topic category: Help with modding (Java Edition)

Last seen on 10:11, 20. Jul 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a mob spawn on certain blocks
Wed, 07/20/2022 - 10:11 (edited)

Hello. Right now I'm making a mod for minecraft and I want to make a mob that would only spawn on trees (i.e. only on leaves blocks). How could I do it?

Edited by yorik on Wed, 07/20/2022 - 10:11
Last seen on 06:50, 22. Sep 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I could be wrong but I think…
Tue, 07/19/2022 - 20:01

I could be wrong but I think after you set a mob up ( such as making it a creature/mob ) you can change the block material it spawns on via code ( I could be wrong though )

Last seen on 10:11, 20. Jul 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hm. I can't find this…
Wed, 07/20/2022 - 10:13

Hm. I can't find this parameter in the code. And so, I'm not really versed in java script code.