Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
- if (!worldIn.isRemote) {
- if (heldItem.getItem() != null && heldItem.getItem() instanceof ItemArgent) {
- worldIn.setBlockToAir(pos);
- worldIn.createExplosion(playerIn, pos.getX(), pos.getY(), pos.getZ(), 0, true);
- BuddyBob bud = new BuddyBob(worldIn);
- bud.setPosition(pos.getX() + hitX, pos.getY() + hitY, pos.getZ() + hitZ);
- bud.setOwnerId(playerIn.getPersistentID());
- worldIn.spawnEntityInWorld(bud);
- }
- }
- return super.onBlockActivated(worldIn, pos, state, playerIn, hand, heldItem, side, hitX, hitY, hitZ);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement