Level.getBlockState(BlockPos)
You should also first check Level.isLoaded(BlockPos) to avoid unnecessary loading of chunks - or crashing if you try to do that on that client.
If you don't have access to a Level, (either directly or from a player/entity) then you are probably doing something wrong.
Mohist is not forge and isn't supported here. You need to speak to them.
Either way, no mod that uses mixins will work with java 20, mixin only supports java 17