diff --git a/mods/farming/compatibility.lua b/mods/farming/compatibility.lua index 425132e..59a8355 100644 --- a/mods/farming/compatibility.lua +++ b/mods/farming/compatibility.lua @@ -10,7 +10,32 @@ end --= Overrides (add food_* group to apple and brown mushroom) +local box = { + type = "fixed", + fixed = { + {-0.1875, -0.4375, -0.1875, 0.1875, 0.0625, 0.1875}, -- Bottom + {-0.25, -0.375, -0.25, 0.25, 0, 0.25}, -- Middle + -- {-0.1875, 0.0625, -0.1875, 0.1875, 0, 0.1875}, -- Top + {-0.0625, 0.0625, -0.0625, 0, 0.125, 0}, -- NodeBox4 + {0.0625, 0.0625, 0.0625, 0, 0.125, 0}, -- NodeBox5 + {0.0625, 0.125, -0.0625, 0, 0.1875, 0}, -- NodeBox4 + {-0.0625, 0.125, 0.0625, 0, 0.1875, 0}, -- NodeBox5 + } + } + minetest.override_item("default:apple", { + drawtype = "nodebox", + paramtype = "light", + node_box = box, + selection_box = box, + tiles = { -- +Y, -Y, +X, -X, +Z, -Z + "apple_bottom.png^apple_top_overlay.png", + "apple_bottom.png", + "apple_side.png", + "apple_side.png", + "apple_side.png", + "apple_side.png", + }, groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1} }) diff --git a/mods/farming/textures/apple_bottom.png b/mods/farming/textures/apple_bottom.png new file mode 100644 index 0000000..195d27e Binary files /dev/null and b/mods/farming/textures/apple_bottom.png differ diff --git a/mods/farming/textures/apple_side.png b/mods/farming/textures/apple_side.png new file mode 100644 index 0000000..e87459a Binary files /dev/null and b/mods/farming/textures/apple_side.png differ diff --git a/mods/farming/textures/apple_top_overlay.png b/mods/farming/textures/apple_top_overlay.png new file mode 100644 index 0000000..db97344 Binary files /dev/null and b/mods/farming/textures/apple_top_overlay.png differ