Rework throwing code, add egg
This commit is contained in:
parent
e85a830a01
commit
b6575ab192
30 changed files with 142 additions and 139 deletions
|
@ -107,7 +107,7 @@ mobs:register_mob("mobs_mc:chicken", {
|
|||
|
||||
local pos = self.object:getpos()
|
||||
|
||||
minetest.add_item(pos, "mcl_mobitems:egg")
|
||||
minetest.add_item(pos, "mcl_throwing:egg")
|
||||
|
||||
minetest.sound_play("default_place_node_hard", {
|
||||
pos = pos,
|
||||
|
@ -121,32 +121,6 @@ mobs:register_mob("mobs_mc:chicken", {
|
|||
--mobs:register_spawn("mobs_mc:chicken", {"default:dirt_with_grass"}, 20, 8, 7000, 1, 31000)
|
||||
|
||||
|
||||
-- from mobs_redo
|
||||
-- egg
|
||||
minetest.register_node(":mobs:egg", {
|
||||
description = "Chicken Egg",
|
||||
tiles = {"mobs_chicken_egg.png"},
|
||||
inventory_image = "mobs_chicken_egg.png",
|
||||
visual_scale = 0.7,
|
||||
drawtype = "plantlike",
|
||||
wield_image = "mobs_chicken_egg.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
sunlight_propagates = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "mobs:egg", param2 = 1})
|
||||
end
|
||||
end,
|
||||
on_use = mobs_shoot_egg
|
||||
})
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("mobs:chicken", "mobs_mc:chicken")
|
||||
|
||||
|
|
|
@ -28,15 +28,11 @@ mobs:register_mob("mobs_mc:skeleton", {
|
|||
damage = 1,
|
||||
armor = 200,
|
||||
drops = {
|
||||
{name = "throwing:arrow",
|
||||
{name = "mcl_throwing:arrow",
|
||||
chance = 1,
|
||||
min = 0,
|
||||
max = 2,},
|
||||
{name = "throwing:bow",
|
||||
chance = 11,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
{name = "bonemeal:bone",
|
||||
{name = "default:bone",
|
||||
chance = 1,
|
||||
min = 0,
|
||||
max = 2,},
|
||||
|
@ -63,7 +59,7 @@ mobs:register_mob("mobs_mc:skeleton", {
|
|||
light_damage = 1,
|
||||
view_range = 16,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "throwing:arrow_entity",
|
||||
arrow = "mcl_throwing:arrow_entity",
|
||||
shoot_interval = 2.5,
|
||||
shoot_offset = 1,
|
||||
--'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
|
||||
|
@ -96,18 +92,18 @@ mobs:register_mob("mobs_mc:skeleton2", {
|
|||
damage = 3,
|
||||
armor = 200,
|
||||
drops = {
|
||||
{name = "throwing:arrow",
|
||||
{name = "default:coal_lump",
|
||||
chance = 1,
|
||||
min = 0,
|
||||
max = 1,},
|
||||
{name = "default:bone",
|
||||
chance = 1,
|
||||
min = 0,
|
||||
max = 2,},
|
||||
{name = "throwing:bow",
|
||||
chance = 11,
|
||||
{name = "heads:wither_skeleton",
|
||||
chance = 40,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
{name = "bonemeal:bone",
|
||||
chance = 1,
|
||||
min = 0,
|
||||
max = 2,},
|
||||
},
|
||||
animation = {
|
||||
speed_normal = 30,
|
||||
|
@ -131,7 +127,7 @@ mobs:register_mob("mobs_mc:skeleton2", {
|
|||
light_damage = 0,
|
||||
view_range = 16,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "throwing:arrow_entity",
|
||||
arrow = "mcl_throwing:arrow_entity",
|
||||
shoot_interval = 0.5,
|
||||
shoot_offset = 1,
|
||||
--'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
|
||||
|
@ -143,7 +139,7 @@ mobs:register_spawn("mobs_mc:skeleton2", {"group:crumbly", "group:cracky", "grou
|
|||
|
||||
|
||||
arrows = {
|
||||
{"throwing:arrow", "throwing:arrow_entity" },
|
||||
{"mcl_throwing:arrow", "mcl_throwing:arrow_entity" },
|
||||
}
|
||||
|
||||
-- compatibility
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue