if(isAlive){
if(body.isActive()){
for(Chunk chunk : gameScreen.chunks){ <-- all game chunks
Chunk checkCheck = chunk;
for(Block blocks : checkCheck.getBlocks()){ <-- all chunks blocks
Block checkBlock = blocks;
if(checkBlock != this){ <-- make sure its not the block we are currently checking
if(checkBlock.blockFace_UP.overlaps(boxRectangle)){ if the if the checkbox'es rectangle above it overlaps the checking rectangle then we set it to dirt
setType(BlockType.DIRT);
}else{
setType(BlockType.GRASS_TOP); else we set it to grass top
}
}
}
}
}
}
it just makes everything grass tiles