fix: resolve transparency rendering issues

This commit is contained in:
2026-04-18 11:55:53 +08:00
parent bb888fd7b7
commit 955c4ddec7
4 changed files with 58 additions and 128 deletions

View File

@@ -1,23 +1,11 @@
#include <Cubed/config.hpp>
#include <Cubed/map_table.hpp>
#include <Cubed/gameplay/block.hpp>
#include <Cubed/tools/cubed_assert.hpp>
#include <Cubed/tools/cubed_hash.hpp>
#include <array>
std::unordered_map<unsigned, std::string> MapTable::id_to_name_map;
std::unordered_map<size_t, unsigned> MapTable::name_to_id_map;
constexpr std::array<std::string_view, MAX_BLOCK_NUM> BLOCK_REISTER{
"air",
"grass_block",
"dirt",
"stone",
"sand",
"log",
"leaf"
};
const std::string& MapTable::get_name_from_id(unsigned id) {
auto it = id_to_name_map.find(id);