package info.sleeplessacorn.nomagi.block;

import info.sleeplessacorn.nomagi.Nomagi;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tehnut.lib.mc.block.BlockAxisY;
import tehnut.lib.mc.model.IModeled;

import java.util.List;

public class BlockUpsetti extends BlockAxisY implements IModeled {

    public static final AxisAlignedBB BOUNDING = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D);

    public BlockUpsetti() {
        super(Material.IRON);

        setCreativeTab(Nomagi.TAB_NOMAGI);
        setUnlocalizedName(Nomagi.MODID + ".upsetti");
        setHardness(1.0F);
        setHarvestLevel("pickaxe", 1);
        setSoundType(SoundType.METAL);
    }

    @Override
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
        return BOUNDING;
    }

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

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

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

    // blarg
    @Override
    public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) {
        return getDefaultState().withProperty(getProperty(), placer.getHorizontalFacing().getOpposite());
    }

    // IModeled

    @Override
    public void getVariants(List<String> variants) {
        variants.add("facing=north");
    }
}

@@ -254,16 +254,102 @@
 ngBase;%0A
+import net.minecraft.entity.player.EntityPlayer;%0Aimport net.minecraft.item.ItemStack;%0A
 import n
@@ -501,16 +501,63 @@
 ockPos;%0A
+import net.minecraft.util.math.RayTraceResult;%0A
 import n
@@ -1590,24 +1590,207 @@
 lse;%0A    %7D%0A%0A
+    @Override%0A    public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) %7B%0A        return new ItemStack(this);%0A    %7D%0A%0A
     // blarg

Fix upssetti pick