Well what are you having issues with?
Easiest way I can think of:
Keep a list of some sort of bounding boxes in the world class. AABBs are quite easy to implement so I won’t go in to detail if you don’t need me to.
Every entity will also have a bounding box. Entity to entity collision detection is fairly easy, just loop through the lost of entities and see if the bounding boxes collide.
Block to entity collision detection is a little more involved. You will need to grab the bounding boxes of the blocks around the entity and then test for collision.
I would personally just do a simple check every tick in the entity class to see if there is a block below it. If there is, the entity is obviously on the ground and you will not need to perform collision responses in the downward z direction. All other axis must be tested and collision responses must be handled accordingly.
Collision response should be easy for blocks, just repel the player backwards in the direction that the player is colliding. The same could work for blocks. You could save the last location the entity was and then revert back to it after the collision occurred, but you will want to add some “padding” push back so that the collision will not happen again within a small period of time because of course this will cause a rapid “jerking” movement along the collision vector.
I’m sure I could post some solid math equations later! Just give me a few hours, today is the last day of school and I’m going to hang out with friends to celebrate