mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
Added 3 unicode pages for font, fixed UI, added Block.breakable
Added 1, 2, 3 and 4 unicode pages from Minecraft. Font now uses std::wstring instead of std::string Added Block.breakable field (the only unbreakable block is bedrock) Bedrock is now selectable
This commit is contained in:
parent
b2872650d6
commit
bdd3fbf7d4
17 changed files with 94 additions and 47 deletions
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "Chunk.h"
|
||||
#include "Chunks.h"
|
||||
#include "Block.h"
|
||||
#include "voxel.h"
|
||||
#include "../world/World.h"
|
||||
#include "WorldGenerator.h"
|
||||
#include "../lighting/Lighting.h"
|
||||
|
|
@ -36,6 +38,12 @@ void ChunksLoader::_thread(){
|
|||
WorldGenerator::generate(chunk->voxels, chunk->x, chunk->y, chunk->z, world->seed);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < CHUNK_VOL; i++){
|
||||
if (Block::blocks[chunk->voxels[i].id] == nullptr){
|
||||
std::cout << "corruped block detected at " << i << " of chunk " << chunk->x << "x" << chunk->z << std::endl;
|
||||
chunk->voxels[i].id = 11;
|
||||
}
|
||||
}
|
||||
lighting.onChunkLoaded(chunk->x, chunk->y, chunk->z, true);
|
||||
}
|
||||
else if (state == RENDER){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue