Started by
BloxcastJason
on
Topic category: User side tutorials
Here's a basic tutorial on how to restrict mobs in the overworld (or any dimension like the nether or the end)
First, set the procedure into On Initial Entity Spawn.
Please note for the do part, I added a random potion effect as a random thing to fill in the do statement. You don't need this at all for the despawn to function. You can change the Dimension ID from 0 (Overworld) to another custom or vanilla MC id.
Also note that if you try to spawn mobs using the spawn egg outside of the overworld or whatever dimension you set it to, it won't work.
Below is a image example on how to do it.
Edited by BloxcastJason on Sun, 03/28/2021 - 15:14
Update example for 2021.1
Now there is a more simple way to do that. Create the same procedure but with "Return True" in place of the potion effect, and "Return False" in place of "Despawn". Then set the procedure in "Additionnal spawn condition". This way it should be less laggy, because the entity just won't spawn if it is not the correct dimension, and you can still spawn it with eggs.
can you show how it worked, because I tried and it did not work.