EntityEvents.hurt(event => {

    // Get the entity that was hurt
    let target = event.entity;

    // Get the damage source and attacker
    let source = event.source; // Use event.source for Forge 1.20.1
    let attacker = source ? source.getImmediate() : null;

    // Check if the target is a player and the attacker is a zombie
    if (target.isPlayer() && attacker && attacker.type === 'minecraft:warden') {
        // Apply poison effect using potionEffects.add
        target.potionEffects.add('sculkhorde:corroded', 90, 1, false, true);
        // Parameters: effect ID, duration (ticks), amplifier, ambient, showParticles
    }
});