How to get ignored by hostile mobs

Started by Soul of Cinder on

Topic category: Help with modding (Java Edition)

Last seen on 17:44, 4. Sep 2024
Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get ignored by hostile mobs

I've made a potion that make you get ignored by mobs but the problem is that i dont know how to make such procedure. i can take any kind of advice 

Last seen on 08:49, 14. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
with this plugin: https:/…
Tue, 08/13/2024 - 23:50

with this plugin: https://mcreator.net/plugin/107323/new-procedures-plus you can use a procedure block that lets you make mobs stop targeting players (it's called set attack targeting of event/target entity to none)

Last seen on 17:44, 4. Sep 2024
Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i've made this but it still…
Wed, 08/14/2024 - 15:45

i've made this but it still doesnt work, i think its because of the line about the zombie it seem i forgot smth but idk what(also thx for the pluggin)

if the image doesnt work i've put this: public class MobTargetNullProcedure {

    public static void execute(Entity entity) {

        if (entity == null)

            return;

        if (entity instanceof LivingEntity _livEnt0 && _livEnt0.hasEffect(AtaysModsModMobEffects.OBSCURITY.get())) {

            if (entity instanceof Mob) {

                if (entity instanceof Mob) {

                    try {

                        ((Mob) entity).setTarget(null);

                    } catch (Exception e) {

                        e.printStackTrace();

                    }

                }

            }

        }

    }

}

Last seen on 08:49, 14. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on what trigger did you set…
Wed, 08/14/2024 - 15:56

on what trigger did you set that procedure?

Last seen on 17:44, 4. Sep 2024
Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i've made an effect and then…
Wed, 08/14/2024 - 16:04

i've made an effect and then i've put it on "on effect active tick"

Last seen on 08:49, 14. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried the same thing and…
Wed, 08/14/2024 - 16:24

I tried the same thing and it works

Last seen on 17:44, 4. Sep 2024
Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
idk why it work with you but…
Wed, 08/14/2024 - 16:43

idk why it work with you but not with me, when we both did the same thing anyway at least thx for the help bro