I want to know which block is under the Player .And if the BLock is identical to another block (selected before), do something. i tried something like this: (But I know it doesn't work at all). Thank you!
BlockPos PlayerIsStandingOn = player.getPosition().down();
Block PlayerIsStandingOnBlock = worldIn.getBlockState(PlayerIsStandingOn);
if (PlayerIsStandingOn == randomBlock) { }