Trying to stop certain mobs from spawning

Started by Raptorjames16 on

Topic category: Help with modding (Java Edition)

Last seen on 16:39, 26. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to stop certain mobs from spawning

I'm making a mod and need to disable zombie, skeleton, and creeper spawns. But when I tried they just turned to indestructible statues except the creepers, which just ignored the function all together. How ever, even more disturbing was that zombie piglins and wither skeleton's also froze anyone no how to fix this? 

Last seen on 23:17, 26. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use global trigger "when…
Tue, 02/27/2024 - 17:41

Use global trigger "when entity spawns"

Then check "if, not, provided world client-side" (this fixes a lot of 'ghost' mob, block, and potion effect bugs)

Run under the if statement another if statement that checks if it is the right sub-type and not a similar mob you do want to spawn(example, "if, target entity is (sub) type of zombie, and, not, target entity is (sub) type of zombified piglin"

Under the second if loop, place the block "cancel event that triggered procedure(only with cancelable global triggers)"

That should work, I apologize if it doesn't or if I got the name of certain procedure blocks wrong

Last seen on 16:39, 26. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'll try it.  
Tue, 02/27/2024 - 17:43

I'll try it.

 

Last seen on 16:39, 26. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What do you mean by 'if not'…
Tue, 02/27/2024 - 17:47

What do you mean by 'if not' because its not a procedure.

Last seen on 23:17, 26. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
use the "if" block, then add…
Tue, 02/27/2024 - 19:24

use the "if" block, then add a "not" block between it and the condition

Last seen on 16:39, 26. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tryed it but their still…
Wed, 02/28/2024 - 20:37

I tryed it but their still statues