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)
arrows = {
local arrows = {
{"mobs_mc:arrow", "mobs_mc:arrow_entity" },
}
@ -188,7 +188,7 @@ if c("egg") then
visual = "sprite",
visual_size = {x=.5, y=.5},
textures = {"mobs_chicken_egg.png"},
velocity = egg_velocity,
velocity = egg_VELOCITY,
hit_player = function(self, player)
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()
item:add_wear(1000)
-- Tool break sound
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {pos = pt.above, gain = 0.5})
if item:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {pos = clicker:getpos(), gain = 0.5})
end
clicker:set_wielded_item(item)
end

View file

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

View file

@ -149,7 +149,9 @@ mobs:register_mob("mobs_mc:enderman", {
--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.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
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)
spawn_desert.nodes = mobs_mc.spawn.desert
on_spawn = function(self, pos)
local on_spawn = function(self, pos)
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" }
self:set_properties({textures = ent.base_texture})
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: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,
punch_start = 70,
punch_end = 90,
-- TODO: Implement and fix death animation
--die_start = 120,
--die_end = 130,
--die_loop = false,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -109,8 +109,8 @@ mobs:register_arrow(":mobs:potion_arrow", {
end
})
--KEEP
mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, 1, 30)
-- 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)
-- spawn eggs
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
hit_node = function(self, pos, node)
-- FIXME: Deprecated, switch to mobs:boom instead
mobs:explosion(pos, 3, 0, 1)
--from tnt
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 16})
end
})
--Spawn egg