package com.zivilon.cinder_loe.blocks;

import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

import java.lang.reflect.Field;

public class CinderBlock extends Block {

    public CinderBlock() {
        super(Material.rock);
        this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
        setHardness(2.0F);
        setResistance(5.0F);
        setBlockTextureName("lotr:cinder_block");
        setBlockName("lotr:cinderBlock");
        setLightLevel(0.25F);
    }

    @SideOnly(Side.CLIENT)
    public void registerBlockIcons(IIconRegister iconRegister) {
        this.blockIcon = iconRegister.registerIcon("lotr:cinder_block");
    }

    @Override
    public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
        entity.setFire(20);
    }
}
