// Path: src/main/java/org/cyclops/everlastingabilities/ability/AbilityTypeStepAssist.java
// public class AbilityTypeStepAssist extends AbilityTypeDefault {
// 
//     private static final String PLAYER_NBT_KEY = Reference.MOD_ID + ":" + "stepAssist";
// 
//     public AbilityTypeStepAssist(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) {
//         player.stepHeight = player.isCrouching() ? 0.5F : level;
//     }
// 
//     @Override
//     public void onChangedLevel(PlayerEntity player, int oldLevel, int newLevel) {
//         if (oldLevel > 0 && newLevel == 0) {
//             float stepHeight = 0.6F;
//             if(player.getPersistentData().contains(PLAYER_NBT_KEY)) {
//                 if (!AbilityStepAssistConfig.forceDefaultStepHeight) {
//                     stepHeight = player.getPersistentData().getFloat(PLAYER_NBT_KEY);
//                 }
//                 player.getPersistentData().remove(PLAYER_NBT_KEY);
//             }
//             player.stepHeight = stepHeight;
//         } else if (oldLevel == 0 && newLevel > 0) {
//             player.getPersistentData().putFloat(PLAYER_NBT_KEY, player.stepHeight);
//         }
//     }
// }
// 
// Path: src/main/java/org/cyclops/everlastingabilities/core/config/extendedconfig/AbilityConfig.java
// public abstract class AbilityConfig<T> extends ExtendedConfigForge<AbilityConfig<T>, IAbilityType> {
// 
//     public AbilityConfig(String namedId, Function<AbilityConfig<T>, ? extends IAbilityType> elementConstructor) {
//         super(EverlastingAbilities._instance, namedId, elementConstructor);
//     }
//     
//     @Override
// 	public String getTranslationKey() {
// 		return "ability." + getNamedId();
// 	}
// 
//     @Override
//     public String getFullTranslationKey() {
//         return "ability.abilities." + getMod().getModId()  + "." +getNamedId() + ".name";
//     }
// 
//     @Override
//     public ConfigurableType getConfigurableType() {
//         return ExtendedConfigurableType.ABILITY;
//     }
// 
//     @Override
//     public IForgeRegistry<? super IAbilityType> getRegistry() {
//         return AbilityTypes.REGISTRY;
//     }
// }


import net.minecraft.item.Rarity;
import net.minecraftforge.fml.config.ModConfig;
import org.cyclops.cyclopscore.config.ConfigurableProperty;
import org.cyclops.everlastingabilities.ability.AbilityTypeStepAssist;
import org.cyclops.everlastingabilities.core.config.extendedconfig.AbilityConfig;
package org.cyclops.everlastingabilities.ability.config;


/**
 * Config for an ability.
 * @author rubensworks
 *
 */
public class AbilityStepAssistConfig extends AbilityConfig<AbilityTypeStepAssist> {

    @ConfigurableProperty(category = "ability", comment = "Forces the default step height value to 0.6 when this ability is deactivated.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
// Path: src/main/java/org/cyclops/everlastingabilities/ability/AbilityTypeStepAssist.java
// public class AbilityTypeStepAssist extends AbilityTypeDefault {
// 
//     private static final String PLAYER_NBT_KEY = Reference.MOD_ID + ":" + "stepAssist";
// 
//     public AbilityTypeStepAssist(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) {
//         player.stepHeight = player.isCrouching() ? 0.5F : level;
//     }
// 
//     @Override
//     public void onChangedLevel(PlayerEntity player, int oldLevel, int newLevel) {
//         if (oldLevel > 0 && newLevel == 0) {
//             float stepHeight = 0.6F;
//             if(player.getPersistentData().contains(PLAYER_NBT_KEY)) {
//                 if (!AbilityStepAssistConfig.forceDefaultStepHeight) {
//                     stepHeight = player.getPersistentData().getFloat(PLAYER_NBT_KEY);
//                 }
//                 player.getPersistentData().remove(PLAYER_NBT_KEY);
//             }
//             player.stepHeight = stepHeight;
//         } else if (oldLevel == 0 && newLevel > 0) {
//             player.getPersistentData().putFloat(PLAYER_NBT_KEY, player.stepHeight);
//         }
//     }
// }
// 
// Path: src/main/java/org/cyclops/everlastingabilities/core/config/extendedconfig/AbilityConfig.java
// public abstract class AbilityConfig<T> extends ExtendedConfigForge<AbilityConfig<T>, IAbilityType> {
// 
//     public AbilityConfig(String namedId, Function<AbilityConfig<T>, ? extends IAbilityType> elementConstructor) {
//         super(EverlastingAbilities._instance, namedId, elementConstructor);
//     }
//     
//     @Override
// 	public String getTranslationKey() {
// 		return "ability." + getNamedId();
// 	}
// 
//     @Override
//     public String getFullTranslationKey() {
//         return "ability.abilities." + getMod().getModId()  + "." +getNamedId() + ".name";
//     }
// 
//     @Override
//     public ConfigurableType getConfigurableType() {
//         return ExtendedConfigurableType.ABILITY;
//     }
// 
//     @Override
//     public IForgeRegistry<? super IAbilityType> getRegistry() {
//         return AbilityTypes.REGISTRY;
//     }
// }


// Path: src/main/java/org/cyclops/everlastingabilities/ability/config/AbilityStepAssistConfig.java
import net.minecraft.item.Rarity;
import net.minecraftforge.fml.config.ModConfig;
import org.cyclops.cyclopscore.config.ConfigurableProperty;
import org.cyclops.everlastingabilities.ability.AbilityTypeStepAssist;
import org.cyclops.everlastingabilities.core.config.extendedconfig.AbilityConfig;

package org.cyclops.everlastingabilities.ability.config;


/**
 * Config for an ability.
 * @author rubensworks
 *
 */
public class AbilityStepAssistConfig extends AbilityConfig<AbilityTypeStepAssist> {

    @ConfigurableProperty(category = "ability", comment = "Forces the default step height value to 0.6 when this ability is deactivated.", isCommandable = true, configLocation = ModConfig.Type.SERVER)
    public static boolean forceDefaultStepHeight = true;