Skip to content

[1.20.1] Holy Locket can heal user TO DEATH #280

@DEN-SNIPER

Description

@DEN-SNIPER

Bug found in CalamityCraft modpack, but later was reproduced with only Relic mod (v0.8.0.11) and it's dependencies (Forge v47.4.10).

Holy Locket 1st ability can heal user with 'Life Essence' when entity nearby heals. And sometimes it' didn't heal... it damages user.
I was curios so i checked the code and found this line:

if (this.distanceTo(target) <= 1) {
Level level = target.getCommandSenderWorld();
target.hurt(level.damageSources().generic(), heal);
this.remove(RemovalReason.KILLED);
}

...HURT? In my life essence? WTH?!

The healing property for essence is ~12 lines bellow:

protected void onHitEntity(EntityHitResult result) {
if (target == null || !(result.getEntity() instanceof LivingEntity entity) || entity.getUUID() != target.getUUID())
return;
entity.heal(getHeal() + this.getHeal());
this.discard();
}

I'm not a programmer wizard myself... but this shouldn't be too difficult to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions