Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
minetest_game
Commits
32f7051e
Commit
32f7051e
authored
8 years ago
by
Tim
Committed by
paramat
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix sapling placement handling of on_rightclick and CONTENT_IGNORE
parent
67fc2247
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/default/trees.lua
+9
-4
9 additions, 4 deletions
mods/default/trees.lua
with
9 additions
and
4 deletions
mods/default/trees.lua
+
9
−
4
View file @
32f7051e
...
...
@@ -435,12 +435,17 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
sapling_name
,
minp_relative
,
maxp_relative
,
interval
)
-- Position of sapling
local
pos
=
pointed_thing
.
under
local
node
=
minetest
.
get_node
(
pos
)
local
pdef
=
minetest
.
registered_nodes
[
node
.
name
]
local
node
=
minetest
.
get_node_or_nil
(
pos
)
local
pdef
=
node
and
minetest
.
registered_nodes
[
node
.
name
]
if
pdef
and
pdef
.
on_rightclick
and
not
placer
:
get_player_control
().
sneak
then
return
pdef
.
on_rightclick
(
pos
,
node
,
placer
,
itemstack
,
pointed_thing
)
end
if
not
pdef
or
not
pdef
.
buildable_to
then
pos
=
pointed_thing
.
above
node
=
minetest
.
get_node
(
pos
)
pdef
=
minetest
.
registered_nodes
[
node
.
name
]
node
=
minetest
.
get_node
_or_nil
(
pos
)
pdef
=
node
and
minetest
.
registered_nodes
[
node
.
name
]
if
not
pdef
or
not
pdef
.
buildable_to
then
return
itemstack
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment