From dcacf7aebadf3379d3ffb7a252a5b181d7b00f24 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 4 Jan 2017 22:45:10 +0100 Subject: [PATCH] Turn apple and gold apple to craftitems --- mods/default/craftitems.lua | 16 ++++++++++++++++ mods/default/nodes.lua | 38 ------------------------------------- 2 files changed, 16 insertions(+), 38 deletions(-) diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index 86c4aa547a..6d63f8a19b 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -152,4 +152,20 @@ minetest.register_craftitem("default:quartz_crystal", { stack_max = 64, }) +minetest.register_node("default:apple", { + description = "Apple", + wield_image = "default_apple.png", + inventory_image = "default_apple.png", + stack_max = 64, + on_use = minetest.item_eat(4), +}) + +minetest.register_node("default:apple_gold", { + description = "Golden Apple", + wield_image = "default_apple_gold.png", + inventory_image = "default_apple_gold.png", + stack_max = 64, + on_use = minetest.item_eat(8), +}) + minetest.register_alias("default:steel_ingot", "default:iron_ingot") diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 3f1241f00f..1c331b5f60 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -1664,44 +1664,6 @@ minetest.register_node("default:obsidian", { groups = {cracky=4,level=2,oddly_breakable_by_hand=4}, }) -minetest.register_node("default:apple", { - description = "Apple", - drawtype = "plantlike", - visual_scale = 1.0, - tiles = {"default_apple.png"}, - inventory_image = "default_apple.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} - }, - stack_max = 64, - groups = {fleshy=3,dig_immediate=3,flammable=2}, - on_use = minetest.item_eat(4), - sounds = default.node_sound_defaults(), -}) - -minetest.register_node("default:apple_gold", { - description = "Golden Apple", - drawtype = "plantlike", - visual_scale = 1.0, - tiles = {"default_apple_gold.png"}, - inventory_image = "default_apple_gold.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} - }, - stack_max = 64, - groups = {fleshy=3,dig_immediate=3,flammable=2}, - on_use = minetest.item_eat(8), - sounds = default.node_sound_defaults(), -}) - minetest.register_node("default:dry_shrub", { description = "Dead Bush", drawtype = "plantlike",