// Path: src/main/java/org/cyclops/everlastingabilities/ability/config/AbilityPowerStareConfig.java
// public class AbilityPowerStareConfig extends AbilityConfig<AbilityTypePowerStare> {
// 
//     @ConfigurableProperty(category = "ability", comment = "Rarity of this ability.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static int rarity = Rarity.UNCOMMON.ordinal();
// 
//     @ConfigurableProperty(category = "ability", comment = "The maximum ability level.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static int maxLevel = 5;
// 
//     @ConfigurableProperty(category = "ability", comment = "The xp required per level.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static int xpPerLevel = 50;
// 
//     @ConfigurableProperty(category = "ability", comment = "Require sneak to activate.", configLocation = ModConfig.Type.SERVER)
//     public static boolean requireSneak = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained by initially spawning players.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnPlayerSpawn = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained by spawning mobs.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnMobSpawn = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained by combining totems in a crafting grid.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnCraft = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained in loot chests.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnLoot = true;
// 
//     public AbilityPowerStareConfig() {
//         super("power_stare",
//                 eConfig -> new AbilityTypePowerStare(eConfig.getNamedId(), () -> rarity, () -> maxLevel, () -> xpPerLevel,
//                         () -> obtainableOnPlayerSpawn, () -> obtainableOnMobSpawn, () -> obtainableOnCraft, () -> obtainableOnLoot));
//     }
// 
// }


import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.TameableEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World;
import org.cyclops.cyclopscore.helper.MinecraftHelpers;
import org.cyclops.everlastingabilities.ability.config.AbilityPowerStareConfig;
import java.util.List;
import java.util.function.Supplier;
package org.cyclops.everlastingabilities.ability;



/**
 * Ability type for pushing in the direction your looking mobs away.
 * @author rubensworks
 */
public class AbilityTypePowerStare extends AbilityTypeDefault {

    private static final int TICK_MODULUS = MinecraftHelpers.SECOND_IN_TICKS / 4;

    public AbilityTypePowerStare(String id, Supplier<Integer> rarity, Supplier<Integer> maxLevel,
                                 Supplier<Integer> baseXpPerLevel, Supplier<Boolean> obtainableOnPlayerSpawn, Supplier<Boolean> obtainableOnMobSpawn,
                                 Supplier<Boolean> obtainableOnCraft, Supplier<Boolean> obtainableOnLoot) {
        super(id, rarity, maxLevel, baseXpPerLevel, obtainableOnPlayerSpawn, obtainableOnMobSpawn, obtainableOnCraft, obtainableOnLoot);
    }

    @Override
    public void onTick(PlayerEntity player, int level) {
    
// Path: src/main/java/org/cyclops/everlastingabilities/ability/config/AbilityPowerStareConfig.java
// public class AbilityPowerStareConfig extends AbilityConfig<AbilityTypePowerStare> {
// 
//     @ConfigurableProperty(category = "ability", comment = "Rarity of this ability.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static int rarity = Rarity.UNCOMMON.ordinal();
// 
//     @ConfigurableProperty(category = "ability", comment = "The maximum ability level.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static int maxLevel = 5;
// 
//     @ConfigurableProperty(category = "ability", comment = "The xp required per level.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static int xpPerLevel = 50;
// 
//     @ConfigurableProperty(category = "ability", comment = "Require sneak to activate.", configLocation = ModConfig.Type.SERVER)
//     public static boolean requireSneak = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained by initially spawning players.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnPlayerSpawn = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained by spawning mobs.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnMobSpawn = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained by combining totems in a crafting grid.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnCraft = true;
// 
//     @ConfigurableProperty(category = "ability", comment = "If this can be obtained in loot chests.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
//     public static boolean obtainableOnLoot = true;
// 
//     public AbilityPowerStareConfig() {
//         super("power_stare",
//                 eConfig -> new AbilityTypePowerStare(eConfig.getNamedId(), () -> rarity, () -> maxLevel, () -> xpPerLevel,
//                         () -> obtainableOnPlayerSpawn, () -> obtainableOnMobSpawn, () -> obtainableOnCraft, () -> obtainableOnLoot));
//     }
// 
// }


// Path: src/main/java/org/cyclops/everlastingabilities/ability/AbilityTypePowerStare.java
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.TameableEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World;
import org.cyclops.cyclopscore.helper.MinecraftHelpers;
import org.cyclops.everlastingabilities.ability.config.AbilityPowerStareConfig;
import java.util.List;
import java.util.function.Supplier;

package org.cyclops.everlastingabilities.ability;



/**
 * Ability type for pushing in the direction your looking mobs away.
 * @author rubensworks
 */
public class AbilityTypePowerStare extends AbilityTypeDefault {

    private static final int TICK_MODULUS = MinecraftHelpers.SECOND_IN_TICKS / 4;

    public AbilityTypePowerStare(String id, Supplier<Integer> rarity, Supplier<Integer> maxLevel,
                                 Supplier<Integer> baseXpPerLevel, Supplier<Boolean> obtainableOnPlayerSpawn, Supplier<Boolean> obtainableOnMobSpawn,
                                 Supplier<Boolean> obtainableOnCraft, Supplier<Boolean> obtainableOnLoot) {
        super(id, rarity, maxLevel, baseXpPerLevel, obtainableOnPlayerSpawn, obtainableOnMobSpawn, obtainableOnCraft, obtainableOnLoot);
    }

    @Override
    public void onTick(PlayerEntity player, int level) {
    
        if ( AbilityPowerStareConfig.requireSneak && !player.isCrouching() ) {