package pokefenn.totemic.block;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import pokefenn.totemic.Totemic;
import pokefenn.totemic.lib.Strings;

import javax.annotation.Nullable;

public class BlockTotemTorch extends Block
{
    public BlockTotemTorch()
    {
        super(Material.WOOD);
        setRegistryName(Strings.TOTEM_TORCH_NAME);
        setUnlocalizedName(Strings.RESOURCE_PREFIX + Strings.TOTEM_TORCH_NAME);
        setLightLevel(1F);
        setSoundType(SoundType.WOOD);
        setHardness(0.05F);
        setCreativeTab(Totemic.tabsTotem);

    }

    @Nullable
    public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
    {
        return NULL_AABB;
    }

    @Override
    @SideOnly(Side.CLIENT)
    public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
    {
        for(int i = 0; i < 2; i++)
            world.spawnParticle(EnumParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1F, pos.getZ() + 0.5, 0, 0, 0);
        for(int i = 0; i < 16; i++)
            world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5, pos.getY() + 1F, pos.getZ() + 0.5, 0, 0, 0);
    }

    @Override
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
    {
        return new AxisAlignedBB(5F/16, 0.0F, 5F/16, 11F/16, 1.3F, 11F/16);
    }

    @Override
    public boolean isOpaqueCube(IBlockState state)
    {
        return false;
    }

    @Override
    public boolean isFullCube(IBlockState state)
    {
        return false;
    }

    @Override
    public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing facing)
    {
        return BlockFaceShape.UNDEFINED;
    }
}

@@ -52,16 +52,51 @@
 andom;%0A%0A
+import javax.annotation.Nullable;%0A%0A
 import n
@@ -121,16 +121,16 @@
 .Block;%0A
-
 import n
@@ -718,43 +718,8 @@
 s;%0A%0A
-import javax.annotation.Nullable;%0A%0A
 publ
@@ -817,22 +817,59 @@
 aterial.
-WOOD);
+CIRCUITS); //Same material as vanilla torch
 %0A       
@@ -1131,171 +1131,8 @@
 em);
-%0A%0A    %7D%0A%0A    @Nullable%0A    public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)%0A    %7B%0A        return NULL_AABB;
 %0A   
@@ -1751,18 +1751,20 @@
 dBB(
+4.7
 5
-F
 /16, 0.0
 F, 5
@@ -1763,35 +1763,39 @@
  0.0
-F
 , 
+4.7
 5
-F
 /16, 11
-F
+.25
 /16, 1.
-3F
+0
 , 11
-F
+.25
 /16)
@@ -1795,32 +1795,208 @@
 .25/16);%0A    %7D%0A%0A
+    @Override%0A    @Nullable%0A    public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)%0A    %7B%0A        return NULL_AABB;%0A    %7D%0A%0A
     @Override%0A  

Change totem torch material so that liquids will flush it away