mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2025-08-03 19:15:45 +00:00
Block death potions (#148)
Blocks all known death potions as it's possible to use amplifier 29, 61, 93 and 125 to get the same effect from it.
This commit is contained in:
parent
9f4b48af5a
commit
4f339b29b8
1 changed files with 2 additions and 1 deletions
|
@ -80,7 +80,8 @@ public class PotionBlocker extends FreedomService
|
||||||
{
|
{
|
||||||
for (PotionEffect effect : effects)
|
for (PotionEffect effect : effects)
|
||||||
{
|
{
|
||||||
if (effect.getType().equals(PotionEffectType.HEAL) && effect.getAmplifier() == 125)
|
int amplifier = effect.getAmplifier();
|
||||||
|
if (effect.getType().equals(PotionEffectType.HEAL) && (amplifier == 29 || amplifier == 61 || amplifier == 93 || amplifier == 125))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue