touchedBlock

Returns an instance of BlockInfo of the block the entity is currently standing on or swimming in, else it will be the BlockInfo of air - use touchedBlockNoAir if you don't need any info about air.