Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BlockHarvestableFireberryBush extends Block
- {
- public BlockHarvestableFireberryBush(String itemName)
- {
- super(Material.leaves);
- setBlockName(Reference.MODID + "_" + itemName);
- setCreativeTab(Pyromancy.tabPyromancy);
- setStepSound(soundTypeGrass);
- setBlockTextureName(Reference.MODID + ":" + itemName);
- setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1.0F, 0.9F);
- }
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
- {
- world.playSoundEffect(x, y, z, "random.pop", 0.4F, player.getRNG().nextFloat() + 0.8F);
- player.inventory.addItemStackToInventory(new ItemStack(Pyromancy.fireBerry, 3));
- world.setBlock(x,y,z, Pyromancy.fireberryBush);
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement