Started by
Soul of Cinder
on
Topic category: Help with modding (Java Edition)
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
Topic category: Help with modding (Java Edition)
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
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)
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();
}
}
}
}
}
}
on what trigger did you set that procedure?
i've made an effect and then i've put it on "on effect active tick"
I tried the same thing and it works
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