minetest.rotate_node

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.rotate_node(itemstack, placer, pointed_thing)

Description

calls minetest.rotate_and_place() with infinitestacks set according to the state of the creative mode setting, and checks for "sneak" to set the invert_wall parameter.

Example

minetest.register_node("default:tree", {
	description = "Tree",
	tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
	paramtype2 = "facedir",
	is_ground_content = false,
	groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
	sounds = default.node_sound_wood_defaults(),
	on_place = minetest.rotate_node
})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox