package me.km;

import me.km.blocks.ModBlocks;
import me.km.items.ModItems;
import net.minecraft.item.Item;
import net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

public class CommonEvents {

    @SubscribeEvent
    public void getFuelBurnTime(FurnaceFuelBurnTimeEvent e) {
        Item item = e.getItemStack().getItem();
        if(item == ModItems.sling || item == ModBlocks.bookshelfAcacia.asItem()
                || item == ModBlocks.bookshelfBirch.asItem()
                || item == ModBlocks.bookshelfDarkOak.asItem()
                || item == ModBlocks.bookshelfJungle.asItem()
                || item == ModBlocks.bookshelfSpruce.asItem()) {
            e.setBurnTime(300);
        } else if(item == ModItems.woodenBattleAxe || item == ModItems.woodenDagger
                || item == ModItems.woodenHammer || item == ModItems.woodenScepter
                || item == ModItems.woodenStick) {
            e.setBurnTime(200);
        } else if(item == ModBlocks.crateAcacia.asItem() || item == ModBlocks.crateBigOak.asItem()
                || item == ModBlocks.crateBirch.asItem() || item == ModBlocks.crateJungle.asItem()
                || item == ModBlocks.crateOak.asItem() || item == ModBlocks.crateSpruce.asItem()) {
            e.setBurnTime(2700);
        }
    }
}
