// Path: src/main/java/com/legobmw99/allomancy/Allomancy.java
// @Mod(Allomancy.MODID)
// public class Allomancy {
// 
//     public static final String MODID = "allomancy";
//     public static final CreativeModeTab allomancy_group = new CreativeModeTab(MODID) {
//         @Override
//         public ItemStack makeIcon() {
//             return new ItemStack(CombatSetup.MISTCLOAK.get());
//         }
//     };
// 
//     public static final Logger LOGGER = LogManager.getLogger();
// 
//     public static Allomancy instance;
// 
//     public Allomancy() {
//         instance = this;
//         // Register our setup events on the necessary buses
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(Allomancy::init);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(Allomancy::clientInit);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(AllomancyConfig::onLoad);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(AllomancyConfig::onReload);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(PowersClientSetup::registerParticle);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(AllomancerCapability::registerCapability);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(CombatClientSetup::registerEntityRenders);
// 
//         MinecraftForge.EVENT_BUS.addListener(Allomancy::registerCommands);
//         MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, OreGenerator::registerGeneration);
// 
//         // Register all Registries
//         PowersSetup.register();
//         CombatSetup.register();
//         ConsumeSetup.register();
//         MaterialsSetup.register();
//         ExtrasSetup.register();
// 
//         AllomancyConfig.register();
// 
//     }
// 
//     public static Item.Properties createStandardItemProperties() {
//         return new Item.Properties().tab(allomancy_group).stacksTo(64);
//     }
// 
//     public static Item createStandardItem() {
//         return new Item(createStandardItemProperties());
//     }
// 
// 
//     public static MutableComponent addColorToText(String translationKey, ChatFormatting color) {
//         MutableComponent lore = new TranslatableComponent(translationKey);
//         return addColor(lore, color);
//     }
// 
//     public static MutableComponent addColorToText(String translationKey, ChatFormatting color, Object... fmting) {
//         MutableComponent lore = new TranslatableComponent(translationKey, fmting);
//         return addColor(lore, color);
//     }
// 
//     private static MutableComponent addColor(MutableComponent text, ChatFormatting color) {
//         text.setStyle(text.getStyle().withColor(TextColor.fromLegacyFormat(color)));
//         return text;
//     }
// 
//     public static void clientInit(final FMLClientSetupEvent e) {
//         PowersSetup.clientInit(e);
//     }
// 
//     public static void registerCommands(final RegisterCommandsEvent e) {
//         PowersSetup.registerCommands(e);
//     }
// 
//     public static void init(final FMLCommonSetupEvent e) {
//         PowersSetup.init(e);
//         MaterialsSetup.init(e);
//         Network.registerPackets();
//     }
// }
// 
// Path: src/main/java/com/legobmw99/allomancy/api/block/IAllomanticallyUsableBlock.java
// public interface IAllomanticallyUsableBlock {
// 
//     /**
//      * Called when the block is steelpushed or ironpulled
//      *
//      * @param isPush whether the activation is Steel
//      * @return whether the block was activated
//      */
//     boolean useAllomantically(BlockState state, Level world, BlockPos pos, Player playerIn, boolean isPush);
// }


import com.legobmw99.allomancy.Allomancy;
import com.legobmw99.allomancy.api.block.IAllomanticallyUsableBlock;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.ButtonBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.phys.BlockHitResult;
import javax.annotation.Nullable;
import java.util.List;
package com.legobmw99.allomancy.modules.extras.block;



public class IronButtonBlock extends ButtonBlock implements IAllomanticallyUsableBlock {

    public IronButtonBlock() {
        super(false, Block.Properties.of(Material.METAL).noCollission().strength(1.0F));
    }

    @Override
    public boolean useAllomantically(BlockState state, Level level, BlockPos pos, Player player, boolean isPush) {
        if (state.getValue(POWERED) || level.isClientSide) {
            return true;
        } else if (isPush) {
            level.setBlock(pos, state.setValue(POWERED, true), 3);
            this.playSound(player, level, pos, true);
            this.updateNeighbors(state, level, pos);
            level.scheduleTick(pos, this, 20);
            return true;
        } else {
            return false;
        }
    }

    @Override
    public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
        return InteractionResult.FAIL;
    }


    @Override
    protected SoundEvent getSound(boolean on) {
        return on ? SoundEvents.METAL_PRESSURE_PLATE_CLICK_ON : SoundEvents.METAL_PRESSURE_PLATE_CLICK_OFF;
    }

    @Override
    public void appendHoverText(ItemStack stack, @Nullable BlockGetter worldIn, List<Component> tooltip, TooltipFlag flagIn) {
        super.appendHoverText(stack, worldIn, tooltip, flagIn);
// Path: src/main/java/com/legobmw99/allomancy/Allomancy.java
// @Mod(Allomancy.MODID)
// public class Allomancy {
// 
//     public static final String MODID = "allomancy";
//     public static final CreativeModeTab allomancy_group = new CreativeModeTab(MODID) {
//         @Override
//         public ItemStack makeIcon() {
//             return new ItemStack(CombatSetup.MISTCLOAK.get());
//         }
//     };
// 
//     public static final Logger LOGGER = LogManager.getLogger();
// 
//     public static Allomancy instance;
// 
//     public Allomancy() {
//         instance = this;
//         // Register our setup events on the necessary buses
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(Allomancy::init);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(Allomancy::clientInit);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(AllomancyConfig::onLoad);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(AllomancyConfig::onReload);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(PowersClientSetup::registerParticle);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(AllomancerCapability::registerCapability);
//         FMLJavaModLoadingContext.get().getModEventBus().addListener(CombatClientSetup::registerEntityRenders);
// 
//         MinecraftForge.EVENT_BUS.addListener(Allomancy::registerCommands);
//         MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, OreGenerator::registerGeneration);
// 
//         // Register all Registries
//         PowersSetup.register();
//         CombatSetup.register();
//         ConsumeSetup.register();
//         MaterialsSetup.register();
//         ExtrasSetup.register();
// 
//         AllomancyConfig.register();
// 
//     }
// 
//     public static Item.Properties createStandardItemProperties() {
//         return new Item.Properties().tab(allomancy_group).stacksTo(64);
//     }
// 
//     public static Item createStandardItem() {
//         return new Item(createStandardItemProperties());
//     }
// 
// 
//     public static MutableComponent addColorToText(String translationKey, ChatFormatting color) {
//         MutableComponent lore = new TranslatableComponent(translationKey);
//         return addColor(lore, color);
//     }
// 
//     public static MutableComponent addColorToText(String translationKey, ChatFormatting color, Object... fmting) {
//         MutableComponent lore = new TranslatableComponent(translationKey, fmting);
//         return addColor(lore, color);
//     }
// 
//     private static MutableComponent addColor(MutableComponent text, ChatFormatting color) {
//         text.setStyle(text.getStyle().withColor(TextColor.fromLegacyFormat(color)));
//         return text;
//     }
// 
//     public static void clientInit(final FMLClientSetupEvent e) {
//         PowersSetup.clientInit(e);
//     }
// 
//     public static void registerCommands(final RegisterCommandsEvent e) {
//         PowersSetup.registerCommands(e);
//     }
// 
//     public static void init(final FMLCommonSetupEvent e) {
//         PowersSetup.init(e);
//         MaterialsSetup.init(e);
//         Network.registerPackets();
//     }
// }
// 
// Path: src/main/java/com/legobmw99/allomancy/api/block/IAllomanticallyUsableBlock.java
// public interface IAllomanticallyUsableBlock {
// 
//     /**
//      * Called when the block is steelpushed or ironpulled
//      *
//      * @param isPush whether the activation is Steel
//      * @return whether the block was activated
//      */
//     boolean useAllomantically(BlockState state, Level world, BlockPos pos, Player playerIn, boolean isPush);
// }


// Path: src/main/java/com/legobmw99/allomancy/modules/extras/block/IronButtonBlock.java
import com.legobmw99.allomancy.Allomancy;
import com.legobmw99.allomancy.api.block.IAllomanticallyUsableBlock;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.ButtonBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.phys.BlockHitResult;
import javax.annotation.Nullable;
import java.util.List;

package com.legobmw99.allomancy.modules.extras.block;



public class IronButtonBlock extends ButtonBlock implements IAllomanticallyUsableBlock {

    public IronButtonBlock() {
        super(false, Block.Properties.of(Material.METAL).noCollission().strength(1.0F));
    }

    @Override
    public boolean useAllomantically(BlockState state, Level level, BlockPos pos, Player player, boolean isPush) {
        if (state.getValue(POWERED) || level.isClientSide) {
            return true;
        } else if (isPush) {
            level.setBlock(pos, state.setValue(POWERED, true), 3);
            this.playSound(player, level, pos, true);
            this.updateNeighbors(state, level, pos);
            level.scheduleTick(pos, this, 20);
            return true;
        } else {
            return false;
        }
    }

    @Override
    public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
        return InteractionResult.FAIL;
    }


    @Override
    protected SoundEvent getSound(boolean on) {
        return on ? SoundEvents.METAL_PRESSURE_PLATE_CLICK_ON : SoundEvents.METAL_PRESSURE_PLATE_CLICK_OFF;
    }

    @Override
    public void appendHoverText(ItemStack stack, @Nullable BlockGetter worldIn, List<Component> tooltip, TooltipFlag flagIn) {
        super.appendHoverText(stack, worldIn, tooltip, flagIn);
        MutableComponent lore = Allomancy.addColorToText("block.allomancy.iron_activation.lore", ChatFormatting.GRAY);