mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Make the Friendship Bracelet work for the Pegasus Rainboom Ability
This commit is contained in:
parent
53984c3346
commit
e03fa2f564
2 changed files with 6 additions and 2 deletions
|
@ -9,6 +9,7 @@ import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.effect.*;
|
import com.minelittlepony.unicopia.ability.magic.spell.effect.*;
|
||||||
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
|
import com.minelittlepony.unicopia.item.FriendshipBraceletItem;
|
||||||
import com.minelittlepony.unicopia.particle.OrientedBillboardParticleEffect;
|
import com.minelittlepony.unicopia.particle.OrientedBillboardParticleEffect;
|
||||||
import com.minelittlepony.unicopia.particle.ParticleSpawner;
|
import com.minelittlepony.unicopia.particle.ParticleSpawner;
|
||||||
import com.minelittlepony.unicopia.particle.TargetBoundParticleEffect;
|
import com.minelittlepony.unicopia.particle.TargetBoundParticleEffect;
|
||||||
|
@ -59,7 +60,9 @@ public class RainboomAbilitySpell extends AbstractSpell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
source.findAllEntitiesInRange(RADIUS).forEach(e -> {
|
source.findAllEntitiesInRange(RADIUS)
|
||||||
|
.filter(e -> !FriendshipBraceletItem.isComrade(source, e))
|
||||||
|
.forEach(e -> {
|
||||||
e.damage(source.damageOf(UDamageTypes.RAINBOOM, source), 6);
|
e.damage(source.damageOf(UDamageTypes.RAINBOOM, source), 6);
|
||||||
});
|
});
|
||||||
EFFECT_RANGE.translate(source.getOrigin()).getBlockPositions().forEach(pos -> {
|
EFFECT_RANGE.translate(source.getOrigin()).getBlockPositions().forEach(pos -> {
|
||||||
|
|
|
@ -39,7 +39,8 @@ public class FriendshipBraceletItem extends WearableItem implements DyeableItem,
|
||||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity player, Hand hand) {
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity player, Hand hand) {
|
||||||
ItemStack stack = player.getStackInHand(hand);
|
ItemStack stack = player.getStackInHand(hand);
|
||||||
|
|
||||||
if (!isSigned(stack) && (EquinePredicates.PLAYER_UNICORN.test(player) || AmuletSelectors.PEARL_NECKLACE.test(player))) {
|
if (!isSigned(stack) && (EquinePredicates.PLAYER_UNICORN.test(player) || EquinePredicates.PLAYER_PEGASUS.test(player)
|
||||||
|
|| AmuletSelectors.PEARL_NECKLACE.test(player))) {
|
||||||
player.setCurrentHand(hand);
|
player.setCurrentHand(hand);
|
||||||
|
|
||||||
ItemStack result = stack.copy();
|
ItemStack result = stack.copy();
|
||||||
|
|
Loading…
Reference in a new issue