Vector3f posVec = new Vector3f(posX, posY, posZ);
Vector3f motVec = new Vector3f(motionX, motionY, motionZ);
Vector3f nextPosVec = Vector3f.add(posVec, motVec, null);
//Raytrace the motion of this grenade
MovingObjectPosition hit = worldObj.rayTraceBlocks(posVec.toVec3(), nextPosVec.toVec3());
//If we hit block
if(hit != null && hit.typeOfHit == MovingObjectType.BLOCK)
{
//Get the blockID and block material
Block block = worldObj.getBlock(hit.blockX, hit.blockY, hit.blockZ);