Skip to content

Commit

Permalink
Re-add some blood before killing an extended creature for blood loss.…
Browse files Browse the repository at this point in the history
… Avoid death-loops TeamLapen/VampirismIntegrations#86

Add proper message for "sucked dry by"
  • Loading branch information
maxanier committed Apr 7, 2023
1 parent a4ecd8a commit a834a83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ public void tick() {
* check for sanguinare as the entity might be converting instead of dying
*/
if (blood == 0 && entity.tickCount % 20 == 10 && entity.getEffect(ModEffects.SANGUINARE.get()) == null) {
this.blood = 1; //Re-add some blood . If the entity does not die by the following damage applied it probably is not supposed to die. Also, avoid death-loops with mods that respawn entities as is (like PlayerCompanion)
entity.hurt(VReference.NO_BLOOD, 1000);
return;
}
if (blood > 0 && blood < getMaxBlood() && entity.tickCount % 40 == 8) {
entity.addEffect(new MobEffectInstance(MobEffects.WEAKNESS, 41));
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/vampirism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
"death.attack.holy_water": "%1$s was burned with holy water",
"death.attack.holy_water.player": "%2$s burned %1$s with holy water",
"death.attack.blood_loss": "%1$s was sucked dry",
"death.attack.blood_loss.player": "%1$s was sucked dry by %2$s",
"death.minion.on_behalf": "on behalf of %1$s",
"death.attack.vampirism_dbno": "After %1$s, they gave up",
"__comment": "task_entity_tags",
Expand Down

0 comments on commit a834a83

Please sign in to comment.