diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2018-08-31 11:02:27 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2018-08-31 11:02:27 +0100 |
commit | 65fe81767c40f4d3dbf17fd03f2d07d498d70a30 (patch) | |
tree | 5671d8aee0dd67ad3271f2d2c4074f959342a86c | |
parent | 4038939c3227afcecb31fe06e521c3f7a90babc8 (diff) |
tweaked hairball items
-rw-r--r-- | kitten.lua | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -126,11 +126,12 @@ mobs:alias_mob("mobs:kitten", "mobs_animal:kitten") -- compatibility local hairball_items = { "default:stick", "default:coal_lump", "default:dry_shrub", "flowers:rose", - "mobs_animal:rat", "default:grass_1", "farming:seed_wheat", "dye:green", - "farming:seed_cotton", "default:flint", "default:sapling", "dye:white", - "default:clay_lump", "default:paper", "default:dry_grass_1", "dye:red", - "farming:string", "mobs:chicken_feather", "default:acacia_bush_sapling", - "default:bush_sapling", "default:copper_lump", "default:iron_lump", + "mobs_animal:rat", "default:grass_1", "farming:seed_wheat", "dye:green", "", + "farming:seed_cotton", "default:flint", "default:sapling", "dye:white", "", + "default:clay_lump", "default:paper", "default:dry_grass_1", "dye:red", "", + "farming:string", "mobs:chicken_feather", "default:acacia_bush_sapling", "", + "default:bush_sapling", "default:copper_lump", "default:iron_lump", "", + "dye:black", "dye:brown", "default:obsidian_shard", "default:tin_lump" } minetest.register_craftitem(":mobs:hairball", { @@ -143,7 +144,9 @@ minetest.register_craftitem(":mobs:hairball", { local newpos = {x = pos.x + dir.x, y = pos.y + dir.y + 1.5, z = pos.z + dir.z} local item = hairball_items[math.random(1, #hairball_items)] - minetest.add_item(newpos, {name = item}) + if item ~= "" then + minetest.add_item(newpos, {name = item}) + end minetest.sound_play("default_place_node_hard", { pos = newpos, |