diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 38e73565b5..c2ce94c00a 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -188,7 +188,7 @@ function boat.on_punch(self, puncher, time_from_last_punch, tool_capabilities, d end function boat.on_step(self, dtime, moveresult) - mcl_burning.tick(self.object, dtime) + mcl_burning.tick(self.object, dtime, self) self._v = get_v(self.object:get_velocity()) * get_sign(self._v) local v_factor = 1 diff --git a/mods/ENTITIES/mcl_burning/api.lua b/mods/ENTITIES/mcl_burning/api.lua index b08a0fb707..d2567f6b2e 100644 --- a/mods/ENTITIES/mcl_burning/api.lua +++ b/mods/ENTITIES/mcl_burning/api.lua @@ -1,132 +1,52 @@ local S = minetest.get_translator("mcl_burning") -function mcl_burning.get_default(datatype) - local default_table = {string = "", float = 0.0, int = 0, bool = false} - return default_table[datatype] -end - -function mcl_burning.get(obj, datatype, name) - local key - if obj:is_player() then - local meta = obj:get_meta() - return meta["get_" .. datatype](meta, "mcl_burning:" .. name) - else - local luaentity = obj:get_luaentity() - return luaentity and luaentity["mcl_burning_" .. name] or mcl_burning.get_default(datatype) - end -end - -function mcl_burning.set(obj, datatype, name, value) - if obj:is_player() then - local meta = obj:get_meta() - meta["set_" .. datatype](meta, "mcl_burning:" .. name, value or mcl_burning.get_default(datatype)) - else - local luaentity = obj:get_luaentity() - if mcl_burning.get_default(datatype) == value then - value = nil - end - luaentity["mcl_burning_" .. name] = value - end +function mcl_burning.get_storage(obj) + return obj:is_player() and mcl_burning.storage[obj] or obj:get_luaentity() end function mcl_burning.is_burning(obj) - return mcl_burning.get(obj, "float", "burn_time") > 0 + return mcl_burning.get_storage(obj).burn_time end function mcl_burning.is_affected_by_rain(obj) - return mcl_weather and mcl_weather.get_weather() == "rain" and mcl_weather.is_outdoor(obj:get_pos()) + return mcl_weather.get_weather() == "rain" and mcl_weather.is_outdoor(obj:get_pos()) end -function mcl_burning.get_collisionbox(obj, smaller) - local box = obj:get_properties().collisionbox - local minp, maxp = vector.new(box[1], box[2], box[3]), vector.new(box[4], box[5], box[6]) - if smaller then +function mcl_burning.get_collisionbox(obj, smaller, storage) + local cache = storage.collisionbox_cache + if cache then + local box = cache[smaller and 2 or 1] + return box[1], box[2] + else + local box = obj:get_properties().collisionbox + local minp, maxp = vector.new(box[1], box[2], box[3]), vector.new(box[4], box[5], box[6]) local s_vec = vector.new(0.1, 0.1, 0.1) - minp = vector.add(minp, s_vec) - maxp = vector.subtract(maxp, s_vec) + local s_minp = vector.add(minp, s_vec) + local s_maxp = vector.subtract(maxp, s_vec) + storage.collisionbox_cache = {{minp, maxp}, {s_minp, s_maxp}} + return minp, maxp end - return minp, maxp end -function mcl_burning.get_touching_nodes(obj, nodenames) +function mcl_burning.get_touching_nodes(obj, nodenames, storage) local pos = obj:get_pos() - local box = obj:get_properties().collisionbox - local minp, maxp = mcl_burning.get_collisionbox(obj, true) + local minp, maxp = mcl_burning.get_collisionbox(obj, true, storage) local nodes = minetest.find_nodes_in_area(vector.add(pos, minp), vector.add(pos, maxp), nodenames) return nodes end -function mcl_burning.get_highest_group_value(obj, groupname) - local nodes = mcl_burning.get_touching_nodes(obj, "group:" .. groupname, true) - local highest_group_value = 0 - - for _, pos in pairs(nodes) do - local node = minetest.get_node(pos) - local group_value = minetest.get_item_group(node.name, groupname) - if group_value > highest_group_value then - highest_group_value = group_value - end - end - - return highest_group_value -end - -function mcl_burning.damage(obj) - local luaentity = obj:get_luaentity() - local health - - if luaentity then - health = luaentity.health - end - - local hp = health or obj:get_hp() - - if hp <= 0 then - return - end - - local do_damage = true - - if obj:is_player() then - if mcl_potions.player_has_effect(obj, "fire_proof") then - do_damage = false - else - local name = obj:get_player_name() - armor.last_damage_types[name] = "fire" - local deathmsg = S("@1 burned to death.", name) - local reason = mcl_burning.get(obj, "string", "reason") - if reason ~= "" then - deathmsg = S("@1 was burned by @2.", name, reason) - end - mcl_death_messages.player_damage(obj, deathmsg) - end - else - if luaentity.fire_damage_resistant then - do_damage = false - end - end - - if do_damage then - local new_hp = hp - 1 - if health then - luaentity.health = new_hp - else - obj:set_hp(new_hp) - end - end -end - function mcl_burning.set_on_fire(obj, burn_time, reason) if obj:get_hp() < 0 then return end + local storage = mcl_burning.get_storage(obj) + local luaentity = obj:get_luaentity() if luaentity and luaentity.fire_resistant then return end - local old_burn_time = mcl_burning.get(obj, "float", "burn_time") local max_fire_prot_lvl = 0 if obj:is_player() then @@ -148,37 +68,22 @@ function mcl_burning.set_on_fire(obj, burn_time, reason) burn_time = burn_time - math.floor(burn_time * max_fire_prot_lvl * 0.15) end - if old_burn_time <= burn_time then - --[[local sound_id = mcl_burning.get(obj, "int", "sound_id") - if sound_id == 0 then - sound_id = minetest.sound_play("fire_fire", { - object = obj, - gain = 0.18, - max_hear_distance = 16, - loop = true, - }) + 1 - end]]-- - - local hud_id - if obj:is_player() then - hud_id = mcl_burning.get(obj, "int", "hud_id") - if hud_id == 0 then - hud_id = obj:hud_add({ - hud_elem_type = "image", - position = {x = 0.5, y = 0.5}, - scale = {x = -100, y = -100}, - text = "mcl_burning_entity_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. 1, - z_index = 1000, - }) + 1 - end + if not storage.burn_time or burn_time >= storage.burn_time then + if obj:is_player() and not storage.fire_hud_id then + storage.fire_hud_id = obj:hud_add({ + hud_elem_type = "image", + position = {x = 0.5, y = 0.5}, + scale = {x = -100, y = -100}, + text = "mcl_burning_entity_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. 1, + z_index = 1000, + }) end - mcl_burning.set(obj, "float", "burn_time", burn_time) - mcl_burning.set(obj, "string", "reason", reason) - mcl_burning.set(obj, "int", "hud_id", hud_id) - --mcl_burning.set(obj, "int", "sound_id", sound_id) + storage.burn_time = burn_time + storage.burn_reason = reason + storage.fire_damage_timer = 0 local fire_entity = minetest.add_entity(obj:get_pos(), "mcl_burning:fire") - local minp, maxp = mcl_burning.get_collisionbox(obj) + local minp, maxp = mcl_burning.get_collisionbox(obj, false, storage) local obj_size = obj:get_properties().visual_size local vertical_grow_factor = 1.2 @@ -192,111 +97,81 @@ function mcl_burning.set_on_fire(obj, burn_time, reason) fire_entity:set_properties({visual_size = size}) fire_entity:set_attach(obj, "", offset, {x = 0, y = 0, z = 0}) - mcl_burning.update_animation_frame(obj, fire_entity, 0) + local fire_luaentity = fire_entity:get_luaentity() + fire_luaentity:update_frame(obj, storage) + + for _, other in pairs(minetest.get_objects_inside_radius(fire_entity:get_pos(), 0)) do + local other_luaentity = other:get_luaentity() + if other_luaentity and other_luaentity.name == "mcl_burning:fire" and other_luaentity ~= fire_luaentity then + other:remove() + break + end + end end end function mcl_burning.extinguish(obj) if mcl_burning.is_burning(obj) then - --local sound_id = mcl_burning.get(obj, "int", "sound_id") - 1 - --minetest.sound_stop(sound_id) - + local storage = mcl_burning.get_storage(obj) if obj:is_player() then - local hud_id = mcl_burning.get(obj, "int", "hud_id") - 1 - obj:hud_remove(hud_id) - end - - mcl_burning.set(obj, "string", "reason") - mcl_burning.set(obj, "float", "burn_time") - mcl_burning.set(obj, "float", "damage_timer") - mcl_burning.set(obj, "int", "hud_id") - --mcl_burning.set(obj, "int", "sound_id") - end -end - -function mcl_burning.catch_fire_tick(obj, dtime) - if mcl_burning.is_affected_by_rain(obj) or #mcl_burning.get_touching_nodes(obj, "group:puts_out_fire") > 0 then - mcl_burning.extinguish(obj) - else - local set_on_fire_value = mcl_burning.get_highest_group_value(obj, "set_on_fire") - - if set_on_fire_value > 0 then - mcl_burning.set_on_fire(obj, set_on_fire_value) + if storage.fire_hud_id then + obj:hud_remove(storage.fire_hud_id) + end + mcl_burning.storage[obj] = {} + else + storage.burn_time = nil + storage.burn_reason = nil + storage.fire_damage_timer = nil end end end -function mcl_burning.tick(obj, dtime) - local burn_time = mcl_burning.get(obj, "float", "burn_time") - dtime +function mcl_burning.tick(obj, dtime, storage) + if storage.burn_time then + storage.burn_time = storage.burn_time - dtime - if burn_time <= 0 then - mcl_burning.extinguish(obj) - else - mcl_burning.set(obj, "float", "burn_time", burn_time) + if storage.burn_time <= 0 or mcl_burning.is_affected_by_rain(obj) or #mcl_burning.get_touching_nodes(obj, "group:puts_out_fire", storage) > 0 then + mcl_burning.extinguish(obj) + return true + else + storage.fire_damage_timer = storage.fire_damage_timer + dtime - local damage_timer = mcl_burning.get(obj, "float", "damage_timer") + dtime + if storage.fire_damage_timer >= 1 then + storage.fire_damage_timer = 0 - if damage_timer >= 1 then - damage_timer = 0 - mcl_burning.damage(obj) - end + local luaentity = obj:get_luaentity() + local is_mob = luaentity and luaentity._cmi_is_mob + local hp = is_mob and luaentity.health or obj:get_hp() - mcl_burning.set(obj, "float", "damage_timer", damage_timer) - end + if hp > 0 then + local do_damage = true - mcl_burning.catch_fire_tick(obj, dtime) -end + if obj:is_player() then + if mcl_potions.player_has_effect(obj, "fire_proof") then + do_damage = false + else + local name = obj:get_player_name() + armor.last_damage_types[name] = "fire" + local deathmsg = S("@1 burned to death.", name) + if storage.reason then + deathmsg = S("@1 was burned by @2.", name, storage.reason) + end + mcl_death_messages.player_damage(obj, deathmsg) + end + elseif luaentity.fire_damage_resistant then + do_damage = false + end -function mcl_burning.update_animation_frame(obj, fire_entity, 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_HUD_texture) - end -end - -function mcl_burning.fire_entity_step(self, dtime) - if self.removed then - return - end - - local obj = self.object - local parent = obj:get_attach() - local do_remove - - self.doing_step = true - - if not parent or not mcl_burning.is_burning(parent) then - do_remove = true - else - for _, other in pairs(minetest.get_objects_inside_radius(obj:get_pos(), 0)) do - local luaentity = obj:get_luaentity() - if luaentity and luaentity.name == "mcl_burning:fire" and not luaentity.doing_step and not luaentity.removed then - do_remove = true - break + if do_damage then + local new_hp = hp - 1 + if is_mob then + luaentity.health = new_hp + else + obj:set_hp(new_hp) + end + end + end end end end - - self.doing_step = false - - if do_remove then - self.removed = true - obj:remove() - return - end - - local animation_timer = self.animation_timer + dtime - if animation_timer >= 0.015 then - animation_timer = 0 - local animation_frame = self.animation_frame + 1 - if animation_frame > mcl_burning.animation_frames - 1 then - animation_frame = 0 - end - mcl_burning.update_animation_frame(parent, obj, animation_frame) - self.animation_frame = animation_frame - end - self.animation_timer = animation_timer end diff --git a/mods/ENTITIES/mcl_burning/init.lua b/mods/ENTITIES/mcl_burning/init.lua index 6f1b0ef0d3..e223b3566e 100644 --- a/mods/ENTITIES/mcl_burning/init.lua +++ b/mods/ENTITIES/mcl_burning/init.lua @@ -2,11 +2,65 @@ local S = minetest.get_translator("mcl_burning") local modpath = minetest.get_modpath("mcl_burning") mcl_burning = { + storage = {}, animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8 } dofile(modpath .. "/api.lua") +minetest.register_globalstep(function(dtime) + for _, player in pairs(minetest.get_connected_players()) do + local storage = mcl_burning.storage[player] + if not mcl_burning.tick(player, dtime, storage) and not mcl_burning.is_affected_by_rain(player) then + local nodes = mcl_burning.get_touching_nodes(player, {"group:puts_out_fire", "group:set_on_fire"}, storage) + local burn_time = 0 + + for _, pos in pairs(nodes) do + local node = minetest.get_node(pos) + if minetest.get_item_group(node.name, "puts_out_fire") > 0 then + burn_time = 0 + break + end + + local value = minetest.get_item_group(node.name, "set_on_fire") + if value > burn_time then + burn_time = value + end + end + + if burn_time > 0 then + mcl_burning.set_on_fire(player, burn_time) + end + end + end +end) + +minetest.register_on_respawnplayer(function(player) + mcl_burning.extinguish(player) +end) + +minetest.register_on_joinplayer(function(player) + local storage + + local burn_data = player:get_meta():get_string("mcl_burning:data") + if burn_data == "" then + storage = {} + else + storage = minetest.deserialize(burn_data) + end + + mcl_burning.storage[player] = storage +end) + +minetest.register_on_leaveplayer(function(player) + local storage = mcl_burning.storage[player] + storage.fire_hud_id = nil + player:get_meta():set_string("mcl_burning:data", minetest.serialize(storage)) + + mcl_burning.storage[player] = nil +end) + + minetest.register_entity("mcl_burning:fire", { initial_properties = { physical = false, @@ -18,21 +72,45 @@ minetest.register_entity("mcl_burning:fire", { animation_frame = 0, animation_timer = 0, - on_step = mcl_burning.fire_entity_step, -}) -minetest.register_globalstep(function(dtime) - for _, player in pairs(minetest.get_connected_players()) do - if player:get_meta():get_float("mcl_burning:burn_time") > 0 then - mcl_burning.tick(player, dtime) + on_step = function(self, dtime) + local parent, storage = self:sanity_check() + + if parent then + self.animation_timer = self.animation_timer + dtime + if self.animation_timer >= 0.1 then + self.animation_timer = 0 + self.animation_frame = self.animation_frame + 1 + if self.animation_frame > mcl_burning.animation_frames - 1 then + self.animation_frame = 0 + end + self:update_frame(parent, storage) + end + else + self.object:remove() end - end -end) + end, + sanity_check = function(self) + local parent = self.object:get_attach() -minetest.register_on_respawnplayer(function(player) - mcl_burning.extinguish(player) -end) + if not parent then + return + end -minetest.register_on_leaveplayer(function(player) - mcl_burning.set(player, "int", "hud_id") -end) + local storage = mcl_burning.get_storage(parent) + + if not storage or not storage.burn_time then + return + end + + return parent, storage + end, + update_frame = function(self, parent, storage) + local frame_overlay = "^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. self.animation_frame + local fire_texture = "mcl_burning_entity_flame_animated.png" .. frame_overlay + self.object:set_properties({textures = {"blank.png", "blank.png", fire_texture, fire_texture, fire_texture, fire_texture}}) + if parent:is_player() then + parent:hud_change(storage.fire_hud_id, "text", "mcl_burning_hud_flame_animated.png" .. frame_overlay) + end + end, +}) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index 87a7a1ed0c..d144c9bc81 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -171,15 +171,18 @@ local land_state_execution = function(self,dtime) --make slow falling mobs fall slow if self.fall_slow then - if self.object:get_velocity().y < 0 then - --lua is acting really weird so we have to help it - if round2(self.object:get_acceleration().y, 1) == -self.gravity then - self.object:set_acceleration(vector_new(0,0,0)) - mobs.mob_fall_slow(self) - end - else - if round2(self.object:get_acceleration().y, 1) == 0 then - self.object:set_acceleration(vector_new(0,-self.gravity,0)) + local velocity = self.object:get_velocity() + if velocity then + if velocity.y < 0 then + --lua is acting really weird so we have to help it + if round2(self.object:get_acceleration().y, 1) == -self.gravity then + self.object:set_acceleration(vector_new(0,0,0)) + mobs.mob_fall_slow(self) + end + else + if round2(self.object:get_acceleration().y, 1) == 0 then + self.object:set_acceleration(vector_new(0,-self.gravity,0)) + end end end end @@ -371,8 +374,11 @@ local land_state_execution = function(self,dtime) if float_now then mobs.float(self) - elseif self.object:get_acceleration().y == 0 then - self.object:set_acceleration(vector_new(0,-self.gravity,0)) + else + local acceleration = self.object:get_acceleration() + if acceleration and acceleration.y == 0 then + self.object:set_acceleration(vector_new(0,-self.gravity,0)) + end end end @@ -894,7 +900,7 @@ mobs.mob_step = function(self, dtime) pos.y = pos.y + self.eye_height - local node = minetest.get_node(pos).name + local node = minetest_get_node(pos).name if minetest_get_item_group(node, "water") ~= 0 then self.breath = self.breath - dtime @@ -1106,7 +1112,7 @@ mobs.mob_step = function(self, dtime) if not self.ignores_cobwebs then local pos = self.object:get_pos() - local node = minetest_get_node(pos).name + local node = pos and minetest_get_node(pos).name if node == "mcl_core:cobweb" then @@ -1131,6 +1137,6 @@ mobs.mob_step = function(self, dtime) end end - self.old_velocity = self.object:get_velocity() + self.old_velocity = self.object:get_velocity() self.old_pos = self.object:get_pos() end diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/backup_code_api.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/backup_code_api.lua index 67718c7327..43cbc5419a 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/backup_code_api.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/backup_code_api.lua @@ -2847,7 +2847,7 @@ mob_step = function() --end --if not self.fire_resistant then - -- mcl_burning.tick(self.object, dtime) + -- mcl_burning.tick(self.object, dtime, self) --end --if use_cmi then @@ -3005,4 +3005,4 @@ mob_step = function() end ]]-- -end \ No newline at end of file +end diff --git a/mods/ITEMS/mcl_armor/init.lua b/mods/ITEMS/mcl_armor/init.lua index df06ecd04d..0ebd4569c2 100644 --- a/mods/ITEMS/mcl_armor/init.lua +++ b/mods/ITEMS/mcl_armor/init.lua @@ -82,6 +82,23 @@ minetest.register_tool("mcl_armor:helmet_diamond",{ }, on_place = armor.on_armor_use, on_secondary_use = armor.on_armor_use, + _mcl_upgradeable = true, + _mcl_upgrade_item = "mcl_armor:helmet_netherite" +}) + +minetest.register_tool("mcl_armor:helmet_netherite",{ + description = S("Netherite Helmet"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_helmet_netherite.png", + groups = {armor_head=1, mcl_armor_points=3, mcl_armor_uses=407, mcl_armor_toughness=2, enchantability=10 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, }) minetest.register_tool("mcl_armor:helmet_chain", { @@ -159,6 +176,23 @@ minetest.register_tool("mcl_armor:chestplate_diamond",{ }, on_place = armor.on_armor_use, on_secondary_use = armor.on_armor_use, + _mcl_upgradable = true, + _mcl_upgradeitem = "mcl_armor:chestplate_netherite" +}) + +minetest.register_tool("mcl_armor:chestplate_netherite",{ + description = S("Netherite Chestplate"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_chestplate_netherite.png", + groups = {armor_torso=1, mcl_armor_points=8, mcl_armor_uses=592, mcl_armor_toughness=2, enchantability=10 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, }) minetest.register_tool("mcl_armor:chestplate_chain", { @@ -236,6 +270,23 @@ minetest.register_tool("mcl_armor:leggings_diamond",{ }, on_place = armor.on_armor_use, on_secondary_use = armor.on_armor_use, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_armor:leggings_netherite" +}) + +minetest.register_tool("mcl_armor:leggings_netherite",{ + description = S("Netherite Leggings"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_leggings_netherite.png", + groups = {armor_legs=1, mcl_armor_points=6, mcl_armor_uses=555, mcl_armor_toughness=2, enchantability=10 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, }) minetest.register_tool("mcl_armor:leggings_chain", { @@ -312,6 +363,8 @@ minetest.register_tool("mcl_armor:boots_diamond",{ }, on_place = armor.on_armor_use, on_secondary_use = armor.on_armor_use, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_armor:boots_diamond" }) minetest.register_tool("mcl_armor:boots_chain", { @@ -329,6 +382,21 @@ minetest.register_tool("mcl_armor:boots_chain", { on_secondary_use = armor.on_armor_use, }) +minetest.register_tool("mcl_armor:boots_netherite", { + description = S("Netherite Boots"), + _doc_items_longdesc = longdesc, + _doc_items_usagehelp = usage, + inventory_image = "mcl_armor_inv_boots_netherite.png", + groups = {armor_feet=1, mcl_armor_points=3, mcl_armor_uses=481, enchantability=1 }, + _repair_material = "mcl_netherite:netherite_ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_chainmail", + _mcl_armor_unequip = "mcl_armor_unequip_chainmail", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + -- Register Craft Recipies local craft_ingreds = { diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_netherite.png new file mode 100644 index 0000000000..39f84afb14 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_netherite.png new file mode 100644 index 0000000000..8e3a383667 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_netherite.png new file mode 100644 index 0000000000..c35f112470 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_netherite.png new file mode 100644 index 0000000000..a73c1b2fd5 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_netherite.png new file mode 100644 index 0000000000..32fabb10f1 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_netherite.png new file mode 100644 index 0000000000..b906e20986 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_netherite.png new file mode 100644 index 0000000000..3ac1b844a3 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_netherite.png differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_netherite.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_netherite.png new file mode 100644 index 0000000000..7411e0a705 Binary files /dev/null and b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_netherite.png differ diff --git a/mods/ITEMS/mcl_armor_stand/models/3d_armor_entity.obj b/mods/ITEMS/mcl_armor_stand/models/3d_armor_entity.obj index 052f692553..37bc521e98 100644 --- a/mods/ITEMS/mcl_armor_stand/models/3d_armor_entity.obj +++ b/mods/ITEMS/mcl_armor_stand/models/3d_armor_entity.obj @@ -1,79 +1,132 @@ -# Blender v2.73 (sub 0) OBJ File: '3d_armor_entity_3.blend' +# Blender v2.92.0 OBJ File: '' # www.blender.org mtllib 3d_armor_entity.mtl +o Cube +v 1.000000 1.000000 -1.000000 +v 1.000000 -1.000000 -1.000000 +v 1.000000 1.000000 1.000000 +v 1.000000 -1.000000 1.000000 +v -1.000000 1.000000 -1.000000 +v -1.000000 -1.000000 -1.000000 +v -1.000000 1.000000 1.000000 +v -1.000000 -1.000000 1.000000 +vt 0.625000 0.500000 +vt 0.875000 0.500000 +vt 0.875000 0.750000 +vt 0.625000 0.750000 +vt 0.375000 0.750000 +vt 0.625000 1.000000 +vt 0.375000 1.000000 +vt 0.375000 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.250000 +vt 0.375000 0.250000 +vt 0.125000 0.500000 +vt 0.375000 0.500000 +vt 0.125000 0.750000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +usemtl Material +s off +f 1/1/1 5/2/1 7/3/1 3/4/1 +f 4/5/2 3/4/2 7/6/2 8/7/2 +f 8/8/3 7/9/3 5/10/3 6/11/3 +f 6/12/4 2/13/4 4/5/4 8/14/4 +f 2/13/5 1/1/5 3/4/5 4/5/5 +f 6/11/6 5/10/6 1/1/6 2/13/6 o Player_Cube -v 2.200000 9.763893 1.200000 -v 2.200000 9.763893 -1.200000 +v 2.200000 9.763893 1.200001 v 2.200000 2.663871 1.200000 v 2.200000 2.663871 -1.200000 +v 2.200000 9.763893 -1.200000 v -2.200000 9.763893 -1.200000 -v -2.200000 9.763893 1.200000 -v -2.200000 2.663871 -1.200000 +v -2.200000 9.763893 1.200001 v -2.200000 2.663871 1.200000 -v 2.300000 13.863962 2.300000 -v 2.300000 13.863962 -2.300000 +v -2.200000 2.663871 -1.200000 +v 2.300000 13.863962 2.300001 v 2.300000 9.263885 2.300000 -v 2.300000 9.263885 -2.300000 -v -2.300000 13.863962 -2.300000 -v -2.300000 13.863962 2.300000 -v -2.300000 9.263885 -2.300000 +v 2.300000 9.263885 -2.299999 +v 2.300000 13.863962 -2.299999 +v -2.300000 13.863962 -2.299999 +v -2.300000 13.863962 2.300001 v -2.300000 9.263885 2.300000 +v -2.300000 9.263885 -2.299999 v -2.322686 2.473175 -1.300000 v -2.322686 2.473175 1.300000 v -4.713554 2.682348 1.300000 v -4.713554 2.682348 -1.300000 -v -1.686446 9.745432 -1.300000 -v -1.686446 9.745432 1.300000 +v -4.077313 9.954605 -1.299999 v -4.077313 9.954605 1.300000 -v -4.077313 9.954605 -1.300000 -v 4.077313 9.954605 -1.300000 -v 4.077313 9.954605 1.300000 +v -1.686446 9.745432 1.300000 +v -1.686446 9.745432 -1.299999 v 1.686446 9.745432 1.300000 -v 1.686446 9.745432 -1.300000 -v 4.713554 2.682348 -1.300000 -v 4.713554 2.682348 1.300000 v 2.322686 2.473175 1.300000 +v 4.713554 2.682348 1.300000 +v 4.077313 9.954605 1.300000 +v 1.686446 9.745432 -1.299999 v 2.322686 2.473175 -1.300000 +v 4.077313 9.954605 -1.299999 +v 4.713554 2.682348 -1.300000 +v 2.538733 2.980834 -1.210000 v 0.139099 2.938947 -1.200000 v 0.139099 2.938947 1.200000 -v 0.261266 -4.059988 1.200000 -v 0.261266 -4.059988 -1.200000 -v 2.660901 -4.018101 1.190000 -v 2.660901 -4.018101 -1.210000 v 2.538733 2.980834 1.190000 -v 2.538733 2.980834 -1.210000 -v -0.139099 2.938947 -1.200000 -v -0.139099 2.938947 1.200000 -v -0.261266 -4.059988 1.200000 -v -0.261266 -4.059988 -1.200000 +v 0.261266 -4.059988 -1.200000 +v 2.660901 -4.018101 -1.210000 +v 2.660901 -4.018101 1.190000 +v 0.261266 -4.059988 1.200000 v -2.538734 2.980834 -1.210000 v -2.538734 2.980834 1.190000 +v -0.139099 2.938947 1.200000 +v -0.139099 2.938947 -1.200000 +v -0.261266 -4.059988 1.200000 +v -0.261266 -4.059988 -1.200000 v -2.660901 -4.018101 -1.210000 v -2.660901 -4.018101 1.190000 +v 0.000000 -4.387500 -1.400000 +v 0.000000 -4.387500 1.400000 v -2.799999 -4.387500 1.390000 v -2.799999 -4.387500 -1.410000 v -2.800000 -0.812499 1.390000 v -2.800000 -0.812499 -1.410000 -v -0.000000 -4.387500 -1.400000 -v -0.000000 -4.387500 1.400000 -v -0.000000 -0.812499 1.400000 -v -0.000000 -0.812499 -1.400000 -v 2.800000 -0.812499 -1.410000 -v 2.800000 -0.812499 1.390000 -v 2.799999 -4.387500 -1.410000 -v 2.799999 -4.387500 1.390000 +v 0.000000 -0.812499 1.400000 +v 0.000000 -0.812499 -1.400000 +v 0.000000 -0.812499 -1.400000 v 0.000000 -4.387500 -1.400000 v 0.000000 -4.387500 1.400000 v 0.000000 -0.812499 1.400000 -v 0.000000 -0.812499 -1.400000 -v 2.267006 13.830965 2.267006 -v 2.267006 13.830965 -2.267006 +v 2.800000 -0.812499 -1.410000 +v 2.799999 -4.387500 -1.410000 +v 2.799999 -4.387500 1.390000 +v 2.800000 -0.812499 1.390000 +v 2.267006 13.830965 2.267007 +v 2.267006 13.830965 -2.267005 +v 2.267006 9.296881 -2.267005 v 2.267006 9.296881 2.267006 -v 2.267006 9.296881 -2.267006 -v -2.267006 13.830965 -2.267006 -v -2.267006 13.830965 2.267006 -v -2.267006 9.296881 -2.267006 +v -2.267006 13.830965 -2.267005 +v -2.267006 13.830965 2.267007 +v -2.267006 9.296881 -2.267005 v -2.267006 9.296881 2.267006 +v -4.168111 10.060661 1.681621 +v 1.741822 -5.305762 4.169018 +v 1.718504 -5.438008 3.407457 +v -6.641035 -3.963995 3.407457 +v 4.191429 8.586647 1.681621 +v -6.617718 -3.831752 4.169018 +v 4.168111 8.454401 0.920061 +v -4.191429 9.928415 0.920061 +v -4.191429 8.586648 1.681620 +v 6.617716 -3.831752 4.169018 +v 6.641035 -3.963997 3.407457 +v -1.718504 -5.438006 3.407457 +v 4.168111 10.060658 1.681621 +v -1.741822 -5.305762 4.169018 +v 4.191429 9.928414 0.920061 +v -4.168111 8.454404 0.920061 vt 0.250000 0.375000 vt 0.250000 0.000000 vt 0.312500 0.000000 @@ -81,6 +134,8 @@ vt 0.312500 0.375000 vt 0.437500 0.375000 vt 0.437500 0.500000 vt 0.312500 0.500000 +vt 0.437500 0.500000 +vt 0.437500 0.375000 vt 0.562500 0.375000 vt 0.562500 0.500000 vt 0.437500 0.000000 @@ -97,97 +152,308 @@ vt 0.750000 1.000000 vt 0.625000 1.000000 vt 0.875000 0.750000 vt 0.875000 1.000000 +vt 0.750000 1.000000 +vt 0.750000 0.750000 vt 0.750000 0.500000 +vt 0.875000 0.750000 vt 0.875000 0.500000 vt 1.000000 0.750000 vt 1.000000 0.500000 vt 0.750000 0.375000 +vt 0.750000 0.500000 vt 0.812500 0.500000 vt 0.812500 0.375000 vt 0.687500 0.375000 vt 0.687500 0.500000 +vt 0.750000 0.500000 +vt 0.750000 0.375000 +vt 0.687500 0.375000 +vt 0.625000 0.375000 +vt 0.625000 0.000000 vt 0.687500 0.000000 vt 0.750000 0.000000 +vt 0.687500 0.000000 +vt 0.812500 0.375000 vt 0.812500 0.000000 vt 0.875000 0.375000 vt 0.875000 0.000000 +vt 0.812500 0.375000 +vt 0.812500 0.000000 +vt 0.875000 0.000000 +vt 0.875000 0.375000 +vt 0.750000 0.375000 +vt 0.750000 0.000000 +vt 0.687500 0.375000 +vt 0.687500 0.000000 +vt 0.687500 0.375000 +vt 0.687500 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.375000 +vt 0.750000 0.500000 +vt 0.687500 0.500000 +vt 0.750000 0.375000 +vt 0.812500 0.375000 +vt 0.812500 0.500000 +vt 0.750000 0.500000 vt 0.125000 0.375000 vt 0.062500 0.375000 vt 0.062500 0.500000 vt 0.125000 0.500000 vt 0.187500 0.375000 +vt 0.125000 0.375000 +vt 0.125000 0.500000 vt 0.187500 0.500000 vt 0.000000 0.375000 vt 0.000000 0.000000 vt 0.062500 0.000000 +vt 0.062500 0.375000 +vt 0.250000 0.375000 +vt 0.250000 0.000000 +vt 0.187500 0.000000 +vt 0.187500 0.375000 +vt 0.125000 0.000000 +vt 0.062500 0.000000 +vt 0.187500 0.375000 vt 0.187500 0.000000 vt 0.125000 0.000000 -vt 0.437500 0.875000 -vt 0.437500 1.000000 -vt 0.375000 1.000000 -vt 0.375000 0.875000 -vt 0.250000 0.875000 -vt 0.312500 0.875000 -vt 0.312500 0.656250 -vt 0.250000 0.656250 -vt 0.500000 0.875000 -vt 0.437500 0.656250 -vt 0.500000 0.656250 -vt 0.375000 0.656250 -vt 0.312500 1.000000 -usemtl Armor +vt 0.125000 0.375000 +vt 0.125000 0.375000 +vt 0.125000 0.500000 +vt 0.062500 0.500000 +vt 0.062500 0.375000 +vt 0.187500 0.375000 +vt 0.125000 0.375000 +vt 0.125000 0.000000 +vt 0.187500 0.000000 +vt 0.062500 0.000000 +vt 0.125000 0.000000 +vt 0.250000 0.375000 +vt 0.187500 0.375000 +vt 0.187500 0.000000 +vt 0.250000 0.000000 +vt 0.000000 0.375000 +vt 0.062500 0.375000 +vt 0.062500 0.000000 +vt 0.000000 0.000000 +vt 0.187500 0.375000 +vt 0.187500 0.500000 +vt 0.125000 0.500000 +vt 0.125000 0.375000 +vt 0.381250 0.832812 +vt 0.381250 0.845312 +vt 0.375000 0.845312 +vt 0.375000 0.832812 +vt 0.362500 0.832812 +vt 0.368750 0.832812 +vt 0.368750 0.810938 +vt 0.362500 0.810938 +vt 0.387500 0.832812 +vt 0.381250 0.832812 +vt 0.381250 0.810938 +vt 0.387500 0.810938 +vt 0.375000 0.832812 +vt 0.368750 0.832812 +vt 0.368750 0.810938 +vt 0.375000 0.810938 +vt 0.381250 0.832812 +vt 0.375000 0.832812 +vt 0.375000 0.810938 +vt 0.381250 0.810938 +vt 0.375000 0.845312 +vt 0.368750 0.845312 +vt 0.381250 0.832812 +vt 0.381250 0.810938 +vt 0.375000 0.810938 +vt 0.375000 0.832812 +vt 0.375000 0.832812 +vt 0.375000 0.810938 +vt 0.368750 0.810938 +vt 0.368750 0.832812 +vt 0.387500 0.832812 +vt 0.387500 0.810938 +vt 0.381250 0.810938 +vt 0.381250 0.832812 +vt 0.362500 0.832812 +vt 0.362500 0.810938 +vt 0.368750 0.810938 +vt 0.368750 0.832812 +vt 0.381250 0.832812 +vt 0.375000 0.832812 +vt 0.375000 0.845312 +vt 0.381250 0.845312 +vt 0.368750 0.845312 +vt 0.375000 0.845312 +vt 0.500000 0.750000 +vt 0.625000 0.750000 +vt 0.625000 0.500000 +vt 0.500000 0.500000 +vt 0.750000 0.750000 +vt 0.625000 1.000000 +vt 0.750000 1.000000 +vt 0.875000 0.750000 +vt 0.750000 0.750000 +vt 0.750000 1.000000 +vt 0.875000 1.000000 +vt 0.750000 0.500000 +vt 0.875000 0.750000 +vt 0.875000 0.500000 +vt 1.000000 0.750000 +vt 1.000000 0.500000 +vt 0.032859 0.558649 +vt 0.032859 0.998468 +vt 0.362724 0.998468 +vt 0.362724 0.558649 +vt 0.032859 0.558649 +vt 0.362724 0.558649 +vt 0.362724 0.998468 +vt 0.032859 0.998468 +vt 0.039157 0.992309 +vt 0.039157 0.656118 +vt 0.060169 0.656118 +vt 0.060169 0.992309 +vt -0.003415 0.501261 +vt 0.368238 0.501261 +vt 0.368238 0.563203 +vt -0.003415 0.563203 +vt 0.368238 0.996797 +vt -0.003415 0.996797 +vt -0.003415 0.934855 +vt 0.368238 0.934855 +vt 0.394691 0.498800 +vt 0.394691 0.994336 +vt 0.363720 0.994336 +vt 0.363720 0.498800 +vt 0.032859 0.998468 +vt 0.032859 0.558649 +vt 0.362724 0.558649 +vt 0.362724 0.998468 +vt 0.032859 0.998468 +vt 0.362724 0.998468 +vt 0.362724 0.558649 +vt 0.032859 0.558649 +vt 0.039157 0.656118 +vt 0.039157 0.992309 +vt 0.060169 0.992309 +vt 0.060169 0.656118 +vt -0.003415 0.996797 +vt 0.368238 0.996797 +vt 0.368238 0.934855 +vt -0.003415 0.934855 +vt 0.368238 0.501261 +vt -0.003415 0.501261 +vt -0.003415 0.563203 +vt 0.368238 0.563203 +vt 0.394691 0.994336 +vt 0.394691 0.498800 +vt 0.363720 0.498800 +vt 0.363720 0.994336 +vn 1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -0.0000 1.0000 +vn -0.0872 -0.9962 0.0000 +vn 0.0872 0.9962 0.0000 +vn -0.9962 0.0872 0.0000 +vn 0.9962 -0.0872 0.0000 +vn -0.9962 -0.0872 0.0000 +vn 0.9962 0.0872 0.0000 +vn -0.0872 0.9962 0.0000 +vn 0.0872 -0.9962 0.0000 +vn -0.0175 0.9998 0.0000 +vn 0.0175 -0.9998 0.0000 +vn 0.9998 0.0175 0.0000 +vn 0.0042 0.0001 1.0000 +vn -0.0042 -0.0001 -1.0000 +vn -0.9998 -0.0175 0.0000 +vn 0.0175 0.9998 0.0000 +vn 0.9998 -0.0175 0.0000 +vn 0.0042 -0.0001 -1.0000 +vn -0.0042 0.0001 1.0000 +vn -0.9998 0.0175 0.0000 +vn -0.0175 -0.9998 0.0000 +vn -0.0036 -0.0000 1.0000 +vn 0.0036 0.0000 -1.0000 +vn -0.0036 0.0000 -1.0000 +vn 0.0036 -0.0000 1.0000 +vn 0.0302 0.1710 0.9848 +vn -0.0302 -0.1710 -0.9848 +vn 0.1710 0.9698 -0.1737 +vn 0.9848 -0.1736 0.0000 +vn -0.9848 0.1736 -0.0000 +vn -0.1710 -0.9698 0.1736 +vn -0.0302 0.1710 0.9848 +vn 0.0302 -0.1710 -0.9848 +vn -0.1710 0.9698 -0.1736 +vn 0.9848 0.1736 0.0000 +vn -0.9848 -0.1736 -0.0000 +vn 0.1710 -0.9698 0.1736 +usemtl None s off -f 1/1 3/2 4/3 2/4 -f 5/5 6/6 1/7 2/4 -f 8/6 7/5 4/8 3/9 -f 5/5 2/4 4/3 7/10 -f 7/10 8/11 6/12 5/5 -f 8/11 3/13 1/14 6/12 -f 9/15 11/16 12/17 10/18 -f 13/19 14/20 9/21 10/18 -f 12/22 11/23 16/20 15/19 -f 13/19 10/18 12/17 15/24 -f 14/22 13/19 15/24 16/25 -f 9/26 14/22 16/25 11/27 -f 17/28 18/24 19/29 20/30 -f 24/31 23/32 22/24 21/28 -f 23/31 24/14 20/13 19/33 -f 24/31 21/28 17/34 20/33 -f 21/28 22/30 18/35 17/34 -f 22/30 23/36 19/37 18/35 -f 27/30 31/35 30/37 26/36 -f 28/28 32/34 31/35 27/30 -f 25/31 29/33 32/34 28/28 -f 26/31 30/33 29/13 25/14 -f 25/31 28/28 27/24 26/32 -f 32/28 29/30 30/29 31/24 -f 40/38 33/39 34/40 39/41 -f 36/42 38/38 37/41 35/43 -f 39/44 37/45 38/46 40/39 -f 34/1 35/2 37/47 39/42 -f 40/38 38/48 36/46 33/39 -f 33/42 36/47 35/48 34/38 -f 45/38 46/41 42/40 41/39 -f 41/42 42/38 43/48 44/47 -f 45/38 41/39 44/46 47/48 -f 42/1 46/42 48/47 43/2 -f 46/44 45/39 47/46 48/45 -f 44/42 43/43 48/41 47/38 -f 53/49 54/50 49/51 50/52 -f 51/53 52/54 50/55 49/56 -f 55/57 51/49 49/58 54/59 -f 52/52 56/54 53/55 50/60 -f 56/49 55/52 54/60 53/58 -f 52/52 51/51 55/61 56/54 -f 64/49 61/58 62/60 63/52 -f 57/52 59/60 61/55 64/54 -f 63/57 62/59 60/58 58/49 -f 58/53 60/56 59/55 57/54 -f 61/49 59/52 60/51 62/50 -f 57/52 64/54 63/61 58/51 -f 65/15 66/18 68/17 67/16 -f 69/19 66/18 65/21 70/20 -f 68/22 71/19 72/20 67/23 -f 69/19 71/24 68/17 66/18 -f 70/22 72/25 71/24 69/19 -f 65/26 67/27 72/25 70/22 +f 9/15/7 10/16/7 11/17/7 12/18/7 +f 13/19/8 14/20/8 9/21/8 12/18/8 +f 15/22/9 16/23/9 11/24/9 10/25/9 +f 13/19/10 12/18/10 11/17/10 16/26/10 +f 16/26/11 15/27/11 14/28/11 13/19/11 +f 15/27/12 10/29/12 9/30/12 14/28/12 +f 17/31/7 18/32/7 19/33/7 20/34/7 +f 21/35/8 22/36/8 17/37/8 20/34/8 +f 19/38/9 18/39/9 23/40/9 24/41/9 +f 21/35/10 20/34/10 19/33/10 24/42/10 +f 22/43/11 21/35/11 24/42/11 23/44/11 +f 17/45/12 22/43/12 23/44/12 18/46/12 +f 25/47/13 26/48/13 27/49/13 28/50/13 +f 29/51/14 30/52/14 31/53/14 32/54/14 +f 30/55/15 29/56/15 28/57/15 27/58/15 +f 29/51/10 32/54/10 25/59/10 28/60/10 +f 32/54/16 31/61/16 26/62/16 25/59/16 +f 31/61/12 30/63/12 27/64/12 26/62/12 +f 33/65/12 34/66/12 35/67/12 36/68/12 +f 37/69/17 38/70/17 34/66/17 33/65/17 +f 39/71/10 40/72/10 38/70/10 37/69/10 +f 36/73/18 35/74/18 40/75/18 39/76/18 +f 39/71/19 37/69/19 33/77/19 36/78/19 +f 38/79/20 40/80/20 35/81/20 34/82/20 +f 41/83/21 42/84/21 43/85/21 44/86/21 +f 45/87/22 46/88/22 47/89/22 48/90/22 +f 44/91/23 47/92/23 46/93/23 41/94/23 +f 43/95/24 48/96/24 47/97/24 44/98/24 +f 41/83/25 46/99/25 45/100/25 42/84/25 +f 42/101/26 45/102/26 48/103/26 43/104/26 +f 49/105/27 50/106/27 51/107/27 52/108/27 +f 52/109/28 51/110/28 53/111/28 54/112/28 +f 49/105/29 52/108/29 54/113/29 55/114/29 +f 51/115/30 50/116/30 56/117/30 53/118/30 +f 50/119/31 49/120/31 55/121/31 56/122/31 +f 54/123/32 53/124/32 56/125/32 55/126/32 +f 57/127/9 58/128/9 59/129/9 60/130/9 +f 61/131/11 62/132/11 60/133/11 59/134/11 +f 63/135/33 61/136/33 59/137/33 58/138/33 +f 62/139/34 64/140/34 57/141/34 60/142/34 +f 64/143/7 63/144/7 58/145/7 57/146/7 +f 62/139/8 61/147/8 63/148/8 64/140/8 +f 65/149/11 66/150/11 67/151/11 68/152/11 +f 69/153/35 70/154/35 66/155/35 65/156/35 +f 68/157/36 67/158/36 71/159/36 72/160/36 +f 72/161/7 71/162/7 70/163/7 69/164/7 +f 66/165/9 70/166/9 71/167/9 67/168/9 +f 69/153/8 65/156/8 68/169/8 72/170/8 +f 73/171/11 74/172/11 75/173/11 76/174/11 +f 77/175/9 74/172/9 73/176/9 78/177/9 +f 75/178/8 79/179/8 80/180/8 76/181/8 +f 77/175/12 79/182/12 75/173/12 74/172/12 +f 78/183/7 80/184/7 79/182/7 77/175/7 +f 73/185/10 76/186/10 80/184/10 78/183/10 +f 85/187/37 81/188/37 86/189/37 82/190/37 +f 87/191/38 83/192/38 84/193/38 88/194/38 +f 81/195/39 85/196/39 87/197/39 88/198/39 +f 85/199/40 82/200/40 83/201/40 87/202/40 +f 86/203/41 81/204/41 88/205/41 84/206/41 +f 82/207/42 86/208/42 84/209/42 83/210/42 +f 93/211/43 89/212/43 94/213/43 90/214/43 +f 95/215/44 91/216/44 92/217/44 96/218/44 +f 89/219/45 93/220/45 95/221/45 96/222/45 +f 93/223/46 90/224/46 91/225/46 95/226/46 +f 94/227/47 89/228/47 96/229/47 92/230/47 +f 90/231/48 94/232/48 92/233/48 91/234/48 diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index f3824a6f3c..b1ce06b96e 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -6,6 +6,8 @@ local player_in_bed = 0 local is_sp = minetest.is_singleplayer() local weather_mod = minetest.get_modpath("mcl_weather") ~= nil local explosions_mod = minetest.get_modpath("mcl_explosions") ~= nil +local spawn_mod = minetest.get_modpath("mcl_spawn") +local worlds_mod = minetest.get_modpath("mcl_worlds") -- Helper functions @@ -76,7 +78,7 @@ local function lay_down(player, pos, bed_pos, state, skip) bed_center = {x = bed_pos.x - dir.x/2, y = bed_pos.y + 0.1, z = bed_pos.z - dir.z/2} -- save respawn position when entering bed - if minetest.get_modpath("mcl_spawn") and mcl_spawn.set_spawn_pos(player, bed_pos, false) then + if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then minetest.chat_send_player(name, S("New respawn position set!")) end @@ -297,7 +299,7 @@ function mcl_beds.on_rightclick(pos, player, is_top) if player:get_meta():get_string("mcl_beds:sleeping") == "true" then return end - if minetest.get_modpath("mcl_worlds") then + if worlds_mod then local dim = mcl_worlds.pos_to_dimension(pos) if dim == "nether" or dim == "end" then -- Bed goes BOOM in the Nether or End. diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index cddae0869b..cb92593f80 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -108,7 +108,7 @@ local damage_particles = function(pos, is_critical) end ARROW_ENTITY.on_step = function(self, dtime) - mcl_burning.tick(self.object, dtime) + mcl_burning.tick(self.object, dtime, self) self._time_in_air = self._time_in_air + .001 diff --git a/mods/ITEMS/mcl_enchanting/groupcaps.lua b/mods/ITEMS/mcl_enchanting/groupcaps.lua index 0bc1b8e245..a445b73f21 100644 --- a/mods/ITEMS/mcl_enchanting/groupcaps.lua +++ b/mods/ITEMS/mcl_enchanting/groupcaps.lua @@ -61,7 +61,7 @@ function mcl_enchanting.update_groupcaps(itemstack) if not hash or hash ~= groupcaps.hash then local tool_capabilities = itemstack:get_tool_capabilities() - tool_capabilities.groupcaps = groupcaps.values + tool_capabilities.groupcaps = table.copy(groupcaps.values) -- Increase the number of uses depending on the unbreaking level -- of the tool. diff --git a/mods/ITEMS/mcl_farming/hoes.lua b/mods/ITEMS/mcl_farming/hoes.lua index db470b9992..4391cedea4 100644 --- a/mods/ITEMS/mcl_farming/hoes.lua +++ b/mods/ITEMS/mcl_farming/hoes.lua @@ -55,6 +55,7 @@ local uses = { iron = 251, gold = 33, diamond = 1562, + netherite = 2031, } local hoe_tt = S("Turns block into farmland") @@ -255,6 +256,8 @@ minetest.register_tool("mcl_farming:hoe_diamond", { _mcl_diggroups = { hoey = { speed = 8, level = 5, uses = 1562 } }, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_tools:hoe_netherite" }) minetest.register_craft({ @@ -273,3 +276,24 @@ minetest.register_craft({ {"mcl_core:stick", ""} } }) + +minetest.register_tool("mcl_farming:hoe_netherite", { + description = S("Netherite Hoe"), + _tt_help = hoe_tt.."\n"..S("Uses: @1", uses.netherite), + _doc_items_longdesc = hoe_longdesc, + _doc_items_usagehelp = hoe_usagehelp, + inventory_image = "farming_tool_netheritehoe.png", + wield_scale = mcl_vars.tool_wield_scale, + on_place = hoe_on_place_function(uses.netherite), + groups = { tool=1, hoe=1, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 0.25, + damage_groups = { fleshy = 4, }, + punch_attack_uses = uses.netherite, + }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + hoey = { speed = 8, level = 5, uses = uses.netherite } + }, +}) diff --git a/mods/ITEMS/mcl_farming/textures/farming_tool_netheritehoe.png b/mods/ITEMS/mcl_farming/textures/farming_tool_netheritehoe.png new file mode 100644 index 0000000000..f6acbbff35 Binary files /dev/null and b/mods/ITEMS/mcl_farming/textures/farming_tool_netheritehoe.png differ diff --git a/mods/ITEMS/mcl_fireworks/register.lua b/mods/ITEMS/mcl_fireworks/register.lua index 08f07c5cbe..6ab55442ce 100644 --- a/mods/ITEMS/mcl_fireworks/register.lua +++ b/mods/ITEMS/mcl_fireworks/register.lua @@ -15,7 +15,9 @@ local function register_rocket(n, duration, force) local elytra = mcl_playerplus.elytra[user] if elytra.active and elytra.rocketing <= 0 then elytra.rocketing = duration - itemstack:take_item() + if not minetest.is_creative_enabled(user:get_player_name()) then + itemstack:take_item() + end minetest.sound_play("mcl_fireworks_rocket", {pos = user:get_pos()}) end return itemstack diff --git a/mods/ITEMS/mcl_heads/init.lua b/mods/ITEMS/mcl_heads/init.lua index e7340242d8..55b2bf616b 100644 --- a/mods/ITEMS/mcl_heads/init.lua +++ b/mods/ITEMS/mcl_heads/init.lua @@ -90,7 +90,7 @@ local function addhead(name, texture, desc, longdesc, rangemob, rangefactor) local wdir = minetest.dir_to_wallmounted(diff) local itemstring = itemstack:get_name() - --local fakestack = ItemStack(itemstack) + local fakestack = ItemStack(itemstack) local idef = fakestack:get_definition() local retval if wdir == 0 or wdir == 1 then diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index 4670547675..a60efa5b55 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -52,6 +52,36 @@ minetest.register_node("mcl_nether:quartz_ore", { _mcl_fortune_drop = mcl_core.fortune_drop_ore }) +minetest.register_node("mcl_nether:ancient_debris", { + description = S("Ancient Debris"), + _doc_items_longdesc = S("Ancient debris can be found in the nether and is very very rare."), + stack_max = 64, + tiles = {"mcl_nether_ancient_debris_top.png", "mcl_nether_ancient_debris_side.png"}, + is_ground_content = true, + groups = {pickaxey=4, building_block=1, material_stone=1, xp=0}, + drop = 'mcl_nether:ancient_debris', + sounds = mcl_sounds.node_sound_stone_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 30, + _mcl_silk_touch_drop = true, + _mcl_fortune_drop = mcl_core.fortune_drop_ore +}) + +minetest.register_node("mcl_nether:netheriteblock", { + description = S("Netherite Block"), + _doc_items_longdesc = S("Netherite block is very hard and can be made of 9 netherite ingots."), + stack_max = 64, + tiles = {"mcl_nether_netheriteblock.png"}, + is_ground_content = true, + groups = {pickaxey=4, building_block=1, material_stone=1, xp = 0}, + drop = 'mcl_nether:netheriteblock', + sounds = mcl_sounds.node_sound_stone_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 50, + _mcl_silk_touch_drop = true, + _mcl_fortune_drop = mcl_core.fortune_drop_ore +}) + -- For eternal fire on top of netherrack and magma blocks -- (this code does not require a dependency on mcl_fire) local eternal_after_destruct = function(pos, oldnode) @@ -253,6 +283,22 @@ minetest.register_craftitem("mcl_nether:quartz", { groups = { craftitem = 1 }, }) +minetest.register_craftitem("mcl_nether:netherite_scrap", { + description = S("Netherite Scrap"), + _doc_items_longdesc = S("Netherite scrap is a crafting ingredient for netherite ingots."), + inventory_image = "mcl_nether_netherite_scrap.png", + stack_max = 64, + groups = { craftitem = 1 }, +}) + +minetest.register_craftitem("mcl_nether:netherite_ingot", { + description = S("Netherite Ingot"), + _doc_items_longdesc = S("Netherite ingots can be used with a smithing table to upgrade items to netherite."), + inventory_image = "mcl_nether_netherite_ingot.png", + stack_max = 64, + groups = { craftitem = 1 }, +}) + minetest.register_craftitem("mcl_nether:netherbrick", { description = S("Nether Brick"), _doc_items_longdesc = S("Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences."), @@ -268,6 +314,13 @@ minetest.register_craft({ cooktime = 10, }) +minetest.register_craft({ + type = "cooking", + output = "mcl_nether:netherite_scrap", + recipe = "mcl_nether:ancient_debris", + cooktime = 10, +}) + minetest.register_craft({ output = 'mcl_nether:quartz_block', recipe = { @@ -339,5 +392,32 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = "mcl_nether:netherite_ingot", + recipe = { + {'mcl_nether:netherite_scrap', 'mcl_nether:netherite_scrap', 'mcl_nether:netherite_scrap'}, + {'mcl_nether:netherite_scrap', 'mcl_core:gold_ingot', 'mcl_core:gold_ingot'}, + {'mcl_core:gold_ingot', 'mcl_core:gold_ingot', ''}, + } +}) + +minetest.register_craft({ + output = "mcl_nether:netheriteblock", + recipe = { + {'mcl_nether:netherite_ingot', 'mcl_nether:netherite_ingot', 'mcl_nether:netherite_ingot'}, + {'mcl_nether:netherite_ingot', 'mcl_nether:netherite_ingot', 'mcl_nether:netherite_ingot'}, + {'mcl_nether:netherite_ingot', 'mcl_nether:netherite_ingot', 'mcl_nether:netherite_ingot'} + } +}) + +minetest.register_craft({ + output = "mcl_nether:netherite_ingot 9", + recipe = { + {'mcl_nether:netheriteblock', '', ''}, + {'', '', ''}, + {'', '', ''} + } +}) + dofile(minetest.get_modpath(minetest.get_current_modname()).."/nether_wart.lua") dofile(minetest.get_modpath(minetest.get_current_modname()).."/lava.lua") diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_ancient_debris_side.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_ancient_debris_side.png new file mode 100644 index 0000000000..9891604029 Binary files /dev/null and b/mods/ITEMS/mcl_nether/textures/mcl_nether_ancient_debris_side.png differ diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_ancient_debris_top.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_ancient_debris_top.png new file mode 100644 index 0000000000..ba68f658a5 Binary files /dev/null and b/mods/ITEMS/mcl_nether/textures/mcl_nether_ancient_debris_top.png differ diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_netherite_ingot.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_netherite_ingot.png new file mode 100644 index 0000000000..1139611987 Binary files /dev/null and b/mods/ITEMS/mcl_nether/textures/mcl_nether_netherite_ingot.png differ diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_netherite_scrap.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_netherite_scrap.png new file mode 100644 index 0000000000..c93b6e1af8 Binary files /dev/null and b/mods/ITEMS/mcl_nether/textures/mcl_nether_netherite_scrap.png differ diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_netheriteblock.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_netheriteblock.png new file mode 100644 index 0000000000..60957f0179 Binary files /dev/null and b/mods/ITEMS/mcl_nether/textures/mcl_nether_netheriteblock.png differ diff --git a/mods/ITEMS/mcl_smithing_table/init.lua b/mods/ITEMS/mcl_smithing_table/init.lua new file mode 100644 index 0000000000..971c306fd8 --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/init.lua @@ -0,0 +1,161 @@ +--[[ +By EliasFleckenstein03 and Code-Sploit +]] + +--[[ +Netherite item / node strings + +Nodes: + +Ancient Debris mcl_nether:ancient_debris +Netherite Ingot mcl_nether:netherite_ingot +Netherite Scrap mcl_nether:netherite_scrap +Netherite Block mcl_nether:netheriteblock + +Items: + +Netherite Sword mcl_tools:sword_netherite +Netherite Pickaxe mcl_tools:pick_netherite +Netherite Axe mcl_tools:axe_netherite +Netherite Shovel mcl_tools:shovel_netherite +Netherite Hoe mcl_farming:hoe_netherite + +Netherite Helmet mcl_armor:helmet_netherite +Netherite Chestplate mcl_armor:chestplate_netherite +Netherite Leggings mcl_armor:leggings_netherite +Netherite Boots mcl_armor:boots_netherite +]] + +local S = minetest.get_translator("mcl_smithing_table") +mcl_smithing_table = {} + +-- Function to upgrade diamond tool/armor to netherite tool/armor +function mcl_smithing_table.upgrade_item(itemstack) + itemstack = ItemStack(itemstack) -- Copy the stack + + local def = itemstack:get_definition() + + if not def or not def._mcl_upgradable then + return + end + + local itemname = itemstack:get_name() + + local upgrade_item = def._mcl_upgrade_item or itemname:gsub("diamond", "netherite") + + if upgrade_item == itemname then + return + end + + itemstack:set_name(upgrade_item) + + -- Reload the ToolTips of the tool + tt.reload_itemstack_description(itemstack) + + -- Only return itemstack if upgrade was successfull + return itemstack +end + +-- Badly copied over from mcl_anvils +-- ToDo: Make better formspec + +local formspec = "size[9,9]" .. + "label[0,4.0;" .. minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Inventory"))) .. "]" .. + "list[current_player;main;0,4.5;9,3;9]" .. + mcl_formspec.get_itemslot_bg(0,4.5,9,3) .. + "list[current_player;main;0,7.74;9,1;]" .. + mcl_formspec.get_itemslot_bg(0,7.74,9,1) .. + "list[context;diamond_item;1,2.5;1,1;]" .. + mcl_formspec.get_itemslot_bg(1,2.5,1,1) .. + "list[context;netherite;4,2.5;1,1;]" .. + mcl_formspec.get_itemslot_bg(4,2.5,1,1) .. + "list[context;upgraded_item;8,2.5;1,1;]" .. + mcl_formspec.get_itemslot_bg(8,2.5,1,1) .. + "label[3,0.1;" .. minetest.formspec_escape(minetest.colorize(mcl_colors.DARK_GRAY, S("Upgrade Gear"))) .. "]" .. + "listring[context;output]".. + "listring[current_player;main]".. + "listring[context;input]".. + "listring[current_player;main]" + +local function reset_upgraded_item(pos) + local inv = minetest.get_meta(pos):get_inventory() + local upgraded_item + + if inv:get_stack("netherite", 1):get_name() == "mcl_nether:netherite_ingot" then + upgraded_item = mcl_smithing_table.upgrade_item(inv:get_stack("diamond_item", 1)) + end + + inv:set_stack("upgraded_item", 1, upgraded_item) +end + +minetest.register_node("mcl_smithing_table:table", { + description = S("Smithing table"), + -- ToDo: Add _doc_items_longdesc and _doc_items_usagehelp + + stack_max = 64, + groups = {pickaxey = 2, deco_block = 1}, + + tiles = { + "mcl_smithing_table_top.png", "mcl_smithing_table_bottom.png", "mcl_smithing_table_side.png", + "mcl_smithing_table_side.png", "mcl_smithing_table_side.png", "mcl_smithing_table_front.png" + }, + + sounds = mcl_sounds.node_sound_metal_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", formspec) + + local inv = meta:get_inventory() + + inv:set_size("diamond_item", 1) + inv:set_size("netherite", 1) + inv:set_size("upgraded_item", 1) + end, + + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if listname == "diamond_item" and mcl_smithing_table.upgrade_item(stack) or listname == "netherite" and stack:get_name() == "mcl_nether:netherite_ingot" then + return stack:get_count() + end + + return 0 + end, + + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + return 0 + end, + + on_metadata_inventory_put = reset_upgraded_item, + + on_metadata_inventory_take = function(pos, listname, index, stack, player) + local inv = minetest.get_meta(pos):get_inventory() + + local function take_item(listname) + local itemstack = inv:get_stack(listname, 1) + itemstack:take_item() + inv:set_stack(listname, 1, itemstack) + end + + if listname == "upgraded_item" then + take_item("diamond_item") + take_item("netherite") + + -- ToDo: make epic sound + minetest.sound_play("mcl_smithing_table_upgrade", {pos = pos, max_hear_distance = 16}) + end + + reset_upgraded_item(pos) + end, + + _mcl_blast_resistance = 2.5, + _mcl_hardness = 2.5 +}) + +minetest.register_craft({ + output = "mcl_smithing_table:table", + recipe = { + {"mcl_core:iron_ingot", "mcl_core:iron_ingot", ""}, + {"group:wood", "group:wood", ""}, + {"group:wood", "group:wood", ""} + } +}) diff --git a/mods/ITEMS/mcl_smithing_table/mod.conf b/mods/ITEMS/mcl_smithing_table/mod.conf new file mode 100644 index 0000000000..aee93fa65a --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/mod.conf @@ -0,0 +1,2 @@ +name = mcl_smithing_table +depends = mcl_colors, mcl_formspec diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_bottom.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_bottom.png new file mode 100644 index 0000000000..e650781dfc Binary files /dev/null and b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_bottom.png differ diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_front.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_front.png new file mode 100644 index 0000000000..81ed31c911 Binary files /dev/null and b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_front.png differ diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_inventory.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_inventory.png new file mode 100644 index 0000000000..fdbb706d10 Binary files /dev/null and b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_inventory.png differ diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_side.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_side.png new file mode 100644 index 0000000000..8572b4c6ee Binary files /dev/null and b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_side.png differ diff --git a/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_top.png b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_top.png new file mode 100644 index 0000000000..3384d2b250 Binary files /dev/null and b/mods/ITEMS/mcl_smithing_table/textures/mcl_smithing_table_top.png differ diff --git a/mods/ITEMS/mcl_sweet_berry/init.lua b/mods/ITEMS/mcl_sweet_berry/init.lua index d1967c68c5..bc79a76678 100644 --- a/mods/ITEMS/mcl_sweet_berry/init.lua +++ b/mods/ITEMS/mcl_sweet_berry/init.lua @@ -31,7 +31,7 @@ minetest.register_node("mcl_sweet_berry:sweet_berry_bush_2", { type = "fixed", fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, }, - drop = "mc:sweet_berry 2" + drop = "mcl_sweet_berry:sweet_berry 2" }) minetest.register_node("mcl_sweet_berry:sweet_berry_bush_3", { drawtype = "plantlike", @@ -41,7 +41,7 @@ minetest.register_node("mcl_sweet_berry:sweet_berry_bush_3", { type = "fixed", fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, }, - drop = "mc:sweet_berry 3" + drop = "mcl_sweet_berry:sweet_berry 3" }) minetest.register_decoration({ deco_type = "simple", diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index 809a492799..b77da39c89 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -173,6 +173,29 @@ minetest.register_tool("mcl_tools:pick_diamond", { _mcl_diggroups = { pickaxey = { speed = 8, level = 5, uses = 1562 } }, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_tools:pick_netherite" +}) + +minetest.register_tool("mcl_tools:pick_netherite", { + description = S("Netherite Pickaxe"), + _doc_items_longdesc = pickaxe_longdesc, + inventory_image = "default_tool_netheritepick.png", + wield_scale = wield_scale, + groups = { tool=1, pickaxe=1, dig_speed_class=6, enchantability=10 }, + tool_capabilities = { + -- 1/1.2 + full_punch_interval = 0.83333333, + max_drop_level=5, + damage_groups = {fleshy=6}, + punch_attack_uses = 1016, + }, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + pickaxey = { speed = 9.5, level = 6, uses = 2031 } + }, }) local make_grass_path = function(itemstack, placer, pointed_thing) @@ -349,6 +372,30 @@ minetest.register_tool("mcl_tools:shovel_diamond", { _mcl_diggroups = { shovely = { speed = 8, level = 5, uses = 1562 } }, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_tools:shovel_netherite" +}) + +minetest.register_tool("mcl_tools:shovel_netherite", { + description = S("Netherite Shovel"), + _doc_items_longdesc = shovel_longdesc, + _doc_items_usagehelp = shovel_use, + inventory_image = "default_tool_netheriteshovel.png", + wield_scale = wield_scale, + groups = { tool=1, shovel=1, dig_speed_class=6, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=5, + damage_groups = {fleshy=5}, + punch_attack_uses = 1016, + }, + on_place = make_grass_path, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + shovely = { speed = 9, level = 6, uses = 2031 } + }, }) -- Axes @@ -481,6 +528,29 @@ minetest.register_tool("mcl_tools:axe_diamond", { _mcl_diggroups = { axey = { speed = 8, level = 5, uses = 1562 } }, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_tools:axe_netherite" +}) + +minetest.register_tool("mcl_tools:axe_netherite", { + description = S("Netherite Axe"), + _doc_items_longdesc = axe_longdesc, + inventory_image = "default_tool_netheriteaxe.png", + wield_scale = wield_scale, + groups = { tool=1, axe=1, dig_speed_class=6, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=5, + damage_groups = {fleshy=10}, + punch_attack_uses = 1016, + }, + on_place = make_stripped_trunk, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + axey = { speed = 9, level = 6, uses = 2031 } + }, }) -- Swords @@ -584,6 +654,28 @@ minetest.register_tool("mcl_tools:sword_diamond", { swordy = { speed = 8, level = 5, uses = 1562 }, swordy_cobweb = { speed = 8, level = 5, uses = 1562 } }, + _mcl_upgradable = true, + _mcl_upgrade_item = "mcl_tools:sword_netherite" +}) +minetest.register_tool("mcl_tools:sword_netherite", { + description = S("Netherite Sword"), + _doc_items_longdesc = sword_longdesc, + inventory_image = "default_tool_netheritesword.png", + wield_scale = wield_scale, + groups = { weapon=1, sword=1, dig_speed_class=5, enchantability=10 }, + tool_capabilities = { + full_punch_interval = 0.625, + max_drop_level=5, + damage_groups = {fleshy=9}, + punch_attack_uses = 2031, + }, + sound = { breaks = "default_tool_breaks" }, + _repair_material = "mcl_nether:netherite_ingot", + _mcl_toollike_wield = true, + _mcl_diggroups = { + swordy = { speed = 8, level = 5, uses = 2031 }, + swordy_cobweb = { speed = 8, level = 5, uses = 2031 } + }, }) --Shears diff --git a/mods/ITEMS/mcl_tools/textures/default_tool_netheriteaxe.png b/mods/ITEMS/mcl_tools/textures/default_tool_netheriteaxe.png new file mode 100644 index 0000000000..d9657367b6 Binary files /dev/null and b/mods/ITEMS/mcl_tools/textures/default_tool_netheriteaxe.png differ diff --git a/mods/ITEMS/mcl_tools/textures/default_tool_netheritepick.png b/mods/ITEMS/mcl_tools/textures/default_tool_netheritepick.png new file mode 100644 index 0000000000..e4140dde76 Binary files /dev/null and b/mods/ITEMS/mcl_tools/textures/default_tool_netheritepick.png differ diff --git a/mods/ITEMS/mcl_tools/textures/default_tool_netheriteshovel.png b/mods/ITEMS/mcl_tools/textures/default_tool_netheriteshovel.png new file mode 100644 index 0000000000..9ae8654ff6 Binary files /dev/null and b/mods/ITEMS/mcl_tools/textures/default_tool_netheriteshovel.png differ diff --git a/mods/ITEMS/mcl_tools/textures/default_tool_netheritesword.png b/mods/ITEMS/mcl_tools/textures/default_tool_netheritesword.png new file mode 100644 index 0000000000..589637a62e Binary files /dev/null and b/mods/ITEMS/mcl_tools/textures/default_tool_netheritesword.png differ diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index f583d87b6f..20dbee561f 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -2068,6 +2068,20 @@ local function register_dimension_ores() }) end + -- Ancient debris + if minetest.settings:get_bool("mcl_generate_ores", true) then + minetest.register_ore({ + ore_type = "scatter", + ore = "mcl_nether:ancient_debris", + wherein = {"mcl_nether:netherrack"}, + clust_scarcity = 10000, + clust_num_ores = 4, + clust_size = 1, + y_min = mcl_worlds.layer_to_y(8, "nether"), + y_max = mcl_worlds.layer_to_y(119, "nether"), + }) + end + -- Lava springs in the Nether minetest.register_ore({ ore_type = "scatter", diff --git a/mods/MAPGEN/mcl_debrisgen/init.lua b/mods/MAPGEN/mcl_debrisgen/init.lua new file mode 100644 index 0000000000..4e80c25042 --- /dev/null +++ b/mods/MAPGEN/mcl_debrisgen/init.lua @@ -0,0 +1,44 @@ +local c_debris = minetest.get_content_id("mcl_nether:ancient_debris") +local c_netherrack = minetest.get_content_id("mcl_nether:netherrack") +local c_air = minetest.get_content_id("air") + +local facedir = { + vector.new(0, 0, 1), + vector.new(0, 1, 0), + vector.new(1, 0, 0), + vector.new(0, 0, -1), + vector.new(0, -1, 0), + vector.new(-1, 0, 0), +} + +minetest.register_on_generated(function(minp, maxp) + if maxp.y < mcl_vars.mg_nether_min or minp.y > mcl_vars.mg_nether_max then + return + end + + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") + local data = vm:get_data() + local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax}) + + for idx in area:iter(minp.x, math.max(minp.y, mcl_vars.mg_nether_min), minp.z, maxp.x, math.min(maxp.y, mcl_vars.mg_nether_max), maxp.z) do + if data[idx] == c_debris then + local pos = area:position(idx) + local exposed = false + for _, dir in pairs(facedir) do + if data[area:indexp(vector.add(pos, dir))] == c_air then + exposed = true + break + end + end + if exposed then + data[idx] = c_netherrack + end + end + end + + vm:set_data(data) + vm:calc_lighting() + vm:update_liquids() + vm:write_to_map() +end) + diff --git a/mods/MAPGEN/mcl_debrisgen/mod.conf b/mods/MAPGEN/mcl_debrisgen/mod.conf new file mode 100644 index 0000000000..cc54552087 --- /dev/null +++ b/mods/MAPGEN/mcl_debrisgen/mod.conf @@ -0,0 +1,4 @@ +name = mcl_debrisgen +author = Fleckenstein +description = Make sure ancient debris is not generated exposed to air +depends = mcl_mapgen_core, mcl_nether diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index 90b2725067..288084ffa7 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -2016,8 +2016,8 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed) -- Big lava seas by replacing air below a certain height if mcl_vars.mg_lava then - lvm_used = set_layers(data, area, c_lava, c_air, mcl_vars.mg_overworld_min, mcl_vars.mg_lava_overworld_max, minp, maxp, lvm_used, pr) - lvm_used = set_layers(data, area, c_nether_lava, c_air, mcl_vars.mg_nether_min, mcl_vars.mg_lava_nether_max, minp, maxp, lvm_used, pr) + lvm_used = set_layers(data, area, c_lava, c_air, mcl_vars.mg_overworld_min, mcl_vars.mg_lava_overworld_max, emin, emax, lvm_used, pr) + lvm_used = set_layers(data, area, c_nether_lava, c_air, mcl_vars.mg_nether_min, mcl_vars.mg_lava_nether_max, emin, emax, lvm_used, pr) end -- Clay, vines, cocoas diff --git a/mods/PLAYER/mcl_death_drop/API.md b/mods/PLAYER/mcl_death_drop/API.md index b19e2fd7c8..3fc5163e54 100644 --- a/mods/PLAYER/mcl_death_drop/API.md +++ b/mods/PLAYER/mcl_death_drop/API.md @@ -7,8 +7,8 @@ Drop registered inventories on player death. * function(player): must return inventory * listname: string * drop: bool - * true: the entire list will be dropped - * false: items with curse_of_vanishing enchantement will be broken. + * true: the list will be dropped + * false: the list will only be cleared ## mcl_death_drop.registered_dropped_lists Table containing dropped list inventory, name and drop state. \ No newline at end of file diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png index e02778a270..d21b168478 100644 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png and b/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png differ diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png index 9c1bb63e48..3830fdfc3c 100644 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png and b/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png index 141b4b44d8..130601c8ef 100644 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png and b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png differ diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 43f6364987..13d136ecf8 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -215,6 +215,24 @@ minetest.register_globalstep(function(dtime) if vector.length(player_velocity) < 40 then local add_velocity = player.add_velocity or player.add_player_velocity add_velocity(player, vector.multiply(player:get_look_dir(), 4)) + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = fly_pos, + maxpos = fly_pos, + minvel = {x = 0, y = 0, z = 0}, + maxvel = {x = 0, y = 0, z = 0}, + minacc = {x = 0, y = 0, z = 0}, + maxacc = {x = 0, y = 0, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1, + maxsize = 2.5, + collisiondetection = false, + vertical = false, + texture = "mcl_particles_crit.png^[colorize:#bc7a57:127", + glow = 5, + }) end end else diff --git a/mods/PLAYER/mcl_spawn/init.lua b/mods/PLAYER/mcl_spawn/init.lua index 441db28b7c..b8c746d1fd 100644 --- a/mods/PLAYER/mcl_spawn/init.lua +++ b/mods/PLAYER/mcl_spawn/init.lua @@ -397,9 +397,9 @@ end -- false otherwise. mcl_spawn.get_bed_spawn_pos = function(player) local spawn, custom_spawn = nil, false - if player ~= nil and player:is_player() then + if player and player:is_player() then local attr = player:get_meta():get_string("mcl_beds:spawn") - if attr ~= nil and attr ~= "" then + if attr and attr ~= "" then spawn = minetest.string_to_pos(attr) custom_spawn = true end diff --git a/tools/Texture_Converter.py b/tools/Texture_Converter.py index c23bc9fce3..1a81338e98 100755 --- a/tools/Texture_Converter.py +++ b/tools/Texture_Converter.py @@ -202,7 +202,8 @@ def convert_textures(): [ tex_dir + "/models/armor/chainmail_layer_1.png", tex_dir + "/models/armor/chainmail_layer_2.png", target_dir("/mods/ITEMS/mcl_armor/textures"), "mcl_armor_helmet_chain.png", "mcl_armor_chestplate_chain.png", "mcl_armor_leggings_chain.png", "mcl_armor_boots_chain.png" ], [ tex_dir + "/models/armor/gold_layer_1.png", tex_dir + "/models/armor/gold_layer_2.png", target_dir("/mods/ITEMS/mcl_armor/textures"), "mcl_armor_helmet_gold.png", "mcl_armor_chestplate_gold.png", "mcl_armor_leggings_gold.png", "mcl_armor_boots_gold.png" ], [ tex_dir + "/models/armor/iron_layer_1.png", tex_dir + "/models/armor/iron_layer_2.png", target_dir("/mods/ITEMS/mcl_armor/textures"), "mcl_armor_helmet_iron.png", "mcl_armor_chestplate_iron.png", "mcl_armor_leggings_iron.png", "mcl_armor_boots_iron.png" ], - [ tex_dir + "/models/armor/diamond_layer_1.png", tex_dir + "/models/armor/diamond_layer_2.png", target_dir("/mods/ITEMS/mcl_armor/textures"), "mcl_armor_helmet_diamond.png", "mcl_armor_chestplate_diamond.png", "mcl_armor_leggings_diamond.png", "mcl_armor_boots_diamond.png" ] + [ tex_dir + "/models/armor/diamond_layer_1.png", tex_dir + "/models/armor/diamond_layer_2.png", target_dir("/mods/ITEMS/mcl_armor/textures"), "mcl_armor_helmet_diamond.png", "mcl_armor_chestplate_diamond.png", "mcl_armor_leggings_diamond.png", "mcl_armor_boots_diamond.png" ], + [ tex_dir + "/models/armor/netherite_layer_1.png", tex_dir + "/models/armor/netherite_layer_2.png", target_dir("/mods/ITEMS/mcl_armor/textures"), "mcl_armor_helmet_netherite.png", "mcl_armor_chestplate_netherite.png", "mcl_armor_leggings_netherite.png", "mcl_armor_boots_netherite.png" ] ] for a in armor_files: APXSIZE = 16 # for some reason MineClone2 requires this