mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add block.reload_script, item.reload_script
This commit is contained in:
parent
1bb25e99c6
commit
4400f7fbfb
7 changed files with 77 additions and 19 deletions
|
|
@ -121,6 +121,14 @@ public:
|
|||
return *found->second;
|
||||
}
|
||||
|
||||
T& require(const std::string& id) {
|
||||
const auto& found = defs.find(id);
|
||||
if (found == defs.end()) {
|
||||
throw std::runtime_error("missing content unit " + id);
|
||||
}
|
||||
return *found->second;
|
||||
}
|
||||
|
||||
const auto& getDefs() const {
|
||||
return defs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue