mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 13:37:58 +01:00
Limit AOE spell radius to 32 blocks. Fixes #450
This commit is contained in:
parent
fab4924021
commit
5b3a8bee95
1 changed files with 3 additions and 1 deletions
|
@ -8,8 +8,10 @@ import com.minelittlepony.unicopia.ability.magic.spell.attribute.TooltipFactory;
|
|||
import com.minelittlepony.unicopia.ability.magic.spell.effect.*;
|
||||
import com.minelittlepony.unicopia.ability.magic.spell.trait.Trait;
|
||||
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public abstract class AbstractAreaEffectSpell extends AbstractSpell {
|
||||
protected static final SpellAttribute<Float> RANGE = SpellAttribute.create(SpellAttributeType.RANGE, AttributeFormat.REGULAR, AttributeFormat.PERCENTAGE, Trait.POWER, power -> Math.max(0, 4 + power));
|
||||
protected static final SpellAttribute<Float> RANGE = SpellAttribute.create(SpellAttributeType.RANGE, AttributeFormat.REGULAR, AttributeFormat.PERCENTAGE, Trait.POWER, power -> MathHelper.clamp(4 + power, 0, 32));
|
||||
public static final TooltipFactory TOOLTIP = RANGE;
|
||||
|
||||
protected AbstractAreaEffectSpell(CustomisedSpellType<?> type) {
|
||||
|
|
Loading…
Reference in a new issue