Entity spawn in villages

Started by Dodo_Studio on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Jun 2019
Points:
864

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 96
Entity spawn in villages

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

Active 10 months ago
Joined Jun 2019
Points:
2601

User statistics:

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

that isn't possible yet, sorry.

Active 3 years ago
Joined Nov 2019
Points:
869

User statistics:

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

Active 10 months ago
Joined Jun 2019
Points:
2601

User statistics:

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

you can't detect the village spawning.

Active 3 years ago
Joined Nov 2019
Points:
869

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 358
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.

Active 10 months ago
Joined Jun 2019
Points:
2601

User statistics:

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

yeah but that's coding

Active 3 years ago
Joined Nov 2019
Points:
869

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 358
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.

Active 10 months ago
Joined Jun 2019
Points:
2601

User statistics:

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

yes

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

Active 2 years ago
Joined Jul 2021
Points:
555

User statistics:

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

Active 10 months ago
Joined Jul 2021
Points:
661

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
Or you can make a new…
Mon, 09/06/2021 - 11:13

Or you can make a new procesure entity spawn, if entity=entityvillager do with %chance despawn entiy spawn entity= your entity at x y z

Active 3 years ago
Joined Nov 2021
Points:
538

User statistics:

  • Modifications: 1
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
u can make a procedure with…
Wed, 12/01/2021 - 23:02

u can make a procedure with the trigger: when entity spawns:

IF: Entity sub/type of: villager:
DO:    IF: Random:0.1< 0.15
         DO: Spawn at X Y Z (your entity)

Active 7 months ago
Joined Mar 2021
Points:
1025

User statistics:

  • Modifications: 3
  • Forum topics: 37
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 451
Much easier than all that's…
Thu, 12/02/2021 - 05:57

Much easier than all that's been said here, i'm using village spawn entity since years

On entity in natural spawn trigger use: return: does exist villager or iron golem in radius you want (for example 10 would be most of time inside village)

Just an hint for you: this works only for monster / ambient type entities not creatures. If you wanna make a creature one just use monster / ambient and despawn when joins world and spawn creature type