Guard Villagers

Guard Villagers

30M Downloads

[1.21] [Neoforge] update to breaking neo changes for damage events

ffuentesm opened this issue ยท 0 comments

commented

image

New Neoforge 21.0.31 made the following changes to damage events:

import net.neoforged.neoforge.event.entity.living.LivingHurtEvent; 
import net.neoforged.neoforge.event.entity.living.LivingIncomingDamageEvent; 
public static void dodge(LivingHurtEvent event) { 
public static void dodge(LivingIncomingDamageEvent event) {
public static void livingDamageEvent(LivingDamageEvent event) {
        if (!(event.getSource().getEntity() instanceof Player player)) 
public static void livingDamageEvent(LivingIncomingDamageEvent event) {
        if (!(event.getEntity() instanceof Player player))