diff --git a/mods/ENTITIES/mcl_burning/engine.lua b/mods/ENTITIES/mcl_burning/engine.lua index 1c9f4f565a..9e14915714 100644 --- a/mods/ENTITIES/mcl_burning/engine.lua +++ b/mods/ENTITIES/mcl_burning/engine.lua @@ -124,6 +124,10 @@ function mcl_burning.set_on_fire(obj, burn_time, damage, reason) local max_fire_prot_lvl = 0 if obj:is_player() then + if minetest.is_creative_enabled(obj:get_player_name()) then + burn_time = burn_time / 100 + end + local inv = obj:get_inventory() for i = 2, 5 do @@ -240,11 +244,12 @@ function mcl_burning.tick(obj, dtime) end function mcl_burning.update_animation_frame(obj, fire_entity, animation_frame) - local fire_texture = "fire_basic_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. animation_frame + local fire_texture = "mcl_burning_entity_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. animation_frame + local fire_HUD_texture = "mcl_burning_hud_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. animation_frame fire_entity:set_properties({textures = {"blank.png", "blank.png", fire_texture, fire_texture, fire_texture, fire_texture}}) if obj:is_player() then local hud_id = mcl_burning.get(obj, "int", "hud_id") - 1 - obj:hud_change(hud_id, "text", fire_texture) + obj:hud_change(hud_id, "text", fire_HUD_texture) end end diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 7fee798bc6..61976d7603 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -393,7 +393,7 @@ local is_node_dangerous = function(self, nodename) return true end end - if minetest.registered_nodes[nn].damage_per_second > 0 then + if minetest.registered_nodes[nn].damage_per_second and minetest.registered_nodes[nn].damage_per_second > 0 then return true end return false diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 492abf787a..c3b3df7808 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -360,6 +360,15 @@ minetest.register_node("mcl_chests:"..basename, { end, }) +local function close_forms(canonical_basename, pos) + local players = minetest.get_connected_players() + for p=1, #players do + if vector.distance(players[p]:get_pos(), pos) <= 30 then + minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) + end + end +end + minetest.register_node(small_name, { description = desc, _tt_help = tt_help, @@ -483,10 +492,7 @@ minetest.register_node(small_name, { end, on_destruct = function(pos) - local players = minetest.get_connected_players() - for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) - end + close_forms(canonical_basename, pos) end, mesecons = mesecons, on_rotate = simple_rotate, @@ -527,19 +533,15 @@ minetest.register_node(left_name, { return end - local players = minetest.get_connected_players() - for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) - end + close_forms(canonical_basename, pos) local param2 = n.param2 local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left") if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_right" then return end - for pl=1, #players do - minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z) - end + close_forms(canonical_basename, p) + minetest.swap_node(p, { name = small_name, param2 = param2 }) create_entity(p, small_name, small_textures, param2, false, "default_chest", "mcl_chests_chest") end, @@ -678,19 +680,15 @@ minetest.register_node("mcl_chests:"..basename.."_right", { return end - local players = minetest.get_connected_players() - for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z) - end + close_forms(canonical_basename, pos) local param2 = n.param2 local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right") if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_left" then return end - for pl=1, #players do - minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z) - end + close_forms(canonical_basename, p) + minetest.swap_node(p, { name = small_name, param2 = param2 }) create_entity(p, small_name, small_textures, param2, false, "default_chest", "mcl_chests_chest") local meta = minetest.get_meta(pos) diff --git a/mods/ITEMS/mcl_fire/textures/mcl_burning_entity_flame_animated.png b/mods/ITEMS/mcl_fire/textures/mcl_burning_entity_flame_animated.png new file mode 100644 index 0000000000..434bdffddb Binary files /dev/null and b/mods/ITEMS/mcl_fire/textures/mcl_burning_entity_flame_animated.png differ diff --git a/mods/ITEMS/mcl_fire/textures/mcl_burning_hud_flame_animated.png b/mods/ITEMS/mcl_fire/textures/mcl_burning_hud_flame_animated.png new file mode 100644 index 0000000000..434bdffddb Binary files /dev/null and b/mods/ITEMS/mcl_fire/textures/mcl_burning_hud_flame_animated.png differ diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index ce8aa774cf..5919ef213c 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -22,18 +22,18 @@ local destroy_portal = function(pos) end local ep_scheme = { - { o={x=0, y=0, z=1}, p=3 }, - { o={x=0, y=0, z=2}, p=3 }, - { o={x=0, y=0, z=3}, p=3 }, - { o={x=1, y=0, z=4}, p=0 }, - { o={x=2, y=0, z=4}, p=0 }, - { o={x=3, y=0, z=4}, p=0 }, - { o={x=4, y=0, z=3}, p=1 }, - { o={x=4, y=0, z=2}, p=1 }, - { o={x=4, y=0, z=1}, p=1 }, - { o={x=3, y=0, z=0}, p=2 }, - { o={x=2, y=0, z=0}, p=2 }, - { o={x=1, y=0, z=0}, p=2 }, + { o={x=0, y=0, z=1}, p=1 }, + { o={x=0, y=0, z=2}, p=1 }, + { o={x=0, y=0, z=3}, p=1 }, + { o={x=1, y=0, z=4}, p=2 }, + { o={x=2, y=0, z=4}, p=2 }, + { o={x=3, y=0, z=4}, p=2 }, + { o={x=4, y=0, z=3}, p=3 }, + { o={x=4, y=0, z=2}, p=3 }, + { o={x=4, y=0, z=1}, p=3 }, + { o={x=3, y=0, z=0}, p=0 }, + { o={x=2, y=0, z=0}, p=0 }, + { o={x=1, y=0, z=0}, p=0 }, } -- End portal @@ -255,6 +255,21 @@ if minetest.get_modpath("screwdriver") then rotate_frame_eye = false end +local function after_place_node(pos, placer, itemstack, pointed_thing) + local node = minetest.get_node(pos) + if node then + node.param2 = (node.param2+2) % 4 + minetest.swap_node(pos, node) + + local ok, ppos = check_end_portal_frame(pos) + if ok then + -- Epic 'portal open' sound effect that can be heard everywhere + minetest.sound_play("mcl_portals_open_end_portal", {gain=0.8}, true) + end_portal_area(ppos) + end + end +end + minetest.register_node("mcl_portals:end_portal_frame", { description = S("End Portal Frame"), _tt_help = S("Used to construct end portals"), @@ -276,6 +291,8 @@ minetest.register_node("mcl_portals:end_portal_frame", { on_rotate = rotate_frame, + after_place_node = after_place_node, + _mcl_blast_resistance = 36000000, _mcl_hardness = -1, }) @@ -306,17 +323,11 @@ minetest.register_node("mcl_portals:end_portal_frame_eye", { end_portal_area(ppos, true) end end, - on_construct = function(pos) - local ok, ppos = check_end_portal_frame(pos) - if ok then - -- Epic 'portal open' sound effect that can be heard everywhere - minetest.sound_play("mcl_portals_open_end_portal", {gain=0.8}, true) - end_portal_area(ppos) - end - end, on_rotate = rotate_frame_eye, + after_place_node = after_place_node, + _mcl_blast_resistance = 36000000, _mcl_hardness = -1, }) @@ -358,8 +369,11 @@ minetest.override_item("mcl_end:ender_eye", { itemstack:take_item() -- 1 use end - local ok = check_end_portal_frame(pointed_thing.under) + local ok, ppos = check_end_portal_frame(pointed_thing.under) if ok then + -- Epic 'portal open' sound effect that can be heard everywhere + minetest.sound_play("mcl_portals_open_end_portal", {gain=0.8}, true) + end_portal_area(ppos) if minetest.get_modpath("doc") then doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal_end") end diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index 441fcbb4c8..d21b582423 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -197,7 +197,9 @@ local destruct_sign = function(pos) end local players = minetest.get_connected_players() for p=1, #players do - minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z) + if vector.distance(players[p]:get_pos(), pos) <= 30 then + minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_"..pos.x.."_"..pos.y.."_"..pos.z) + end end end diff --git a/tools/Conversion_Table.csv b/tools/Conversion_Table.csv index 0a931f04ba..9f5a247ef6 100644 --- a/tools/Conversion_Table.csv +++ b/tools/Conversion_Table.csv @@ -388,6 +388,8 @@ Source path,Source file,Target path,Target file,xs,ys,xl,yl,xt,yt,Blacklisted? /assets/minecraft/textures/blocks,wheat_stage_6.png,/mods/ITEMS/mcl_farming/textures,mcl_farming_wheat_stage_6.png,,,,,,, /assets/minecraft/textures/blocks,wheat_stage_7.png,/mods/ITEMS/mcl_farming/textures,mcl_farming_wheat_stage_7.png,,,,,,, /assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,fire_basic_flame_animated.png,,,,,,, +/assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,mcl_burning_entity_flame_animated.png,,,,,,, +/assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,mcl_burning_hud_flame_animated.png,,,,,,, /assets/minecraft/textures/blocks,fire_layer_0.png,/mods/ITEMS/mcl_fire/textures,fire_basic_flame.png,0,0,16,16,0,0,y /assets/minecraft/textures/items,fireball.png,/mods/ITEMS/mcl_fire/textures,mcl_fire_fire_charge.png,,,,,,, /assets/minecraft/textures/items,flint_and_steel.png,/mods/ITEMS/mcl_fire/textures,mcl_fire_flint_and_steel.png,,,,,,,