Skip to content

Commit

Permalink
refactor: simplify material type in DevTools
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Jun 29, 2024
1 parent f520279 commit 5a1e276
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/endstone_core/gui/dev_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ void DevTools::showBlockWindow(bool *open, EndstoneServer *server, nlohmann::jso
const auto &material = block_legacy.getMaterial();
auto material_name = magic_enum::enum_name(material.getType());
materials[material_name] = {
{"type", material.getType()},
{"isNeverBuildable", material.isNeverBuildable()},
{"isAlwaysDestroyable", material.isAlwaysDestroyable()},
{"isReplaceable", material.isReplaceable()},
Expand All @@ -469,11 +468,7 @@ void DevTools::showBlockWindow(bool *open, EndstoneServer *server, nlohmann::jso
}

block_types[name] = {
{"material",
{
{"type", material.getType()},
{"name", magic_enum::enum_name(material.getType())},
}},
{"material", magic_enum::enum_name(material.getType())},
{"tags", tags},
};

Expand Down

0 comments on commit 5a1e276

Please sign in to comment.