Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BlockHarvestableFireberryBush extends BlockTemplate
- {
- public BlockHarvestableFireberryBush(String itemName)
- {
- super(itemName, Material.leaves);
- setCreativeTab(Pyromancy.tabPyromancy);
- setStepSound(soundTypeGrass);
- setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1.0F, 0.9F);
- }
- @SideOnly(Side.CLIENT)
- public EnumWorldBlockLayer getBlockLayer()
- {
- return EnumWorldBlockLayer.CUTOUT_MIPPED;
- }
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
- {
- world.playSoundEffect(hitX, hitY, hitZ, "random.pop", 0.4F, player.getRNG().nextFloat() + 0.8F);
- player.inventory.addItemStackToInventory(new ItemStack(ItemRegistry.fireBerry, 3));
- world.setBlockState(pos, BlockRegistry.fireberryBush.getDefaultState());
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement