mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
core:empty as default picking-item for hidden blocks
This commit is contained in:
parent
6447db583b
commit
69f4e165a4
2 changed files with 28 additions and 20 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "../files/files.h"
|
||||
#include "../coders/json.h"
|
||||
#include "../typedefs.h"
|
||||
#include "../core_defs.h"
|
||||
#include "../data/dynamic.h"
|
||||
|
||||
#include "ContentPack.h"
|
||||
|
|
@ -207,6 +208,10 @@ void ContentLoader::loadBlock(Block& def, std::string name, fs::path file) {
|
|||
root->str("script-name", def.scriptName);
|
||||
root->str("ui-layout", def.uiLayout);
|
||||
root->num("inventory-size", def.inventorySize);
|
||||
|
||||
if (def.hidden && def.pickingItem == def.name+BLOCK_ITEM_SUFFIX) {
|
||||
def.pickingItem = CORE_EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
void ContentLoader::loadCustomBlockModel(Block& def, dynamic::Map* primitives) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue