summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2015-11-26 12:09:24 -0800
committerAuke Kok <sofar@foo-projects.org>2015-11-26 12:09:24 -0800
commit1376e0b0b3e719d69adad465dc0a4f8eb6b73d35 (patch)
treec50d53c842d492b4aa0bd645ea5d35e2b594f784
parentaf91e433ec9c8afc9b203d98bc54ad77940d898b (diff)
Reduce the hitboxes on tomatoes and potatoes.
These were really awkward when harvesting, so drop the size by 10% or so.
-rw-r--r--potato.lua6
-rw-r--r--tomato.lua10
2 files changed, 14 insertions, 2 deletions
diff --git a/potato.lua b/potato.lua
index b1aa889..d86af42 100644
--- a/potato.lua
+++ b/potato.lua
@@ -22,6 +22,10 @@ minetest.register_node("crops:potato_eyes", {
walkable = false,
paramtype = "light",
groups = { snappy=3,flammable=3,flora=1,attached_node=1 },
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.45, -0.5, -0.45, 0.45, -0.4, 0.45}
+ },
on_place = function(itemstack, placer, pointed_thing)
local under = minetest.get_node(pointed_thing.under)
@@ -51,7 +55,7 @@ minetest.register_node("crops:potato_plant_" .. stage , {
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + (((math.min(stage, 4)) + 1) / 5), 0.5}
+ fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45}
}
})
end
diff --git a/tomato.lua b/tomato.lua
index 70603f3..eddce71 100644
--- a/tomato.lua
+++ b/tomato.lua
@@ -55,7 +55,7 @@ minetest.register_node("crops:tomato_plant_" .. stage , {
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + (((math.min(stage, 4)) + 1) / 5), 0.5}
+ fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45}
}
})
end
@@ -72,6 +72,10 @@ minetest.register_node("crops:tomato_plant_5" , {
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45}
+ },
on_dig = function(pos, node, digger)
local drops = {}
for i = 1, math.random(1, 2) do
@@ -102,6 +106,10 @@ minetest.register_node("crops:tomato_plant_6", {
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45}
+ },
})
minetest.register_craftitem("crops:tomato", {