Code: Select all
description = "Paint",
drawtype = "nodebox",
tiles = {"paint.png^[colorize:#FF0000"},
node_box = {
type = "wallmounted",
wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.499, 0.5},
wall_top = {-0.5, 0.499, -0.5, 0.5, 0.5, 0.5},
wall_side = {-0.5, -0.5, -0.5, -0.499, 0.5, 0.5},
},
drop = "",
groups = {attached_node = 1},
paramtype = "light",
paramtype2 = "wallmounted"
Now, I want to make a tool ("brush") to place such nodes on surfaces. My understanding is that, since it's an auto-rotated node, I need to use something like this:
Code: Select all
minetest.rotate_node(ItemStack({name = "paint:paint_layer"}), user, pointed_thing)
What is the the proper way to achieve the desired result, if any? Namely, to have a tool that places wall-mounted nodes which get oriented the same was as if placed by player's hand directly?