Update mobs_mc

This commit is contained in:
Wuzzy 2017-08-06 14:09:25 +02:00
parent a0347a6700
commit 3fb0b6dd44
14 changed files with 30 additions and 23 deletions

View file

@ -103,7 +103,7 @@ end
minetest.register_entity("mobs_mc:arrow_entity", THROWING_ARROW_ENTITY) minetest.register_entity("mobs_mc:arrow_entity", THROWING_ARROW_ENTITY)
arrows = { local arrows = {
{"mobs_mc:arrow", "mobs_mc:arrow_entity" }, {"mobs_mc:arrow", "mobs_mc:arrow_entity" },
} }
@ -188,7 +188,7 @@ if c("egg") then
visual = "sprite", visual = "sprite",
visual_size = {x=.5, y=.5}, visual_size = {x=.5, y=.5},
textures = {"mobs_chicken_egg.png"}, textures = {"mobs_chicken_egg.png"},
velocity = egg_velocity, velocity = egg_VELOCITY,
hit_player = function(self, player) hit_player = function(self, player)
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, { player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {

View file

@ -56,8 +56,8 @@ mobs:register_mob("mobs_mc:creeper", {
local wdef = item:get_definition() local wdef = item:get_definition()
item:add_wear(1000) item:add_wear(1000)
-- Tool break sound -- Tool break sound
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then if item:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {pos = pt.above, gain = 0.5}) minetest.sound_play(wdef.sound.breaks, {pos = clicker:getpos(), gain = 0.5})
end end
clicker:set_wielded_item(item) clicker:set_wielded_item(item)
end end

View file

@ -133,9 +133,9 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
minetest.set_node(pos, {name="air"}) minetest.set_node(pos, {name="air"})
if math.random(1,2)==1 then if math.random(1,2)==1 then
dx = math.random(-1,1) local dx = math.random(-1,1)
dy = math.random(-1,1) local dy = math.random(-1,1)
dz = math.random(-1,1) local dz = math.random(-1,1)
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz} local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
minetest.set_node(p, {name="air"}) minetest.set_node(p, {name="air"})
end end
@ -152,7 +152,7 @@ mobs:register_arrow(":mobs_mc:fireball2", {
-- direct hit, no fire... just plenty of pain -- direct hit, no fire... just plenty of pain
hit_player = function(self, player) hit_player = function(self, player)
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64}) minetest.sound_play("tnt_explode", {pos = player:getpos(), gain = 1.5, max_hear_distance = 2*64})
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 0.5, full_punch_interval = 0.5,
damage_groups = {fleshy = 6}, damage_groups = {fleshy = 6},
@ -160,9 +160,9 @@ mobs:register_arrow(":mobs_mc:fireball2", {
end, end,
hit_mob = function(self, player) hit_mob = function(self, mob)
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64}) minetest.sound_play("tnt_explode", {pos = mob:getpos(), gain = 1.5, max_hear_distance = 2*64})
player:punch(self.object, 1.0, { mob:punch(self.object, 1.0, {
full_punch_interval = 0.5, full_punch_interval = 0.5,
damage_groups = {fleshy = 12}, damage_groups = {fleshy = 12},
}, nil) }, nil)

View file

@ -149,7 +149,9 @@ mobs:register_mob("mobs_mc:enderman", {
--spawn on solid blocks --spawn on solid blocks
mobs:register_spawn("mobs_mc:enderman", mobs_mc.spawn.desert, 7, 0, 9000, -31000, 31000) mobs:register_spawn("mobs_mc:enderman", mobs_mc.spawn.desert, 7, 0, 9000, -31000, 31000)
mobs:register_spawn("mobs_mc:enderman", mobs_mc.end_city, minetest.LIGHT_MAX+1, 0, 9000, -31000, -5000) --mobs:register_spawn("mobs_mc:enderman", mobs_mc.end_city, minetest.LIGHT_MAX+1, 0, 9000, -31000, -5000)
mobs:spawn_specific("mobs_mc:enderman", "mcl_end:end_stone", {"air"}, 0, minetest.LIGHT_MAX+1, 5, 20, 2, -31000, -5000)
mobs:spawn_specific("mobs_mc:enderman", "mcl_end:end_stone", {"mcl_portals:void"}, 0, minetest.LIGHT_MAX+1, 5, 20, 2, -31000, -5000)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0) mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0)

View file

@ -112,9 +112,9 @@ local spawn = {
local spawn_desert = table.copy(spawn) local spawn_desert = table.copy(spawn)
spawn_desert.nodes = mobs_mc.spawn.desert spawn_desert.nodes = mobs_mc.spawn.desert
on_spawn = function(self, pos) local on_spawn = function(self, pos)
local ent = self:get_luaentity() local ent = self:get_luaentity()
texture = "mobs_mc_rabbit_gold.png" local texture = "mobs_mc_rabbit_gold.png"
ent.base_texture = { "mobs_mc_rabbit_gold.png" } ent.base_texture = { "mobs_mc_rabbit_gold.png" }
self:set_properties({textures = ent.base_texture}) self:set_properties({textures = ent.base_texture})
end end

View file

@ -83,7 +83,9 @@ mobs:register_arrow("mobs_mc:shulkerbullet", {
mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0) mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0)
mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, 0, minetest.LIGHT_MAX+1, 5, 3, 1, -31000, -5000) --mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, 0, minetest.LIGHT_MAX+1, 5, 3, 1, -31000, -5000)
mobs:spawn_specific("mobs_mc:shulker", "mcl_end:purpur_block", {"air"}, 0, minetest.LIGHT_MAX+1, 5, 20, 2, -31000, -5000)
mobs:spawn_specific("mobs_mc:shulker", "mcl_end:purpur_block", {"mcl_portals:void"}, 0, minetest.LIGHT_MAX+1, 5, 20, 2, -31000, -5000)

View file

@ -75,6 +75,7 @@ local skeleton = {
shoot_end = 90, shoot_end = 90,
punch_start = 70, punch_start = 70,
punch_end = 90, punch_end = 90,
-- TODO: Implement and fix death animation
--die_start = 120, --die_start = 120,
--die_end = 130, --die_end = 130,
--die_loop = false, --die_loop = false,

View file

@ -70,6 +70,7 @@ mobs:register_mob("mobs_mc:witherskeleton", {
shoot_end = 90, shoot_end = 90,
punch_start = 70, punch_start = 70,
punch_end = 90, punch_end = 90,
-- TODO: Implement and fix death animation
--die_start = 120, --die_start = 120,
--die_end = 130, --die_end = 130,
--die_loop = false, --die_loop = false,

View file

@ -45,9 +45,9 @@ mobs:register_mob("mobs_mc:snowman", {
walk_end = 20, walk_end = 20,
run_start = 0, run_start = 0,
run_end = 20, run_end = 20,
--die_start = 40, die_start = 40,
--die_end = 50, die_end = 50,
--die_loop = false, die_loop = false,
}, },
blood_amount = 0, blood_amount = 0,
do_custom = function(self, dtime) do_custom = function(self, dtime)

View file

@ -77,6 +77,7 @@ mobs:register_mob("mobs_mc:evoker", {
walk_end = 40, walk_end = 40,
shoot_start = 60, shoot_start = 60,
shoot_end = 80, shoot_end = 80,
-- TODO: Implement and fix death animation
--die_start = 80, --die_start = 80,
--die_end = 130, --die_end = 130,
--die_loop = false, --die_loop = false,

View file

@ -34,6 +34,7 @@ mobs:register_mob("mobs_mc:illusioner", {
walk_end = 40, walk_end = 40,
shoot_start = 90, shoot_start = 90,
shoot_end = 110, shoot_end = 110,
-- TODO: Implement and fix death animation
--die_start = 110, --die_start = 110,
--die_end = 130, --die_end = 130,
--die_loop = false, --die_loop = false,

View file

@ -58,6 +58,7 @@ mobs:register_mob("mobs_mc:vindicator", {
walk_end = 40, walk_end = 40,
punch_start = 90, punch_start = 90,
punch_end = 110, punch_end = 110,
-- TODO: Implement and fix death animation
--die_start = 110, --die_start = 110,
--die_end = 130, --die_end = 130,
--die_loop = false, --die_loop = false,

View file

@ -109,8 +109,8 @@ mobs:register_arrow(":mobs:potion_arrow", {
end end
}) })
--KEEP -- TODO: Spawn when witch works properly
mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, 1, 30) --mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, 1, 30)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:witch", S("Witch"), "mobs_mc_spawn_icon_witch.png", 0) mobs:register_egg("mobs_mc:witch", S("Witch"), "mobs_mc_spawn_icon_witch.png", 0)

View file

@ -146,10 +146,8 @@ mobs:register_arrow(":mobs_mc:fireball", {
-- node hit, bursts into flame -- node hit, bursts into flame
hit_node = function(self, pos, node) hit_node = function(self, pos, node)
-- FIXME: Deprecated, switch to mobs:boom instead
mobs:explosion(pos, 3, 0, 1) mobs:explosion(pos, 3, 0, 1)
--from tnt
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 16})
end end
}) })
--Spawn egg --Spawn egg