block tick interval

This commit is contained in:
MihailRis
2024-05-31 18:14:50 +03:00
parent e969d4fea2
commit 7b0e31951b
3 changed files with 10 additions and 2 deletions
+4
View File
@@ -212,6 +212,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);
root->num("tick-interval", def.tickInterval);
if (def.tickInterval == 0) {
def.tickInterval = 1;
}
if (def.hidden && def.pickingItem == def.name+BLOCK_ITEM_SUFFIX) {
def.pickingItem = CORE_EMPTY;