Remove craftitems and tools from mobs_mc
This commit is contained in:
parent
8a5fc728ad
commit
0257a4104c
|
@ -323,21 +323,6 @@ mobs:register_spawn("mobs_mc:horse2", {"default:dirt_with_dry_grass"}, 20, 12, 2
|
|||
mobs:register_spawn("mobs_mc:horse3", {"default:desert_sand"}, 20, 8, 17000, 1, 5)
|
||||
|
||||
|
||||
-- saddle
|
||||
minetest.register_craftitem(":mobs:saddle", {
|
||||
description = "Saddle",
|
||||
inventory_image = "saddle.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:saddle",
|
||||
recipe = {
|
||||
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||
{"farming:string", "", "farming:string"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"}
|
||||
},
|
||||
})
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:horse", "mobs_mc:horse")
|
||||
mobs:alias_mob("mobs:horse2", "mobs_mc:horse2")
|
||||
|
|
|
@ -135,72 +135,6 @@ mobs:register_mob("mobs_mc:pig", {
|
|||
mobs:register_spawn("mobs_mc:pig", {"default:dirt_with_grass"}, 20, 12, 5000, 1, 31000)
|
||||
|
||||
|
||||
-- pork
|
||||
minetest.register_craftitem(":mobs:pork_raw", {
|
||||
description = "Raw Porkchop",
|
||||
inventory_image = "pork_raw.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":mobs:pork_cooked", {
|
||||
description = "Cooked Porkchop",
|
||||
inventory_image = "pork_cooked.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mobs:pork_cooked",
|
||||
recipe = "mobs:pork_raw",
|
||||
cooktime = 5,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem(":mobs:saddle", {
|
||||
description = "Saddle",
|
||||
inventory_image = "saddle.png",
|
||||
})
|
||||
|
||||
minetest.register_tool(":mobs:carrotstick", {
|
||||
description = "Carrot on a Stick",
|
||||
inventory_image = "carrot_on_a_stick.png",
|
||||
stack_max = 1,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:carrotstick",
|
||||
recipe = {
|
||||
{"", "", "farming:string" },
|
||||
{"", "group:stick", "farming:string" },
|
||||
{"group:stick", "", "farming:bread" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:carrotstick",
|
||||
recipe = {
|
||||
{"", "", "farming:string" },
|
||||
{"", "group:stick", "farming:string" },
|
||||
{"group:stick", "", "farming:carrot" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mobs:carrotstick",
|
||||
recipe = {"fishing:pole_wood", "farming:carrot"},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:saddle",
|
||||
recipe = {
|
||||
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||
{"farming:string", "", "farming:string"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"}
|
||||
},
|
||||
})
|
||||
|
||||
--api code to fix
|
||||
--[[
|
||||
|
||||
|
|
|
@ -126,27 +126,6 @@ print(item:get_name(), minetest.get_item_group(item:get_name(), "dye"))
|
|||
--mobs:register_spawn("mobs_mc:sheep", {"default:dirt_with_grass"}, 20, 12, 5000, 2, 31000)
|
||||
|
||||
|
||||
--mutton
|
||||
minetest.register_craftitem(":mobs:mutton_raw", {
|
||||
description = "Raw Mutton",
|
||||
inventory_image = "mutton_raw.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":mobs:mutton_cooked", {
|
||||
description = "Cooked Mutton",
|
||||
inventory_image = "mutton_cooked.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mobs:mutton_cooked",
|
||||
recipe = "mobs:mutton_raw",
|
||||
cooktime = 5,
|
||||
})
|
||||
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:sheep", "mobs_mc:sheep")
|
||||
|
||||
|
|
|
@ -142,51 +142,6 @@ mobs:register_mob("mobs_mc:skeleton2", {
|
|||
mobs:register_spawn("mobs_mc:skeleton2", {"group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 7, -1, 5000, 4, -3000)
|
||||
|
||||
|
||||
|
||||
-- leather, feathers, etc.
|
||||
minetest.register_craftitem(":mobs:feather", {
|
||||
description = "Feather",
|
||||
inventory_image = "mobs_feather.png",
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
--maikerumines throwing code
|
||||
--arrow (weapon)
|
||||
minetest.register_craftitem(":mobs:arrow", {
|
||||
description = "ESM Arrow",
|
||||
inventory_image = "arrow.png",
|
||||
})
|
||||
|
||||
minetest.register_node(":mobs:arrow_box", {
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
-- Shaft
|
||||
{-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17},
|
||||
--Spitze
|
||||
{-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17},
|
||||
{-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17},
|
||||
--Federn
|
||||
{6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17},
|
||||
{7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17},
|
||||
{7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17},
|
||||
{6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17},
|
||||
|
||||
{7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17},
|
||||
{8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17},
|
||||
{8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17},
|
||||
{7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17},
|
||||
}
|
||||
},
|
||||
tiles = {"throwing_arrow.png", "throwing_arrow.png", "throwing_arrow_back.png", "throwing_arrow_front.png", "throwing_arrow_2.png", "throwing_arrow.png"},
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
|
||||
|
||||
local THROWING_ARROW_ENTITY={
|
||||
physical = false,
|
||||
timer=0,
|
||||
|
@ -254,72 +209,10 @@ minetest.add_particle({
|
|||
end
|
||||
|
||||
|
||||
minetest.register_entity(":mobs:arrow_entity", THROWING_ARROW_ENTITY)
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mobs:arrow 48',
|
||||
recipe = {
|
||||
{'default:steel_ingot'},
|
||||
{'default:stick'},
|
||||
{'mobs:feather'},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
arrows = {
|
||||
{"mobs:arrow", "mobs:arrow_entity" },
|
||||
{"throwing:arrow", "throwing:arrow_entity" },
|
||||
}
|
||||
|
||||
local throwing_shoot_arrow = function(itemstack, player)
|
||||
for _,arrow in ipairs(arrows) do
|
||||
if player:get_inventory():get_stack("main", player:get_wield_index()+1):get_name() == arrow[1] then
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
player:get_inventory():remove_item("main", arrow[1])
|
||||
end
|
||||
local playerpos = player:getpos()
|
||||
--local obj = minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) --current
|
||||
local obj = minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) --mc
|
||||
local dir = player:get_look_dir()
|
||||
obj:setvelocity({x=dir.x*22, y=dir.y*22, z=dir.z*22})
|
||||
obj:setacceleration({x=dir.x*-3, y=-10, z=dir.z*-3})
|
||||
obj:setyaw(player:get_look_yaw()+math.pi)
|
||||
minetest.sound_play("throwing_sound", {pos=playerpos})
|
||||
if obj:get_luaentity().player == "" then
|
||||
obj:get_luaentity().player = player
|
||||
end
|
||||
obj:get_luaentity().node = player:get_inventory():get_stack("main", 1):get_name()
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
minetest.register_tool(":mobs:bow_wood", {
|
||||
description = "ESM Wood Bow",
|
||||
inventory_image = "bow_standby.png",
|
||||
stack_max = 1,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if throwing_shoot_arrow(itemstack, user, pointed_thing) then
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/50)
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mobs:bow_wood',
|
||||
recipe = {
|
||||
{'farming:cotton', 'default:stick', ''},
|
||||
{'farming:cotton', '', 'default:stick'},
|
||||
{'farming:cotton', 'default:stick', ''},
|
||||
}
|
||||
})
|
||||
--end maikerumine code
|
||||
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
|
||||
|
||||
|
|
|
@ -155,8 +155,8 @@ mobs:register_mob("mobs_mc:wolf", {
|
|||
tool = clicker:get_wielded_item()
|
||||
local dog
|
||||
local ent
|
||||
if tool:get_name() == "mobs:meat_raw" then
|
||||
clicker:get_inventory():remove_item("main", "mobs:meat_raw")
|
||||
if tool:get_name() == "mcl_mobitems:meat_raw" then
|
||||
clicker:get_inventory():remove_item("main", "mcl_mobitems:meat_raw")
|
||||
dog = minetest.add_entity(self.object:getpos(), "mobs_mc:dog")
|
||||
ent = dog:get_luaentity()
|
||||
ent.owner = clicker:get_player_name()
|
||||
|
|
|
@ -80,14 +80,6 @@ mobs:register_mob("mobs_mc:zombie", {
|
|||
mobs:register_spawn("mobs_mc:zombie", {"group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 7, -1, 5000, 4, 31000)
|
||||
|
||||
|
||||
-- meat rotted
|
||||
minetest.register_craftitem(":mobs:rotten_flesh", {
|
||||
description = "Rotten Flesh",
|
||||
inventory_image = "mobs_rotten_flesh.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:zombie", "mobs_mc:zombie")
|
||||
|
||||
|
|
|
@ -97,14 +97,6 @@ mobs:register_spawn("mobs_mc:pigman", {"nether:portal"}, 15, -1, 500, 4, 31000)
|
|||
mobs:register_spawn("mobs_mc:pigman", {"default:obsidian"}, 17, -1, 1900, 1, 31000)
|
||||
|
||||
|
||||
-- meat rotted
|
||||
minetest.register_craftitem(":mobs:rotten_flesh", {
|
||||
description = "Rotten Flesh",
|
||||
inventory_image = "mobs_rotten_flesh.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:pigman", "mobs_mc:pigman")
|
||||
|
||||
|
|
Loading…
Reference in New Issue