Merge pull request 'Done: Netherite for MCL5' (#1566) from netherite into mineclone5
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1566mineclone5
|
@ -82,6 +82,23 @@ minetest.register_tool("mcl_armor:helmet_diamond",{
|
||||||
},
|
},
|
||||||
on_place = armor.on_armor_use,
|
on_place = armor.on_armor_use,
|
||||||
on_secondary_use = 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", {
|
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_place = armor.on_armor_use,
|
||||||
on_secondary_use = 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", {
|
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_place = armor.on_armor_use,
|
||||||
on_secondary_use = 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", {
|
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_place = armor.on_armor_use,
|
||||||
on_secondary_use = 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", {
|
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,
|
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
|
-- Register Craft Recipies
|
||||||
|
|
||||||
local craft_ingreds = {
|
local craft_ingreds = {
|
||||||
|
|
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 535 B |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 459 B |
|
@ -55,6 +55,7 @@ local uses = {
|
||||||
iron = 251,
|
iron = 251,
|
||||||
gold = 33,
|
gold = 33,
|
||||||
diamond = 1562,
|
diamond = 1562,
|
||||||
|
netherite = 2031,
|
||||||
}
|
}
|
||||||
|
|
||||||
local hoe_tt = S("Turns block into farmland")
|
local hoe_tt = S("Turns block into farmland")
|
||||||
|
@ -255,6 +256,8 @@ minetest.register_tool("mcl_farming:hoe_diamond", {
|
||||||
_mcl_diggroups = {
|
_mcl_diggroups = {
|
||||||
hoey = { speed = 8, level = 5, uses = 1562 }
|
hoey = { speed = 8, level = 5, uses = 1562 }
|
||||||
},
|
},
|
||||||
|
_mcl_upgradable = true,
|
||||||
|
_mcl_upgrade_item = "mcl_tools:hoe_netherite"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -273,3 +276,24 @@ minetest.register_craft({
|
||||||
{"mcl_core:stick", ""}
|
{"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 }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
After Width: | Height: | Size: 6.3 KiB |
|
@ -52,6 +52,36 @@ minetest.register_node("mcl_nether:quartz_ore", {
|
||||||
_mcl_fortune_drop = mcl_core.fortune_drop_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
|
-- For eternal fire on top of netherrack and magma blocks
|
||||||
-- (this code does not require a dependency on mcl_fire)
|
-- (this code does not require a dependency on mcl_fire)
|
||||||
local eternal_after_destruct = function(pos, oldnode)
|
local eternal_after_destruct = function(pos, oldnode)
|
||||||
|
@ -253,6 +283,22 @@ minetest.register_craftitem("mcl_nether:quartz", {
|
||||||
groups = { craftitem = 1 },
|
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", {
|
minetest.register_craftitem("mcl_nether:netherbrick", {
|
||||||
description = S("Nether Brick"),
|
description = S("Nether Brick"),
|
||||||
_doc_items_longdesc = S("Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences."),
|
_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,
|
cooktime = 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "mcl_nether:netherite_scrap",
|
||||||
|
recipe = "mcl_nether:ancient_debris",
|
||||||
|
cooktime = 10,
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'mcl_nether:quartz_block',
|
output = 'mcl_nether:quartz_block',
|
||||||
recipe = {
|
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()).."/nether_wart.lua")
|
||||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/lava.lua")
|
dofile(minetest.get_modpath(minetest.get_current_modname()).."/lava.lua")
|
||||||
|
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 425 B |
|
@ -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", ""}
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,2 @@
|
||||||
|
name = mcl_smithing_table
|
||||||
|
depends = mcl_colors, mcl_formspec
|
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 699 B |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 432 B |
|
@ -173,6 +173,29 @@ minetest.register_tool("mcl_tools:pick_diamond", {
|
||||||
_mcl_diggroups = {
|
_mcl_diggroups = {
|
||||||
pickaxey = { speed = 8, level = 5, uses = 1562 }
|
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)
|
local make_grass_path = function(itemstack, placer, pointed_thing)
|
||||||
|
@ -349,6 +372,30 @@ minetest.register_tool("mcl_tools:shovel_diamond", {
|
||||||
_mcl_diggroups = {
|
_mcl_diggroups = {
|
||||||
shovely = { speed = 8, level = 5, uses = 1562 }
|
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
|
-- Axes
|
||||||
|
@ -481,6 +528,29 @@ minetest.register_tool("mcl_tools:axe_diamond", {
|
||||||
_mcl_diggroups = {
|
_mcl_diggroups = {
|
||||||
axey = { speed = 8, level = 5, uses = 1562 }
|
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
|
-- Swords
|
||||||
|
@ -584,6 +654,28 @@ minetest.register_tool("mcl_tools:sword_diamond", {
|
||||||
swordy = { speed = 8, level = 5, uses = 1562 },
|
swordy = { speed = 8, level = 5, uses = 1562 },
|
||||||
swordy_cobweb = { 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
|
--Shears
|
||||||
|
|
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.8 KiB |
|
@ -2068,6 +2068,20 @@ local function register_dimension_ores()
|
||||||
})
|
})
|
||||||
end
|
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
|
-- Lava springs in the Nether
|
||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "scatter",
|
ore_type = "scatter",
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
|
@ -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/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/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/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:
|
for a in armor_files:
|
||||||
APXSIZE = 16 # for some reason MineClone2 requires this
|
APXSIZE = 16 # for some reason MineClone2 requires this
|
||||||
|
|