12345678910111213141516171819202122 |
- package me.km.effects.active;
- import me.km.api.Utils;
- import me.km.effects.ActiveEffectBase;
- import me.km.effects.EffectUtils;
- import net.minecraft.entity.player.EntityPlayerMP;
- import net.minecraft.util.math.Vec3d;
- public class Pull extends ActiveEffectBase
- {
- @Override
- protected boolean executeEffect(EntityPlayerMP p, int power)
- {
- Vec3d v = p.getPositionVector();
- EffectUtils.getEntsOfNotGuild(p, power + 2).stream().forEach(ent ->
- {
- Vec3d v2 = v.subtract(ent.getPositionVector()).normalize();
- Utils.setVelocity(ent, v2.x, v2.y, v2.z);
- });
- return true;
- }
- }
|