From 3fb0b6dd440cbc1ce969e390c1bfe4e5edbf3e73 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 6 Aug 2017 14:09:25 +0200 Subject: [PATCH] Update mobs_mc --- mods/ENTITIES/mobs_mc/2_throwing.lua | 4 ++-- mods/ENTITIES/mobs_mc/creeper.lua | 4 ++-- mods/ENTITIES/mobs_mc/ender_dragon.lua | 14 +++++++------- mods/ENTITIES/mobs_mc/enderman.lua | 4 +++- mods/ENTITIES/mobs_mc/rabbit.lua | 4 ++-- mods/ENTITIES/mobs_mc/shulker.lua | 4 +++- mods/ENTITIES/mobs_mc/skeleton+stray.lua | 1 + mods/ENTITIES/mobs_mc/skeleton_wither.lua | 1 + mods/ENTITIES/mobs_mc/snowman.lua | 6 +++--- mods/ENTITIES/mobs_mc/villager_evoker.lua | 1 + mods/ENTITIES/mobs_mc/villager_illusioner.lua | 1 + mods/ENTITIES/mobs_mc/villager_vindicator.lua | 1 + mods/ENTITIES/mobs_mc/witch.lua | 4 ++-- mods/ENTITIES/mobs_mc/wither.lua | 4 +--- 14 files changed, 30 insertions(+), 23 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/2_throwing.lua b/mods/ENTITIES/mobs_mc/2_throwing.lua index 77f3f6ccaa..81da277407 100644 --- a/mods/ENTITIES/mobs_mc/2_throwing.lua +++ b/mods/ENTITIES/mobs_mc/2_throwing.lua @@ -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, { diff --git a/mods/ENTITIES/mobs_mc/creeper.lua b/mods/ENTITIES/mobs_mc/creeper.lua index 4e47f0b41b..6f481b4029 100644 --- a/mods/ENTITIES/mobs_mc/creeper.lua +++ b/mods/ENTITIES/mobs_mc/creeper.lua @@ -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 diff --git a/mods/ENTITIES/mobs_mc/ender_dragon.lua b/mods/ENTITIES/mobs_mc/ender_dragon.lua index 200804eaaa..790ec19bc6 100644 --- a/mods/ENTITIES/mobs_mc/ender_dragon.lua +++ b/mods/ENTITIES/mobs_mc/ender_dragon.lua @@ -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) diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index d18a441fd1..5b0d236bef 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -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) diff --git a/mods/ENTITIES/mobs_mc/rabbit.lua b/mods/ENTITIES/mobs_mc/rabbit.lua index f0a440403b..c937d86cdc 100644 --- a/mods/ENTITIES/mobs_mc/rabbit.lua +++ b/mods/ENTITIES/mobs_mc/rabbit.lua @@ -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 diff --git a/mods/ENTITIES/mobs_mc/shulker.lua b/mods/ENTITIES/mobs_mc/shulker.lua index 2f6b10d0b7..f917399576 100644 --- a/mods/ENTITIES/mobs_mc/shulker.lua +++ b/mods/ENTITIES/mobs_mc/shulker.lua @@ -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) diff --git a/mods/ENTITIES/mobs_mc/skeleton+stray.lua b/mods/ENTITIES/mobs_mc/skeleton+stray.lua index 3bda377e43..183c956875 100644 --- a/mods/ENTITIES/mobs_mc/skeleton+stray.lua +++ b/mods/ENTITIES/mobs_mc/skeleton+stray.lua @@ -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, diff --git a/mods/ENTITIES/mobs_mc/skeleton_wither.lua b/mods/ENTITIES/mobs_mc/skeleton_wither.lua index d140631568..fbf94ba852 100644 --- a/mods/ENTITIES/mobs_mc/skeleton_wither.lua +++ b/mods/ENTITIES/mobs_mc/skeleton_wither.lua @@ -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, diff --git a/mods/ENTITIES/mobs_mc/snowman.lua b/mods/ENTITIES/mobs_mc/snowman.lua index 77a37a37a0..8756f5dc76 100644 --- a/mods/ENTITIES/mobs_mc/snowman.lua +++ b/mods/ENTITIES/mobs_mc/snowman.lua @@ -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) diff --git a/mods/ENTITIES/mobs_mc/villager_evoker.lua b/mods/ENTITIES/mobs_mc/villager_evoker.lua index 28393876e8..567f64dd9c 100644 --- a/mods/ENTITIES/mobs_mc/villager_evoker.lua +++ b/mods/ENTITIES/mobs_mc/villager_evoker.lua @@ -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, diff --git a/mods/ENTITIES/mobs_mc/villager_illusioner.lua b/mods/ENTITIES/mobs_mc/villager_illusioner.lua index bab34f870a..8907ac535d 100644 --- a/mods/ENTITIES/mobs_mc/villager_illusioner.lua +++ b/mods/ENTITIES/mobs_mc/villager_illusioner.lua @@ -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, diff --git a/mods/ENTITIES/mobs_mc/villager_vindicator.lua b/mods/ENTITIES/mobs_mc/villager_vindicator.lua index b14435c409..4c9dfa5208 100644 --- a/mods/ENTITIES/mobs_mc/villager_vindicator.lua +++ b/mods/ENTITIES/mobs_mc/villager_vindicator.lua @@ -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, diff --git a/mods/ENTITIES/mobs_mc/witch.lua b/mods/ENTITIES/mobs_mc/witch.lua index b414d1a249..99ec2eb0c5 100644 --- a/mods/ENTITIES/mobs_mc/witch.lua +++ b/mods/ENTITIES/mobs_mc/witch.lua @@ -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) diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index eec5488d56..21c21f6a05 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -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