[Tutorial] How to restrict mobs to the overworld

Started by BloxcastJason on

Topic category: User side tutorials

Active 2 months ago
Joined Sep 2019
Points:
658

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
[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
Active 2 months ago
Joined Sep 2019
Points:
658

User statistics:

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

Update example for 2021.1
update

Active 5 months ago
Joined May 2020
Points:
715

User statistics:

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

Active 2 years ago
Joined May 2021
Points:
581

User statistics:

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