tool can place vertically, protector recipe changed (gold instead of steel ingot)
This commit is contained in:
parent
965ac2eaa5
commit
a57800c046
3 changed files with 10 additions and 4 deletions
7
tool.lua
7
tool.lua
|
|
@ -28,9 +28,14 @@ minetest.register_craftitem("protector:tool", {
|
|||
local dir = minetest.dir_to_facedir( user:get_look_dir() )
|
||||
local vec = {x = 0, y = 0, z = 0}
|
||||
local gap = (protector.radius * 2) + 1
|
||||
local pit = user:get_look_pitch()
|
||||
|
||||
-- set placement coords
|
||||
if dir == 0 then
|
||||
if pit > 1.2 then
|
||||
vec.y = gap -- up
|
||||
elseif pit < -1.2 then
|
||||
vec.y = -gap -- down
|
||||
elseif dir == 0 then
|
||||
vec.z = gap -- north
|
||||
elseif dir == 1 then
|
||||
vec.x = gap -- east
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue