mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Handle healthbars even when skills are disabled. Fixes #1194
This commit is contained in:
parent
7b3869e385
commit
30f7521a3a
@ -21,6 +21,7 @@ Version 1.4.08-dev
|
|||||||
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
|
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
|
||||||
+ Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
|
+ Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
|
||||||
+ Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
|
+ Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
|
||||||
|
= Fixed bug where healthbars wouldn't display if skills were disabled
|
||||||
= Fixed bug with Call of The Wild entities despawning
|
= Fixed bug with Call of The Wild entities despawning
|
||||||
= Fixed bug with updating (very) old user data.
|
= Fixed bug with updating (very) old user data.
|
||||||
= Fixed bug with checking maximum durability of mod items.
|
= Fixed bug with checking maximum durability of mod items.
|
||||||
|
@ -189,6 +189,7 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CombatUtils.processCombatAttack(event, attacker, target);
|
CombatUtils.processCombatAttack(event, attacker, target);
|
||||||
|
CombatUtils.handleHealthbars(attacker, target, event.getDamage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -298,15 +298,6 @@ public final class CombatUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (attacker instanceof Player) {
|
|
||||||
Player player = (Player) attacker;
|
|
||||||
|
|
||||||
if (Misc.isNPCEntity(player) || Misc.isNPCEntity(target)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MobHealthbarUtils.handleMobHealthbars(player, target, event.getDamage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -614,4 +605,18 @@ public final class CombatUtils {
|
|||||||
|
|
||||||
return tier;
|
return tier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void handleHealthbars(Entity attacker, LivingEntity target, double damage) {
|
||||||
|
if (!(attacker instanceof Player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) attacker;
|
||||||
|
|
||||||
|
if (Misc.isNPCEntity(player) || Misc.isNPCEntity(target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MobHealthbarUtils.handleMobHealthbars(player, target, damage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user