Entity spawn in villages

Started by Dodo_Studio on Mon, 04/20/2020 - 12:47

Topic category: Help with modding (Java Edition)

Last seen on 19:13, 4. Jul 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Entity spawn in villages
Mon, 04/20/2020 - 12:47

So i want to make a mob that spawns in a vanila village how do i make that?

Last seen on 23:22, 10. Jul 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
that isn't possible yet,…
Mon, 04/20/2020 - 13:28

that isn't possible yet, sorry.

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You can make your mob spawn…
Tue, 04/21/2020 - 10:41

You can make your mob spawn just outside the village and let him run in the village

Last seen on 23:22, 10. Jul 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
you can't detect the village…
Tue, 04/21/2020 - 12:09

you can't detect the village spawning.

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Villages are fixed once a…
Tue, 04/21/2020 - 12:36

Villages are fixed once a world is created. In your entity class, override getCanSpawnHere and use this.world.getVillageCollection().getNearestVillage to find nearest village, then allow your mob to spawn if it is n blocks away from the village center.

Last seen on 23:22, 10. Jul 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yeah but that's coding
Tue, 04/21/2020 - 23:52

yeah but that's coding

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
well you gotta write code at…
Sun, 04/26/2020 - 13:31

well you gotta write code at some point. mcreator is just a starting point for beginner modders learning to mod, it creates a simplified build environment for people that don't know how to set it up, and acts like a tutorial in many ways. but in the long run if you want to make a mod that really does things you will need to code.

Last seen on 23:22, 10. Jul 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yes but just sayin that this…
Sun, 04/26/2020 - 13:48

yes

but just sayin that this isn't possible with just mcreator

Last seen on 20:48, 4. Aug 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Alternatively, you can add a…
Sun, 08/01/2021 - 18:27

Alternatively, you can add a 'custom spawning condition' on the spawning tab of the entity which includes the 'check for block in 6x6x6' procedure template with the Block being defined as the Bell (found naturally spawning in the center of villages and uncraftable without mod or datapack) which uses the if statment to 'Returns true' if it is found, and put  'Return false' under that so it defaults to false, so it'll only spawn in that 6x6x6 box in the center of town... That'swhat I did for a mod I am making.

https://pale-crusader.github.io/Shared_Images/VillageBell.JPG