[Tutorial] How to restrict mobs to the overworld

Started by BloxcastJason on

Topic category: User side tutorials

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] How to restrict mobs to the overworld
Sun, 03/28/2021 - 15:14 (edited)

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.

Image

 

Edited by BloxcastJason on Sun, 03/28/2021 - 15:14
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update example for 2021.1
Sun, 04/18/2021 - 02:59

Update example for 2021.1
update

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Now there is a more simple…
Tue, 04/20/2021 - 10:14

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.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you show how it worked,…
Mon, 07/05/2021 - 15:13

can you show how it worked, because I tried and it did not work.