// Path: src/main/java/net/mechanicalcat/pycode/blocks/PythonBlock.java
// public final class PythonBlock extends Block implements ITileEntityProvider {
//     public PythonBlock() {
//         super(Material.CLAY);
//         setUnlocalizedName(Reference.PyCodeRegistrations.BLOCK.getUnlocalizedName());
//         setRegistryName(Reference.PyCodeRegistrations.BLOCK.getRegistryName());
//         setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
//         setHardness(1.0f);
//     }
// 
//     @Override
//     public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand,
//                                     @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
//         FMLLog.info("onBlockActivated item=%s", heldItem);
//         PyCodeBlockTileEntity code_block = this.getEntity(world, pos);
//         return code_block == null || code_block.handleItemInteraction(playerIn, heldItem);
//     }
// 
//     @Override
//     public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
//         super.onBlockPlacedBy(world, pos, state, placer, stack);
//         PyCodeBlockTileEntity code_block = this.getEntity(world, pos);
//         if (code_block != null && stack.hasTagCompound()) {
//             code_block.readFromNBT(stack.getTagCompound());
//             code_block.getCode().setContext(world, code_block, pos);
//         }
//     }
// 
//     @Nullable
//     private PyCodeBlockTileEntity getEntity(World world, BlockPos pos) {
//         TileEntity entity = world.getTileEntity(pos);
//         if (entity instanceof PyCodeBlockTileEntity) {
//             return (PyCodeBlockTileEntity) entity;
//         }
//         return null;
//     }
// 
//     @Override
//     public TileEntity createNewTileEntity(World world, int meta) {
//         return new PyCodeBlockTileEntity();
//     }
// 
//     @Override
//     public void onEntityWalk(World world, BlockPos pos, Entity entity) {
//         PyCodeBlockTileEntity code_block = this.getEntity(world, pos);
//         if (entity instanceof EntityPlayer && code_block.getCode().hasKey("onPlayerWalk")) {
//             code_block.handleEntityInteraction(new MyEntityPlayer((EntityPlayer) entity), "onPlayerWalk");
//         } else if (entity instanceof EntityLivingBase) {
//             if (code_block.getCode().hasKey("onEntityWalk")) {
//                 code_block.handleEntityInteraction(new MyEntityLiving((EntityLivingBase) entity), "onEntityWalk");
//             }
//         }
//     }
// 
//     public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
//         PyCodeBlockTileEntity entity = this.getEntity(worldIn, pos);
// 
//         if (entity != null && !entity.getCode().getCode().isEmpty()) {
//             ItemStack itemstack = this.createStackedBlock(state);
//             if (!itemstack.hasTagCompound()) {
//                 itemstack.setTagCompound(new NBTTagCompound());
//             }
//             entity.writeToNBT(itemstack.getTagCompound());
//             spawnAsEntity(worldIn, pos, itemstack);
//         }
// 
//         super.breakBlock(worldIn, pos, state);
//     }
// 
//     @Nullable
//     @Override
//     public Item getItemDropped(IBlockState state, Random rand, int fortune) {
//         // we're already dropping the item in breakBlock()
//         return null;
//     }
// 
//     //    public int tickRate(World world) {
// //        return 10;
// //    }
// 
// //    public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
// //    canProvidePower
// 
// //
// //    @Override
// //    public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor) {
// //        super.onNeighborChange(world, pos, neighbor);
// //    }
// }
// 
// Path: src/main/java/net/mechanicalcat/pycode/items/PythonBlockItem.java
// public class PythonBlockItem extends ItemBlock {
//     public PythonBlockItem(PythonBlock block) {super(block);}
// 
//     @Override
//     public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
//         NBTTagCompound compound = stack.getTagCompound();
//         if (compound == null) return;
//         if (compound.hasKey(PythonCode.CODE_NBT_TAG)) tooltip.add("[has code]");
//     }
// }


import net.minecraftforge.fml.common.registry.GameRegistry;
import net.mechanicalcat.pycode.blocks.PythonBlock;
import net.mechanicalcat.pycode.items.PythonBlockItem;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
/*
 * Copyright (c) 2017 Richard Jones <richard@mechanicalcat.net>
 * All Rights Reserved
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

package net.mechanicalcat.pycode.init;


public final class ModBlocks {
    public static PythonBlock python_block;
// Path: src/main/java/net/mechanicalcat/pycode/blocks/PythonBlock.java
// public final class PythonBlock extends Block implements ITileEntityProvider {
//     public PythonBlock() {
//         super(Material.CLAY);
//         setUnlocalizedName(Reference.PyCodeRegistrations.BLOCK.getUnlocalizedName());
//         setRegistryName(Reference.PyCodeRegistrations.BLOCK.getRegistryName());
//         setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
//         setHardness(1.0f);
//     }
// 
//     @Override
//     public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand,
//                                     @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
//         FMLLog.info("onBlockActivated item=%s", heldItem);
//         PyCodeBlockTileEntity code_block = this.getEntity(world, pos);
//         return code_block == null || code_block.handleItemInteraction(playerIn, heldItem);
//     }
// 
//     @Override
//     public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
//         super.onBlockPlacedBy(world, pos, state, placer, stack);
//         PyCodeBlockTileEntity code_block = this.getEntity(world, pos);
//         if (code_block != null && stack.hasTagCompound()) {
//             code_block.readFromNBT(stack.getTagCompound());
//             code_block.getCode().setContext(world, code_block, pos);
//         }
//     }
// 
//     @Nullable
//     private PyCodeBlockTileEntity getEntity(World world, BlockPos pos) {
//         TileEntity entity = world.getTileEntity(pos);
//         if (entity instanceof PyCodeBlockTileEntity) {
//             return (PyCodeBlockTileEntity) entity;
//         }
//         return null;
//     }
// 
//     @Override
//     public TileEntity createNewTileEntity(World world, int meta) {
//         return new PyCodeBlockTileEntity();
//     }
// 
//     @Override
//     public void onEntityWalk(World world, BlockPos pos, Entity entity) {
//         PyCodeBlockTileEntity code_block = this.getEntity(world, pos);
//         if (entity instanceof EntityPlayer && code_block.getCode().hasKey("onPlayerWalk")) {
//             code_block.handleEntityInteraction(new MyEntityPlayer((EntityPlayer) entity), "onPlayerWalk");
//         } else if (entity instanceof EntityLivingBase) {
//             if (code_block.getCode().hasKey("onEntityWalk")) {
//                 code_block.handleEntityInteraction(new MyEntityLiving((EntityLivingBase) entity), "onEntityWalk");
//             }
//         }
//     }
// 
//     public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
//         PyCodeBlockTileEntity entity = this.getEntity(worldIn, pos);
// 
//         if (entity != null && !entity.getCode().getCode().isEmpty()) {
//             ItemStack itemstack = this.createStackedBlock(state);
//             if (!itemstack.hasTagCompound()) {
//                 itemstack.setTagCompound(new NBTTagCompound());
//             }
//             entity.writeToNBT(itemstack.getTagCompound());
//             spawnAsEntity(worldIn, pos, itemstack);
//         }
// 
//         super.breakBlock(worldIn, pos, state);
//     }
// 
//     @Nullable
//     @Override
//     public Item getItemDropped(IBlockState state, Random rand, int fortune) {
//         // we're already dropping the item in breakBlock()
//         return null;
//     }
// 
//     //    public int tickRate(World world) {
// //        return 10;
// //    }
// 
// //    public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
// //    canProvidePower
// 
// //
// //    @Override
// //    public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor) {
// //        super.onNeighborChange(world, pos, neighbor);
// //    }
// }
// 
// Path: src/main/java/net/mechanicalcat/pycode/items/PythonBlockItem.java
// public class PythonBlockItem extends ItemBlock {
//     public PythonBlockItem(PythonBlock block) {super(block);}
// 
//     @Override
//     public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
//         NBTTagCompound compound = stack.getTagCompound();
//         if (compound == null) return;
//         if (compound.hasKey(PythonCode.CODE_NBT_TAG)) tooltip.add("[has code]");
//     }
// }


// Path: src/main/java/net/mechanicalcat/pycode/init/ModBlocks.java
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.mechanicalcat.pycode.blocks.PythonBlock;
import net.mechanicalcat.pycode.items.PythonBlockItem;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;

/*
 * Copyright (c) 2017 Richard Jones <richard@mechanicalcat.net>
 * All Rights Reserved
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

package net.mechanicalcat.pycode.init;


public final class ModBlocks {
    public static PythonBlock python_block;
    public static PythonBlockItem python_block_item;