summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2016-01-04 16:20:15 -0800
committerAuke Kok <sofar@foo-projects.org>2016-01-04 16:20:15 -0800
commit25ebe3ecfaade9923bfb03e2e0041ad3e7d740fa (patch)
treed514f7a5e33009be977c10a52abf2dd49c6beaa5
parent959c5f6864dde2f398e07e409553afef35570973 (diff)
Refine placement prediction.
We can't let the client predict seed placement, as node_placement_ prediction only considers pointed_thing.above, and we place the node in .under. However, we can predict the beanpole base properly.
-rw-r--r--polebean.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/polebean.lua b/polebean.lua
index 0feeffb..a729288 100644
--- a/polebean.lua
+++ b/polebean.lua
@@ -158,6 +158,7 @@ minetest.register_node("crops:beanpoles", {
groups = { snappy=3,flammable=3,flora=1,attached_node=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
+ node_placement_prediction = "crops:beanpole_base",
on_place = function(itemstack, placer, pointed_thing)
local under = minetest.get_node(pointed_thing.under)
@@ -181,7 +182,7 @@ minetest.register_craftitem("crops:green_bean_seed", {
description = "green bean seed",
inventory_image = "crops_green_bean_seed.png",
wield_image = "crops_green_bean_seed.png",
- node_placement_prediction = "crops:beanpole_plant_base_1",
+ node_placement_prediction = "", -- disabled, prediction assumes pointed_think.above!
on_place = function(itemstack, placer, pointed_thing)
local under = minetest.get_node(pointed_thing.under)