Trying to stop certain mobs from spawning

Started by Raptorjames16 on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Nov 2023
Points:
191

User statistics:

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

Active 3 hours ago
Joined Apr 2023
Points:
720

User statistics:

  • Modifications: 5
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 559
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

Active 1 year ago
Joined Nov 2023
Points:
191

User statistics:

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

I'll try it.

 

Active 1 year ago
Joined Nov 2023
Points:
191

User statistics:

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

Active 3 hours ago
Joined Apr 2023
Points:
720

User statistics:

  • Modifications: 5
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 559
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

Active 1 year ago
Joined Nov 2023
Points:
191

User statistics:

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

I tryed it but their still statues