aboutsummaryrefslogtreecommitdiff
path: root/src/scriptapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r--src/scriptapi.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 3868d1035..35f00b7b5 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -3976,8 +3976,11 @@ static int l_register_item_raw(lua_State *L)
// Default to having client-side placement prediction for nodes
// ("" in item definition sets it off)
- if(def.type == ITEM_NODE && def.node_placement_prediction == "__default"){
- def.node_placement_prediction = name;
+ if(def.node_placement_prediction == "__default"){
+ if(def.type == ITEM_NODE)
+ def.node_placement_prediction = name;
+ else
+ def.node_placement_prediction = "";
}
// Register item definition