2

How to make a custom mob spawn?

Zulfish's Avatar Zulfish9/4/22 3:34 am
9/4/2022 7:57 am
Zulfish's Avatar Zulfish
I made an evoker that can use a totem of undying, a very simple mob and I want it to have a chance to spawn instead of a normal evoker how do I do it?
Posted by Zulfish's Avatar
Zulfish
Level 43 : Master Fish
32

Create an account or sign in to comment.

5

3
09/04/2022 3:39 am
Level 67 : High Grandmaster Bear
Silabear
Silabear's Avatar
You have to run a random chance predicate as newly spawned evokes and it it return true turn them into your custom one.
1
09/04/2022 4:36 am
Level 43 : Master Fish
Zulfish
Zulfish's Avatar
Oh ok but how do I do that
2
09/04/2022 4:50 amhistory
Level 67 : High Grandmaster Bear
Silabear
Silabear's Avatar
tick:
execute as @e[​type=evoker,tag=!spawned] at @s run function <namespace>:spawn_check

spawn_check:
execute if predicate <namespace>:<random chance predicate> run function <namespace>:spawn
tag @s add spawned

spawn:
<summon custom mob>
tp @s ~ -1000 ~
kill @s
1
09/04/2022 7:57 am
Level 43 : Master Fish
Zulfish
Zulfish's Avatar
hi, I did exactly what you wrote but for some reason the mob isn't spawning while the functions are loaded, can you maybe check what's wrong
Datapack:www.mediafire.com/file/sszcrgskyzp480i/Default_Datapack_-_Copy.zip/file
1
09/04/2022 4:58 am
Level 43 : Master Fish
Zulfish
Zulfish's Avatar
Oh ok thank you for your time
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome