Compare commits
59 Commits
wood_fence
...
master
Author | SHA1 | Date |
---|---|---|
ThePython10110 | 56937aee7b | |
chmodsayshello | 712a6d6c66 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | a620d24ec8 | |
ancientmarinerdev | 178b24886f | |
ancientmarinerdev | 8333281b4f | |
Nicu | 6d3e55ce12 | |
ancientmarinerdev | 2c2f5595f3 | |
chmodsayshello | 8936313fb3 | |
ancientmarinerdev | c51442704c | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 2bd6678b08 | |
Codiac | e0c44244f9 | |
Codiac | 5b7352a23a | |
Michieal | e8c658658d | |
Michieal | e9d994b74d | |
Michieal | eafe6627d8 | |
chmodsayshello | 4046a68fbf | |
Blockhead | 882c3ef339 | |
Michieal | b2ebcf5d4f | |
Michieal | f57220f784 | |
Eliy21 | 2d9bffaa43 | |
Eliy21 | eb658a4996 | |
Julien Palard | 878480d010 | |
chmodsayshello | 49bd28e109 | |
chmodsayshello | 6c107ce990 | |
chmodsayshello | 7c43c15fda | |
chmodsayshello | 291cbaf434 | |
chmodsayshello | fb74689f3d | |
chmodsayshello | da024bb4b8 | |
chmodsayshello | 2f8bb9726b | |
chmodsayshello | 8176e7319f | |
chmodsayshello | 64bc57c6a4 | |
chmodsayshello | d346aa07ee | |
chmodsayshello | 9d1840f4ca | |
chmodsayshello | 5cc9038169 | |
chmodsayshello | 460ef23b50 | |
chmodsayshello | 1e16647fe9 | |
chmodsayshello | 16415ae577 | |
chmodsayshello | 2665980007 | |
chmodsayshello | bb2ce9ef92 | |
chmodsayshello | bc29e4dd95 | |
chmodsayshello | b76ed92aba | |
chmodsayshello | 703f1f46fc | |
chmodsayshello | 0b118c170e | |
chmodsayshello | 8431ac34d0 | |
chmodsayshello | 049128972f | |
chmodsayshello | 0c65d9d11a | |
chmodsayshello | 311beeb31c | |
chmodsayshello | bc3da8dab8 | |
chmodsayshello | ed5232411b | |
chmodsayshello | 6c6a27320d | |
chmodsayshello | 82f2f4784e | |
chmodsayshello | 8476865ea7 | |
chmodsayshello | b4273af245 | |
chmodsayshello | 483285a612 | |
chmodsayshello | b154f2def1 | |
chmodsayshello | c62195662c | |
chmodsayshello | 4dc5ad3bdb | |
chmodsayshello | cc186cc588 | |
chmodsayshello | df8c9625e4 |
|
@ -178,6 +178,7 @@
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
* Nicu
|
* Nicu
|
||||||
* Exhale
|
* Exhale
|
||||||
|
* Aeonix_Aeon
|
||||||
* Wbjitscool
|
* Wbjitscool
|
||||||
* SmokeyDope
|
* SmokeyDope
|
||||||
|
|
||||||
|
|
4
LEGAL.md
|
@ -42,6 +42,10 @@ The glazed terracotta textures have been created by [MysticTempest](https://gith
|
||||||
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
|
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
|
||||||
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
|
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
|
||||||
|
|
||||||
|
Armor trim models were created by Aeonix_Aeon
|
||||||
|
Source: <https://www.curseforge.com/minecraft/texture-packs/ozocraft-remix>
|
||||||
|
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
||||||
|
|
||||||
The main menu images are released under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
|
The main menu images are released under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
|
||||||
|
|
||||||
All other files, unless mentioned otherwise, fall under:
|
All other files, unless mentioned otherwise, fall under:
|
||||||
|
|
|
@ -11,4 +11,4 @@ For example, Copper Blocks have the definition arguement of `_mcl_waxed_variant
|
||||||
|
|
||||||
For waxed nodes, scraping is easy. Start by putting `waxed = 1` into the list of groups of the waxed node.
|
For waxed nodes, scraping is easy. Start by putting `waxed = 1` into the list of groups of the waxed node.
|
||||||
Next put `_mcl_stripped_variant = item string of the unwaxed variant of the node` into the defintion table.
|
Next put `_mcl_stripped_variant = item string of the unwaxed variant of the node` into the defintion table.
|
||||||
Wxaed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.
|
Waxed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.
|
||||||
|
|
|
@ -50,7 +50,7 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
explosion_strength = 3,
|
explosion_strength = 3,
|
||||||
explosion_radius = 3.5,
|
explosion_radius = 3.5,
|
||||||
explosion_damage_radius = 3.5,
|
explosion_damage_radius = 3.5,
|
||||||
explosiontimer_reset_radius = 6,
|
explosiontimer_reset_radius = 3,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
explosion_timer = 1.5,
|
explosion_timer = 1.5,
|
||||||
allow_fuse_reset = true,
|
allow_fuse_reset = true,
|
||||||
|
@ -172,7 +172,7 @@ mcl_mobs.register_mob("mobs_mc:creeper_charged", {
|
||||||
explosion_strength = 6,
|
explosion_strength = 6,
|
||||||
explosion_radius = 8,
|
explosion_radius = 8,
|
||||||
explosion_damage_radius = 8,
|
explosion_damage_radius = 8,
|
||||||
explosiontimer_reset_radius = 6,
|
explosiontimer_reset_radius = 3,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
explosion_timer = 1.5,
|
explosion_timer = 1.5,
|
||||||
allow_fuse_reset = true,
|
allow_fuse_reset = true,
|
||||||
|
|
|
@ -85,6 +85,31 @@ function mcl_armor.equip_on_use(itemstack, player, pointed_thing)
|
||||||
return mcl_armor.equip(itemstack, player)
|
return mcl_armor.equip(itemstack, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function get_armor_texture(textures, name, modname, itemname, itemstring)
|
||||||
|
local core_texture = textures[name] or modname .. "_" .. itemname .. ".png"
|
||||||
|
if type(core_texture) == "function" then return core_texture end
|
||||||
|
mcl_armor.trims.core_textures[itemstring] = core_texture
|
||||||
|
local func = function(obj, itemstack)
|
||||||
|
local overlay = itemstack:get_meta():get_string("mcl_armor:trim_overlay")
|
||||||
|
local core_armor_texture
|
||||||
|
local stack_name = mcl_grindstone.remove_enchant_name(itemstack) -- gets original itemstring if enchanted, no need to store (nearly) identical values
|
||||||
|
local core_armor_texture = mcl_armor.trims.core_textures[stack_name]
|
||||||
|
|
||||||
|
if mcl_enchanting.is_enchanted(itemstack:get_name()) then -- working with the original stack to know wether to apply enchanting overlay or not
|
||||||
|
-- Far, Far in the future we may no longer _enchanted itemstrings...
|
||||||
|
-- To fix this code, simply put the unmodified itemstring in stack_name's place
|
||||||
|
-- DO NOT REMOVE THIS if UNLESS YOU KNOW WHAT YOU'RE TRYING TO ACHIEVE!
|
||||||
|
core_armor_texture = core_armor_texture .. mcl_enchanting.overlay
|
||||||
|
end
|
||||||
|
|
||||||
|
if overlay == "" then return core_armor_texture end -- key not present; armor not trimmed
|
||||||
|
|
||||||
|
return core_armor_texture .. overlay
|
||||||
|
end
|
||||||
|
|
||||||
|
return func
|
||||||
|
end
|
||||||
|
|
||||||
function mcl_armor.register_set(def)
|
function mcl_armor.register_set(def)
|
||||||
local modname = minetest.get_current_modname()
|
local modname = minetest.get_current_modname()
|
||||||
local S = minetest.get_translator(modname)
|
local S = minetest.get_translator(modname)
|
||||||
|
@ -136,7 +161,7 @@ function mcl_armor.register_set(def)
|
||||||
_on_unequip = on_unequip_callbacks[name] or def.on_unequip,
|
_on_unequip = on_unequip_callbacks[name] or def.on_unequip,
|
||||||
_on_break = on_break_callbacks[name] or def.on_break,
|
_on_break = on_break_callbacks[name] or def.on_break,
|
||||||
_mcl_armor_element = name,
|
_mcl_armor_element = name,
|
||||||
_mcl_armor_texture = textures[name] or modname .. "_" .. itemname .. ".png",
|
_mcl_armor_texture = get_armor_texture(textures, name, modname, itemname, itemstring),
|
||||||
_mcl_upgradable = def._mcl_upgradable,
|
_mcl_upgradable = def._mcl_upgradable,
|
||||||
_mcl_upgrade_item = upgrade_item
|
_mcl_upgrade_item = upgrade_item
|
||||||
})
|
})
|
||||||
|
@ -257,3 +282,55 @@ function mcl_armor.update(obj)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mcl_armor.trim(itemstack, overlay, color_string)
|
||||||
|
local def = itemstack:get_definition()
|
||||||
|
if not def._mcl_armor_texture and not mcl_armor.trims.blacklisted[itemstack:get_name()] then return end
|
||||||
|
local meta = itemstack:get_meta()
|
||||||
|
|
||||||
|
local piece_overlay = overlay
|
||||||
|
local inv_overlay = ""
|
||||||
|
local piece_type = def._mcl_armor_element
|
||||||
|
|
||||||
|
if piece_type == "head" then --helmet
|
||||||
|
inv_overlay = "^(helmet_trim.png"
|
||||||
|
piece_overlay = piece_overlay .. "_helmet"
|
||||||
|
elseif piece_type == "torso" then --chestplate
|
||||||
|
inv_overlay = "^(chestplate_trim.png"
|
||||||
|
piece_overlay = piece_overlay .. "_chestplate"
|
||||||
|
elseif piece_type == "legs" then --leggings
|
||||||
|
inv_overlay = "^(leggings_trim.png"
|
||||||
|
piece_overlay = piece_overlay .. "_leggings"
|
||||||
|
elseif piece_type == "feet" then --boots
|
||||||
|
inv_overlay = "^(boots_trim.png"
|
||||||
|
piece_overlay = piece_overlay .. "_boots"
|
||||||
|
end
|
||||||
|
local color = mcl_armor.trims.colors[color_string]
|
||||||
|
inv_overlay = inv_overlay .. "^[colorize:" .. color .. ":150)"
|
||||||
|
piece_overlay = piece_overlay .. ".png"
|
||||||
|
|
||||||
|
piece_overlay = "^(" .. piece_overlay .. "^[colorize:" .. color .. ":150)"
|
||||||
|
|
||||||
|
meta:set_string("mcl_armor:trim_overlay" , piece_overlay) -- set textures to render on the player, will work for clients below 5.8 as well
|
||||||
|
meta:set_string("mcl_armor:inv", inv_overlay) -- make 5.8+ clients display the fancy inv image, older ones will see no change in the *inventory* image
|
||||||
|
meta:set_string("inventory_image", def.inventory_image .. inv_overlay) -- dont use reload_inv_image as it's a one liner in this enviorment
|
||||||
|
end
|
||||||
|
|
||||||
|
function mcl_armor.reload_trim_inv_image(itemstack)
|
||||||
|
local meta = itemstack:get_meta()
|
||||||
|
local inv_overlay = meta:get_string("mcl_armor:inv")
|
||||||
|
local def = itemstack:get_definition()
|
||||||
|
if inv_overlay == "" then return end
|
||||||
|
meta:set_string("inventory_image", def.inventory_image .. inv_overlay)
|
||||||
|
end
|
||||||
|
|
||||||
|
tt.register_snippet(function(itemstring, toolcaps, stack)
|
||||||
|
if not stack then return nil end
|
||||||
|
local meta = stack:get_meta()
|
||||||
|
if meta:get_string("mcl_armor:trim_overlay") == "" then return nil end -- remember, get_string returns "" if the key doesn't exist
|
||||||
|
-- we need to get the part of the overlay image between the overlay begin ( and the trim name end _
|
||||||
|
-- we COULD easily store this info in meta, but that would bloat the meta storage, as the same few values would be stored over and over again on every trimmed item
|
||||||
|
-- this is fine here as this code gets only executed when you put armor and a trim in a smithing table
|
||||||
|
local full_overlay = meta:get_string("mcl_armor:trim_overlay")
|
||||||
|
local trim_name = full_overlay:match("%((.-)%_")
|
||||||
|
return "Upgrade:\n " .. trim_name:gsub("^%l", string.upper) .. " Armor Trim"
|
||||||
|
end)
|
|
@ -57,6 +57,12 @@ mcl_armor = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
player_view_range_factors = {},
|
player_view_range_factors = {},
|
||||||
|
trims = {
|
||||||
|
core_textures = {},
|
||||||
|
blacklisted = {["mcl_armor:elytra"]=true, ["mcl_armor:elytra_enchanted"]=true},
|
||||||
|
overlays = {"sentry","dune","coast","wild","tide","ward","vex","rib","snout","eye","spire"},
|
||||||
|
colors = {["amethyst"]="#8246a5",["gold"]="#ce9627",["emerald"]="#1b9958",["copper"]="#c36447",["diamond"]="#5faed8",["iron"]="#938e88",["lapis"]="#1c306b",["netherite"]="#302a26",["quartz"]="#c9bcb9",["redstone"]="#af2c23"},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local modpath = minetest.get_modpath("mcl_armor")
|
local modpath = minetest.get_modpath("mcl_armor")
|
||||||
|
@ -66,3 +72,4 @@ dofile(modpath .. "/player.lua")
|
||||||
dofile(modpath .. "/damage.lua")
|
dofile(modpath .. "/damage.lua")
|
||||||
dofile(modpath .. "/register.lua")
|
dofile(modpath .. "/register.lua")
|
||||||
dofile(modpath .. "/alias.lua")
|
dofile(modpath .. "/alias.lua")
|
||||||
|
dofile(modpath .. "/trims.lua")
|
||||||
|
|
|
@ -21,3 +21,6 @@ Iron Boots=Eisenstiefel
|
||||||
Golden Boots=Goldstiefel
|
Golden Boots=Goldstiefel
|
||||||
Diamond Boots=Diamantstiefel
|
Diamond Boots=Diamantstiefel
|
||||||
Chain Boots=Kettenstiefel
|
Chain Boots=Kettenstiefel
|
||||||
|
|
||||||
|
|
||||||
|
Smithing Template '@1'=Schiedevorlage '@1'
|
|
@ -46,3 +46,6 @@ Reduces most types of damage by 4% for each level.=
|
||||||
Thorns=
|
Thorns=
|
||||||
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=
|
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=
|
||||||
Aqua Affinity=
|
Aqua Affinity=
|
||||||
|
|
||||||
|
#Translations for armor trims
|
||||||
|
Smithing Template '@1'=
|
|
@ -1,5 +1,5 @@
|
||||||
name = mcl_armor
|
name = mcl_armor
|
||||||
author = stu
|
author = stu
|
||||||
description = Adds craftable armor that is visible to other players.
|
description = Adds craftable armor that is visible to other players.
|
||||||
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage
|
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage, mcl_grindstone
|
||||||
optional_depends = mcl_fire, ethereal, bakedclay
|
optional_depends = mcl_fire, ethereal, bakedclay
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
local mod_registername = minetest.get_current_modname() .. ":"
|
||||||
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
|
for _, template_name in pairs(mcl_armor.trims.overlays) do
|
||||||
|
minetest.register_craftitem(mod_registername .. template_name, {
|
||||||
|
description = S("Smithing Template '@1'", template_name),
|
||||||
|
inventory_image = template_name .. "_armor_trim_smithing_template.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = mod_registername .. template_name .. " 2",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_core:diamond",mod_registername .. template_name,"mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:cobble","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
--temp craft recipies, missing structures
|
||||||
|
minetest.register_craft({
|
||||||
|
output = mod_registername .. "eye",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = mod_registername .. "ward",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:apple_gold_enchanted","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = mod_registername .. "snout",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:goldblock","mcl_core:diamond"},
|
||||||
|
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
|
||||||
|
}
|
||||||
|
})
|
|
@ -3,7 +3,7 @@ mcl_bamboo
|
||||||
|
|
||||||
This mod adds working, familiar bamboo nodes to your Mineclone 2 world.
|
This mod adds working, familiar bamboo nodes to your Mineclone 2 world.
|
||||||
|
|
||||||
Code: MineClone2 dev team. Original (basic) bamboo code by: Small Joker.
|
Code: Michieal. Original (basic, used as inspiration) bamboo code by: Small Joker. Updates to the code: Mineclone Dev Team, Michieal.
|
||||||
|
|
||||||
License for code: GPLv3.
|
License for code: GPLv3.
|
||||||
License for images / textures: CC-BY-SA except where noted.
|
License for images / textures: CC-BY-SA except where noted.
|
||||||
|
|
|
@ -86,6 +86,11 @@ local bamboo_def = {
|
||||||
on_rotate = on_rotate,
|
on_rotate = on_rotate,
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
|
||||||
|
if not pointed_thing then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
if pointed_thing.type ~= "node" then
|
if pointed_thing.type ~= "node" then
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
@ -276,6 +281,13 @@ local bamboo_block_def = {
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
_mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block.
|
_mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block.
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
if not pointed_thing then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
if pointed_thing.type ~= "node" then -- make sure that pointed_thing is not null and is pointing at a node.
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
|
|
||||||
|
|
|
@ -192,23 +192,10 @@ if minetest.get_modpath("mcl_fences") then
|
||||||
local wood_groups = { handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20 }
|
local wood_groups = { handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20 }
|
||||||
local wood_connect = { "group:fence_wood" }
|
local wood_connect = { "group:fence_wood" }
|
||||||
|
|
||||||
local fence_id = mcl_fences.register_fence(
|
local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups,
|
||||||
id,
|
2, 15, wood_connect, node_sound)
|
||||||
S("Bamboo Fence"),
|
local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png",
|
||||||
"mcl_bamboo_fence_bamboo.png",
|
wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults.
|
||||||
wood_groups,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
|
|
||||||
wood_connect, node_sound)
|
|
||||||
|
|
||||||
local gate_id = mcl_fences.register_fence_gate(
|
|
||||||
id,
|
|
||||||
S("Bamboo Fence Gate"),
|
|
||||||
"mcl_bamboo_fence_gate_bamboo.png",
|
|
||||||
wood_groups,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
|
|
||||||
node_sound) -- note: about missing params.. will use defaults.
|
|
||||||
|
|
||||||
mcl_bamboo.mcl_log(dump(fence_id))
|
mcl_bamboo.mcl_log(dump(fence_id))
|
||||||
mcl_bamboo.mcl_log(dump(gate_id))
|
mcl_bamboo.mcl_log(dump(gate_id))
|
||||||
|
|
|
@ -199,11 +199,7 @@ mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_b
|
||||||
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))
|
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))
|
||||||
|
|
||||||
--Wall
|
--Wall
|
||||||
mcl_walls.register_wall(
|
mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone")
|
||||||
"mcl_blackstone:wall",
|
|
||||||
S("Blackstone Wall"),
|
|
||||||
"mcl_blackstone:blackstone"
|
|
||||||
)
|
|
||||||
|
|
||||||
--lavacooling
|
--lavacooling
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,21 @@ local function on_place_fish(itemstack, placer, pointed_thing)
|
||||||
return new_stack
|
return new_stack
|
||||||
end
|
end
|
||||||
|
|
||||||
local pos = pointed_thing.above or pointed_thing.under
|
if pointed_thing.type ~= "node" then return end
|
||||||
if not pos then return end
|
|
||||||
local n = minetest.get_node_or_nil(pos)
|
local pos = pointed_thing.above
|
||||||
if n.name and minetest.registered_nodes[n.name].buildable_to or n.name == "mcl_portals:portal" then
|
local n = minetest.get_node(pointed_thing.above)
|
||||||
local fish = itemstack:get_name():gsub(fishbucket_prefix,"")
|
local def = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
|
||||||
|
|
||||||
|
if ( def and def.buildable_to ) or n.name == "mcl_portals:portal" then
|
||||||
|
pos = pointed_thing.under
|
||||||
|
n = minetest.get_node(pointed_thing.under)
|
||||||
|
end
|
||||||
|
|
||||||
|
local fish = itemstack:get_definition()._mcl_buckets_fish
|
||||||
if fish_names[fish] then
|
if fish_names[fish] then
|
||||||
local o = minetest.add_entity(pos, "mobs_mc:" .. fish)
|
local o = minetest.add_entity(pos, "mobs_mc:" .. fish)
|
||||||
|
if o and o:get_pos() then
|
||||||
local props = itemstack:get_meta():get_string("properties")
|
local props = itemstack:get_meta():get_string("properties")
|
||||||
if props ~= "" then
|
if props ~= "" then
|
||||||
o:set_properties(minetest.deserialize(props))
|
o:set_properties(minetest.deserialize(props))
|
||||||
|
@ -60,6 +68,7 @@ for techname, fishname in pairs(fish_names) do
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
groups = {bucket = 1, fish_bucket = 1},
|
groups = {bucket = 1, fish_bucket = 1},
|
||||||
liquids_pointable = false,
|
liquids_pointable = false,
|
||||||
|
_mcl_buckets_fish = techname,
|
||||||
on_place = on_place_fish,
|
on_place = on_place_fish,
|
||||||
on_secondary_use = on_place_fish,
|
on_secondary_use = on_place_fish,
|
||||||
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
||||||
|
|
|
@ -9,9 +9,10 @@ Authors:
|
||||||
Gerold55 - Code Start + Models?
|
Gerold55 - Code Start + Models?
|
||||||
PrairieWind - Improved and Cleaned Up Code, and added the soul campfire and crafting recipes.
|
PrairieWind - Improved and Cleaned Up Code, and added the soul campfire and crafting recipes.
|
||||||
cora - Added burning damage.
|
cora - Added burning damage.
|
||||||
DinoNuggies4665 - Cooking logic implemented
|
DinoNuggies4665 - Cooking logic implemented.
|
||||||
thunder1035 - Redesigned model and texture tweaks
|
thunder1035 - Redesigned model and texture tweaks.
|
||||||
AncientMariner - Changed smoke to particle spawner and tweaked particle configuration.
|
AncientMariner - Changed smoke to particle spawner and tweaked particle configuration.
|
||||||
|
Michieal - Fixed misc. errors.
|
||||||
|
|
||||||
License of media
|
License of media
|
||||||
----------------
|
----------------
|
||||||
|
|
|
@ -332,6 +332,9 @@ function mcl_campfires.register_campfire(name, def)
|
||||||
elseif minetest.get_item_group(itemstack:get_name(), "campfire_cookable") ~= 0 then
|
elseif minetest.get_item_group(itemstack:get_name(), "campfire_cookable") ~= 0 then
|
||||||
mcl_campfires.take_item(pos, node, player, itemstack)
|
mcl_campfires.take_item(pos, node, player, itemstack)
|
||||||
else
|
else
|
||||||
|
if not pointed_thing then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
minetest.item_place_node(itemstack, player, pointed_thing)
|
minetest.item_place_node(itemstack, player, pointed_thing)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -66,16 +66,9 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood",
|
||||||
"mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("Cherry Sign"))
|
"mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("Cherry Sign"))
|
||||||
|
|
||||||
-- Fences & Gates
|
-- Fences & Gates
|
||||||
mcl_fences.register_fence_and_fence_gate(
|
mcl_fences.register_fence_and_fence_gate("cherry_fence", S("Cherry Fence"), S("Cherry Gate"),
|
||||||
"cherry_fence",
|
"mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, 2, 15,
|
||||||
S("Cherry Fence"),
|
{"group:fence_wood"}, mcl_sounds.node_sound_wood_defaults())
|
||||||
S("Cherry Gate"),
|
|
||||||
"mcl_cherry_blossom_planks.png",
|
|
||||||
{handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20},
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
|
|
||||||
{"group:fence_wood"},
|
|
||||||
mcl_sounds.node_sound_wood_defaults())
|
|
||||||
|
|
||||||
-- Redstone
|
-- Redstone
|
||||||
mesecon.register_pressure_plate(
|
mesecon.register_pressure_plate(
|
||||||
|
|
|
@ -41,7 +41,7 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_copper:mcl_copper:block_weathered_cut 4",
|
output = "mcl_copper:block_weathered_cut 4",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "mcl_copper:block_weathered", "mcl_copper:block_weathered" },
|
{ "mcl_copper:block_weathered", "mcl_copper:block_weathered" },
|
||||||
{ "mcl_copper:block_weathered", "mcl_copper:block_weathered" },
|
{ "mcl_copper:block_weathered", "mcl_copper:block_weathered" },
|
||||||
|
|
|
@ -1581,7 +1581,7 @@ end
|
||||||
-- MUST NOT be called if there is a snow cover node above pos.
|
-- MUST NOT be called if there is a snow cover node above pos.
|
||||||
function mcl_core.clear_snow_dirt(pos, node)
|
function mcl_core.clear_snow_dirt(pos, node)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
if def._mcl_snowless then
|
if def and def._mcl_snowless then
|
||||||
minetest.swap_node(pos, {name = def._mcl_snowless, param2=node.param2})
|
minetest.swap_node(pos, {name = def._mcl_snowless, param2=node.param2})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1602,7 +1602,7 @@ function mcl_core.on_snowable_construct(pos)
|
||||||
-- Make snowed if needed
|
-- Make snowed if needed
|
||||||
if minetest.get_item_group(anode.name, "snow_cover") == 1 then
|
if minetest.get_item_group(anode.name, "snow_cover") == 1 then
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
if def._mcl_snowed then
|
if def and def._mcl_snowed then
|
||||||
minetest.swap_node(pos, {name = def._mcl_snowed, param2=node.param2})
|
minetest.swap_node(pos, {name = def._mcl_snowed, param2=node.param2})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1623,7 +1623,7 @@ function mcl_core.on_snow_construct(pos)
|
||||||
local npos = {x=pos.x, y=pos.y-1, z=pos.z}
|
local npos = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
local node = minetest.get_node(npos)
|
local node = minetest.get_node(npos)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
if def._mcl_snowed then
|
if def and def._mcl_snowed then
|
||||||
minetest.swap_node(npos, {name = def._mcl_snowed, param2=node.param2})
|
minetest.swap_node(npos, {name = def._mcl_snowed, param2=node.param2})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1038,7 +1038,7 @@ for i=1,8 do
|
||||||
|
|
||||||
-- Get position where snow would be placed
|
-- Get position where snow would be placed
|
||||||
local target
|
local target
|
||||||
if minetest.registered_nodes[unode.name].buildable_to then
|
if def and def.buildable_to then
|
||||||
target = under
|
target = under
|
||||||
else
|
else
|
||||||
target = above
|
target = above
|
||||||
|
|
|
@ -218,10 +218,7 @@ local function register_deepslate_variant(item, desc, longdesc)
|
||||||
end
|
end
|
||||||
if item ~= "chiseled" then
|
if item ~= "chiseled" then
|
||||||
mcl_stairs.register_stair_and_slab_simple("deepslate_"..item, "mcl_deepslate:deepslate_"..item, S(desc.." Stairs"), S(desc.." Slab"), S("Double "..desc.." Slab"))
|
mcl_stairs.register_stair_and_slab_simple("deepslate_"..item, "mcl_deepslate:deepslate_"..item, S(desc.." Stairs"), S(desc.." Slab"), S("Double "..desc.." Slab"))
|
||||||
mcl_walls.register_wall(
|
mcl_walls.register_wall("mcl_deepslate:deepslate"..item.."wall", S(desc.." Wall"), "mcl_deepslate:deepslate_"..item)
|
||||||
"mcl_deepslate:deepslate"..item.."wall",
|
|
||||||
S(desc.." Wall"),
|
|
||||||
"mcl_deepslate:deepslate_"..item)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,8 @@ minetest.register_node("mcl_end:chorus_flower", {
|
||||||
1) On top of end stone or chorus plant
|
1) On top of end stone or chorus plant
|
||||||
2) On top of air and horizontally adjacent to exactly 1 chorus plant ]]
|
2) On top of air and horizontally adjacent to exactly 1 chorus plant ]]
|
||||||
local pos
|
local pos
|
||||||
if minetest.registered_nodes[node_under.name].buildable_to then
|
local def = minetest.registered_nodes[node_under.name]
|
||||||
|
if def and def.buildable_to then
|
||||||
pos = pointed_thing.under
|
pos = pointed_thing.under
|
||||||
else
|
else
|
||||||
pos = pointed_thing.above
|
pos = pointed_thing.above
|
||||||
|
@ -283,7 +284,8 @@ minetest.register_node("mcl_end:chorus_plant", {
|
||||||
condition is met:
|
condition is met:
|
||||||
- placed on end stone or any chorus node ]]
|
- placed on end stone or any chorus node ]]
|
||||||
local pos_place, node_check
|
local pos_place, node_check
|
||||||
if minetest.registered_nodes[node_under.name].buildable_to then
|
local def = minetest.registered_nodes[node_under.name]
|
||||||
|
if def and def.buildable_to then
|
||||||
pos_place = pointed_thing.under
|
pos_place = pointed_thing.under
|
||||||
node_check = node_above
|
node_check = node_above
|
||||||
else
|
else
|
||||||
|
|
|
@ -269,16 +269,7 @@ for w=1, #woods do
|
||||||
id = wood[1].."_fence"
|
id = wood[1].."_fence"
|
||||||
id_gate = wood[1].."_fence_gate"
|
id_gate = wood[1].."_fence_gate"
|
||||||
end
|
end
|
||||||
mcl_fences.register_fence_and_fence_gate(
|
mcl_fences.register_fence_and_fence_gate(id, wood[2], wood[3], wood[4], wood_groups, 2, 15, wood_connect, wood_sounds)
|
||||||
id,
|
|
||||||
wood[2],
|
|
||||||
wood[3],
|
|
||||||
wood[4],
|
|
||||||
wood_groups,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
|
|
||||||
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
|
|
||||||
wood_connect,
|
|
||||||
wood_sounds)
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_fences:"..id.." 3",
|
output = "mcl_fences:"..id.." 3",
|
||||||
|
@ -298,15 +289,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- Nether Brick Fence (without fence gate!)
|
-- Nether Brick Fence (without fence gate!)
|
||||||
mcl_fences.register_fence(
|
mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults())
|
||||||
"nether_brick_fence",
|
|
||||||
S("Nether Brick Fence"),
|
|
||||||
"mcl_fences_fence_nether_brick.png",
|
|
||||||
{pickaxey=1, deco_block=1, fence_nether_brick=1},
|
|
||||||
minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness,
|
|
||||||
minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_blast_resistance,
|
|
||||||
{"group:fence_nether_brick"},
|
|
||||||
mcl_sounds.node_sound_stone_defaults())
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_fences:nether_brick_fence 6",
|
output = "mcl_fences:nether_brick_fence 6",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
-- Code based from mcl_anvils
|
-- Code based from mcl_anvils
|
||||||
|
|
||||||
|
mcl_grindstone = {}
|
||||||
|
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
local F = minetest.formspec_escape
|
local F = minetest.formspec_escape
|
||||||
local C = minetest.colorize
|
local C = minetest.colorize
|
||||||
|
@ -55,7 +57,7 @@ local function create_new_item(name_item, meta, wear)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If an item has an enchanment then remove "_enchanted" from the name
|
-- If an item has an enchanment then remove "_enchanted" from the name
|
||||||
local function remove_enchant_name(stack)
|
function mcl_grindstone.remove_enchant_name(stack)
|
||||||
if mcl_enchanting.is_enchanted(stack:get_name()) then
|
if mcl_enchanting.is_enchanted(stack:get_name()) then
|
||||||
local name = stack:get_name()
|
local name = stack:get_name()
|
||||||
return name.sub(name, 1, -11)
|
return name.sub(name, 1, -11)
|
||||||
|
@ -116,8 +118,8 @@ local function update_grindstone_slots(meta)
|
||||||
local def1 = input1:get_definition()
|
local def1 = input1:get_definition()
|
||||||
local def2 = input2:get_definition()
|
local def2 = input2:get_definition()
|
||||||
-- Remove enchant name if they have one
|
-- Remove enchant name if they have one
|
||||||
local name1 = remove_enchant_name(input1)
|
local name1 = mcl_grindstone.remove_enchant_name(input1)
|
||||||
local name2 = remove_enchant_name(input2)
|
local name2 = mcl_grindstone.remove_enchant_name(input2)
|
||||||
|
|
||||||
-- Calculate repair
|
-- Calculate repair
|
||||||
local function calculate_repair(dur1, dur2)
|
local function calculate_repair(dur1, dur2)
|
||||||
|
@ -143,7 +145,7 @@ local function update_grindstone_slots(meta)
|
||||||
local def1 = input1:get_definition()
|
local def1 = input1:get_definition()
|
||||||
local meta = input1:get_meta()
|
local meta = input1:get_meta()
|
||||||
if def1.type == "tool" and mcl_enchanting.is_enchanted(input1:get_name()) then
|
if def1.type == "tool" and mcl_enchanting.is_enchanted(input1:get_name()) then
|
||||||
local name = remove_enchant_name(input1)
|
local name = mcl_grindstone.remove_enchant_name(input1)
|
||||||
local wear = input1:get_wear()
|
local wear = input1:get_wear()
|
||||||
local new_item = create_new_item(name, meta, wear)
|
local new_item = create_new_item(name, meta, wear)
|
||||||
new_output = transfer_curse(input1, new_item)
|
new_output = transfer_curse(input1, new_item)
|
||||||
|
@ -157,7 +159,7 @@ local function update_grindstone_slots(meta)
|
||||||
local def2 = input2:get_definition()
|
local def2 = input2:get_definition()
|
||||||
local meta = input2:get_meta()
|
local meta = input2:get_meta()
|
||||||
if def2.type == "tool" and mcl_enchanting.is_enchanted(input2:get_name()) then
|
if def2.type == "tool" and mcl_enchanting.is_enchanted(input2:get_name()) then
|
||||||
local name = remove_enchant_name(input2)
|
local name = mcl_grindstone.remove_enchant_name(input2)
|
||||||
local wear = input2:get_wear()
|
local wear = input2:get_wear()
|
||||||
local new_item = create_new_item(name, meta, wear)
|
local new_item = create_new_item(name, meta, wear)
|
||||||
new_output = transfer_curse(input2, new_item)
|
new_output = transfer_curse(input2, new_item)
|
||||||
|
|
|
@ -301,7 +301,8 @@ minetest.register_node("mcl_mobspawners:spawner", {
|
||||||
local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing)
|
local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
if success then
|
if success then
|
||||||
local placepos
|
local placepos
|
||||||
if minetest.registered_nodes[node_under.name].buildable_to then
|
local def = minetest.registered_nodes[node_under.name]
|
||||||
|
if def and def.buildable_to then
|
||||||
placepos = pointed_thing.under
|
placepos = pointed_thing.under
|
||||||
else
|
else
|
||||||
placepos = pointed_thing.above
|
placepos = pointed_thing.above
|
||||||
|
|
|
@ -52,7 +52,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", {
|
||||||
tiles = {"mcl_ocean_prismarine_bricks.png"},
|
tiles = {"mcl_ocean_prismarine_bricks.png"},
|
||||||
groups = {pickaxey=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, building_block=1, material_stone=1},
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 1.5,
|
||||||
_mcl_hardness = 1.5,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", {
|
||||||
tiles = {"mcl_ocean_prismarine_dark.png"},
|
tiles = {"mcl_ocean_prismarine_dark.png"},
|
||||||
groups = {pickaxey=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, building_block=1, material_stone=1},
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 1.5,
|
||||||
_mcl_hardness = 1.5,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ local C = minetest.colorize
|
||||||
|
|
||||||
mcl_smithing_table = {}
|
mcl_smithing_table = {}
|
||||||
|
|
||||||
---Function to upgrade diamond tool/armor to netherite tool/armor
|
-- Function to upgrade diamond tool/armor to netherite tool/armor
|
||||||
---@param itemstack ItemStack
|
---@param itemstack ItemStack
|
||||||
function mcl_smithing_table.upgrade_item(itemstack)
|
function mcl_smithing_table.upgrade_item_netherite(itemstack)
|
||||||
local def = itemstack:get_definition()
|
local def = itemstack:get_definition()
|
||||||
|
|
||||||
if not def or not def._mcl_upgradable then
|
if not def or not def._mcl_upgradable then
|
||||||
|
@ -22,6 +22,7 @@ function mcl_smithing_table.upgrade_item(itemstack)
|
||||||
end
|
end
|
||||||
|
|
||||||
itemstack:set_name(upgrade_item)
|
itemstack:set_name(upgrade_item)
|
||||||
|
mcl_armor.reload_trim_inv_image(itemstack)
|
||||||
|
|
||||||
-- Reload the ToolTips of the tool
|
-- Reload the ToolTips of the tool
|
||||||
|
|
||||||
|
@ -40,14 +41,18 @@ local formspec = table.concat({
|
||||||
"image[0.875,0.375;1.75,1.75;mcl_smithing_table_inventory_hammer.png]",
|
"image[0.875,0.375;1.75,1.75;mcl_smithing_table_inventory_hammer.png]",
|
||||||
|
|
||||||
mcl_formspec.get_itemslot_bg_v4(1.625, 2.6, 1, 1),
|
mcl_formspec.get_itemslot_bg_v4(1.625, 2.6, 1, 1),
|
||||||
"list[context;diamond_item;1.625,2.6;1,1;]",
|
"list[context;upgrade_item;1.625,2.6;1,1;]",
|
||||||
|
|
||||||
"image[3.5,2.6;1,1;mcl_anvils_inventory_cross.png]",
|
"image[3.125,2.6;1,1;mcl_anvils_inventory_cross.png]",
|
||||||
|
|
||||||
mcl_formspec.get_itemslot_bg_v4(5.375, 2.6, 1, 1),
|
mcl_formspec.get_itemslot_bg_v4(4.75, 2.6, 1, 1),
|
||||||
"list[context;netherite;5.375,2.6;1,1;]",
|
"list[context;mineral;4.75,2.6;1,1;]",
|
||||||
|
|
||||||
"image[6.75,2.6;2,1;mcl_anvils_inventory_arrow.png]",
|
mcl_formspec.get_itemslot_bg_v4(6, 2.6, 1, 1),
|
||||||
|
mcl_formspec.get_itemslot_bg_v4(6, 2.6, 1, 1, 0, "mcl_smithing_table_inventory_trim_bg.png"),
|
||||||
|
"list[context;template;6,2.6;1,1;]",
|
||||||
|
|
||||||
|
"image[7,2.6;2,1;mcl_anvils_inventory_arrow.png]",
|
||||||
|
|
||||||
mcl_formspec.get_itemslot_bg_v4(9.125, 2.6, 1, 1),
|
mcl_formspec.get_itemslot_bg_v4(9.125, 2.6, 1, 1),
|
||||||
"list[context;upgraded_item;9.125,2.6;1,1;]",
|
"list[context;upgraded_item;9.125,2.6;1,1;]",
|
||||||
|
@ -62,23 +67,60 @@ local formspec = table.concat({
|
||||||
|
|
||||||
-- Listrings
|
-- Listrings
|
||||||
|
|
||||||
"listring[context;diamond_item]",
|
"listring[context;upgrade_item]",
|
||||||
"listring[current_player;main]",
|
"listring[current_player;main]",
|
||||||
"listring[context;netherite]",
|
"listring[context;mineral]",
|
||||||
"listring[current_player;main]",
|
"listring[current_player;main]",
|
||||||
"listring[context;upgraded_item]",
|
"listring[context;upgraded_item]",
|
||||||
"listring[current_player;main]",
|
"listring[current_player;main]",
|
||||||
"listring[current_player;main]",
|
"listring[current_player;main]",
|
||||||
"listring[context;diamond_item]",
|
"listring[context;upgrade_item]",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local smithing_materials = {
|
||||||
|
["mcl_nether:netherite_ingot"] = "netherite",
|
||||||
|
["mcl_core:diamond"] = "diamond",
|
||||||
|
["mcl_core:lapis"] = "lapis",
|
||||||
|
["mcl_amethyst:amethyst_shard"] = "amethyst",
|
||||||
|
["mesecons:wire_00000000_off"] = "redstone",
|
||||||
|
["mcl_core:iron_ingot"] = "iron",
|
||||||
|
["mcl_core:gold_ingot"] = "gold",
|
||||||
|
["mcl_copper:copper_ingot"] = "copper",
|
||||||
|
["mcl_core:emerald"] = "emerald",
|
||||||
|
["mcl_nether:quartz"] = "quartz"
|
||||||
|
}
|
||||||
|
|
||||||
|
function mcl_smithing_table.upgrade_trimmed(itemstack, color_mineral, template)
|
||||||
|
--get information required
|
||||||
|
local material_name = color_mineral:get_name()
|
||||||
|
material_name = smithing_materials[material_name]
|
||||||
|
|
||||||
|
local overlay = template:get_name():gsub("mcl_armor:","")
|
||||||
|
|
||||||
|
--trimming process
|
||||||
|
mcl_armor.trim(itemstack, overlay, material_name)
|
||||||
|
tt.reload_itemstack_description(itemstack)
|
||||||
|
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
function mcl_smithing_table.is_smithing_mineral(itemname)
|
||||||
|
return smithing_materials[itemname] ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
---@param pos Vector
|
---@param pos Vector
|
||||||
local function reset_upgraded_item(pos)
|
local function reset_upgraded_item(pos)
|
||||||
local inv = minetest.get_meta(pos):get_inventory()
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
local upgraded_item
|
local upgraded_item
|
||||||
|
local original_itemname = inv:get_stack("upgrade_item", 1):get_name()
|
||||||
|
local template_present = inv:get_stack("template",1):get_name() ~= ""
|
||||||
|
local is_armor = original_itemname:find("mcl_armor:") ~= nil
|
||||||
|
local is_trimmed = original_itemname:find("_trimmed") ~= nil
|
||||||
|
|
||||||
if inv:get_stack("netherite", 1):get_name() == "mcl_nether:netherite_ingot" then
|
if inv:get_stack("mineral", 1):get_name() == "mcl_nether:netherite_ingot" and not template_present then
|
||||||
upgraded_item = mcl_smithing_table.upgrade_item(inv:get_stack("diamond_item", 1))
|
upgraded_item = mcl_smithing_table.upgrade_item_netherite(inv:get_stack("upgrade_item", 1))
|
||||||
|
elseif template_present and is_armor and not is_trimmed and mcl_smithing_table.is_smithing_mineral(inv:get_stack("mineral", 1):get_name()) then
|
||||||
|
upgraded_item = mcl_smithing_table.upgrade_trimmed(inv:get_stack("upgrade_item", 1),inv:get_stack("mineral", 1),inv:get_stack("template", 1))
|
||||||
end
|
end
|
||||||
|
|
||||||
inv:set_stack("upgraded_item", 1, upgraded_item)
|
inv:set_stack("upgraded_item", 1, upgraded_item)
|
||||||
|
@ -107,14 +149,24 @@ minetest.register_node("mcl_smithing_table:table", {
|
||||||
|
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
|
||||||
inv:set_size("diamond_item", 1)
|
inv:set_size("upgrade_item", 1)
|
||||||
inv:set_size("netherite", 1)
|
inv:set_size("mineral", 1)
|
||||||
|
inv:set_size("template",1)
|
||||||
inv:set_size("upgraded_item", 1)
|
inv:set_size("upgraded_item", 1)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
if listname == "diamond_item" and mcl_smithing_table.upgrade_item(stack) or
|
if
|
||||||
listname == "netherite" and stack:get_name() == "mcl_nether:netherite_ingot" then
|
listname == "upgrade_item"
|
||||||
|
and string.find(stack:get_name(),"mcl_armor:") -- allow any armor piece to go in (in case the player wants to trim them)
|
||||||
|
and not mcl_armor.trims.blacklisted[stack:get_name()]
|
||||||
|
|
||||||
|
or listname == "mineral"
|
||||||
|
and mcl_smithing_table.is_smithing_mineral(stack:get_name())
|
||||||
|
|
||||||
|
or listname == "template"
|
||||||
|
and string.find(stack:get_name(),"mcl_armor")
|
||||||
|
then
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -137,8 +189,9 @@ minetest.register_node("mcl_smithing_table:table", {
|
||||||
end
|
end
|
||||||
|
|
||||||
if listname == "upgraded_item" then
|
if listname == "upgraded_item" then
|
||||||
take_item("diamond_item")
|
take_item("upgrade_item")
|
||||||
take_item("netherite")
|
take_item("mineral")
|
||||||
|
take_item("template")
|
||||||
|
|
||||||
-- ToDo: make epic sound
|
-- ToDo: make epic sound
|
||||||
minetest.sound_play("mcl_smithing_table_upgrade", { pos = pos, max_hear_distance = 16 })
|
minetest.sound_play("mcl_smithing_table_upgrade", { pos = pos, max_hear_distance = 16 })
|
||||||
|
@ -165,3 +218,8 @@ minetest.register_craft({
|
||||||
{ "group:wood", "group:wood", "" }
|
{ "group:wood", "group:wood", "" }
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- this is the exact same as mcl_smithing_table.upgrade_item_netherite , in case something relies on the old function
|
||||||
|
function mcl_smithing_table.upgrade_item(itemstack)
|
||||||
|
return mcl_smithing_table.upgrade_item_netherite(itemstack)
|
||||||
|
end
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
name = mcl_smithing_table
|
name = mcl_smithing_table
|
||||||
depends = mcl_colors, mcl_formspec, mcl_anvils
|
depends = mcl_colors, mcl_formspec, mcl_armor, mcl_anvils
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This API allows you to add more walls (like the cobblestone wall) to MineClone 2.
|
This API allows you to add more walls (like the cobblestone wall) to MineClone 2.
|
||||||
|
|
||||||
## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds, hardness, blast_resistance)`
|
## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)`
|
||||||
|
|
||||||
Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too.
|
Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too.
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@ If `craft_material` is not `nil` it also adds a crafting recipe of the following
|
||||||
* `inventory_image`: Inventory image (optional if `source` is set)
|
* `inventory_image`: Inventory image (optional if `source` is set)
|
||||||
* `groups`: Base group memberships (optional, default is `{pickaxey=1}`)
|
* `groups`: Base group memberships (optional, default is `{pickaxey=1}`)
|
||||||
* `sounds`: Sound table (optional, by default default uses stone sounds)
|
* `sounds`: Sound table (optional, by default default uses stone sounds)
|
||||||
* `hardness`: Hardness of node (optional, default matches `source` node or fallback value 2)
|
|
||||||
* `blast_resistance`: Blast resistance of node (optional, default matches `source` node or fallback value 6)
|
|
||||||
|
|
||||||
The following groups will automatically be added to the nodes (where applicable), you do not need to add them
|
The following groups will automatically be added to the nodes (where applicable), you do not need to add them
|
||||||
to the `groups` table:
|
to the `groups` table:
|
||||||
|
|
|
@ -97,10 +97,8 @@ local full_blocks = {
|
||||||
* inventory_image: Inventory image (optional)
|
* inventory_image: Inventory image (optional)
|
||||||
* groups: Base group memberships (optional, default is {pickaxey=1})
|
* groups: Base group memberships (optional, default is {pickaxey=1})
|
||||||
* sounds: Sound table (optional, default is stone)
|
* sounds: Sound table (optional, default is stone)
|
||||||
* hardness: Hardness of node (optional, default matches `source` node or fallback value 2)
|
|
||||||
* blast_resistance: Blast resistance of node (optional, default matches `source` node or fallback value 6)
|
|
||||||
]]
|
]]
|
||||||
function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds, hardness, blast_resistance)
|
function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds)
|
||||||
|
|
||||||
local base_groups = groups
|
local base_groups = groups
|
||||||
if not base_groups then
|
if not base_groups then
|
||||||
|
@ -114,31 +112,17 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
|
||||||
local main_node_groups = table.copy(base_groups)
|
local main_node_groups = table.copy(base_groups)
|
||||||
main_node_groups.deco_block = 1
|
main_node_groups.deco_block = 1
|
||||||
|
|
||||||
if source then
|
-- TODO: Stop hardcoding blast resistance
|
||||||
-- Default values from `source` node
|
|
||||||
if not hardness then
|
|
||||||
hardness = minetest.registered_nodes[source]._mcl_hardness
|
|
||||||
end
|
|
||||||
if not blast_resistance then
|
|
||||||
blast_resistance = minetest.registered_nodes[source]._mcl_blast_resistance
|
|
||||||
end
|
|
||||||
if not sounds then
|
if not sounds then
|
||||||
sounds = minetest.registered_nodes[source].sounds
|
sounds = mcl_sounds.node_sound_stone_defaults()
|
||||||
end
|
end
|
||||||
if not tiles then
|
|
||||||
|
if (not tiles) and source then
|
||||||
if minetest.registered_nodes[source] then
|
if minetest.registered_nodes[source] then
|
||||||
tiles = minetest.registered_nodes[source].tiles
|
tiles = minetest.registered_nodes[source].tiles
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
-- Fallback in case no `source` given
|
|
||||||
if not hardness then
|
|
||||||
hardness = 2
|
|
||||||
end
|
|
||||||
if not blast_resistance then
|
|
||||||
blast_resistance = 6
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for i = 0, 15 do
|
for i = 0, 15 do
|
||||||
local need = {}
|
local need = {}
|
||||||
|
@ -185,8 +169,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
|
||||||
fixed = take
|
fixed = take
|
||||||
},
|
},
|
||||||
sounds = sounds,
|
sounds = sounds,
|
||||||
_mcl_blast_resistance = blast_resistance,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = hardness,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Add entry alias for the Help
|
-- Add entry alias for the Help
|
||||||
|
@ -213,8 +197,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
|
||||||
fixed = {pillar, full_blocks[1]}
|
fixed = {pillar, full_blocks[1]}
|
||||||
},
|
},
|
||||||
sounds = sounds,
|
sounds = sounds,
|
||||||
_mcl_blast_resistance = blast_resistance,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = hardness,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
-- Add entry alias for the Help
|
-- Add entry alias for the Help
|
||||||
if minetest.get_modpath("doc") then
|
if minetest.get_modpath("doc") then
|
||||||
|
@ -239,8 +223,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
|
||||||
fixed = {pillar, full_blocks[2]}
|
fixed = {pillar, full_blocks[2]}
|
||||||
},
|
},
|
||||||
sounds = sounds,
|
sounds = sounds,
|
||||||
_mcl_blast_resistance = blast_resistance,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = hardness,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
-- Add entry alias for the Help
|
-- Add entry alias for the Help
|
||||||
if minetest.get_modpath("doc") then
|
if minetest.get_modpath("doc") then
|
||||||
|
@ -271,8 +255,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
|
||||||
collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2},
|
collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2},
|
||||||
on_construct = update_wall,
|
on_construct = update_wall,
|
||||||
sounds = sounds,
|
sounds = sounds,
|
||||||
_mcl_blast_resistance = blast_resistance,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = hardness,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
if source then
|
if source then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|
|
@ -188,6 +188,7 @@ mcl_structures.register_structure("nether_bulwark",{
|
||||||
stacks_max = 1,
|
stacks_max = 1,
|
||||||
items = {
|
items = {
|
||||||
{ itemstring = "mcl_compass:lodestone" },
|
{ itemstring = "mcl_compass:lodestone" },
|
||||||
|
{ itemstring = "mcl_armor:rib" },
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
|
|
|
@ -69,6 +69,7 @@ mcl_structures.register_structure("desert_temple",{
|
||||||
{ itemstring = "mcl_mobitems:diamond_horse_armor", weight = 5, },
|
{ itemstring = "mcl_mobitems:diamond_horse_armor", weight = 5, },
|
||||||
{ itemstring = "mcl_core:diamond", weight = 5, amount_min = 1, amount_max = 3 },
|
{ itemstring = "mcl_core:diamond", weight = 5, amount_min = 1, amount_max = 3 },
|
||||||
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
|
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
|
||||||
|
{ itemstring = "mcl_armor:dune", weight = 20, amount_min = 2, amount_max = 2},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,6 +58,7 @@ mcl_structures.register_structure("end_shipwreck",{
|
||||||
{ itemstring = "mcl_core:diamond", weight = 3, amount_min = 2, amount_max = 7 },
|
{ itemstring = "mcl_core:diamond", weight = 3, amount_min = 2, amount_max = 7 },
|
||||||
{ itemstring = "mcl_mobitems:saddle", weight = 3, },
|
{ itemstring = "mcl_mobitems:saddle", weight = 3, },
|
||||||
{ itemstring = "mcl_core:emerald", weight = 2, amount_min = 1, amount_max = 3 },
|
{ itemstring = "mcl_core:emerald", weight = 2, amount_min = 1, amount_max = 3 },
|
||||||
|
{ itemstring = "mcl_armor:spire", amount_min = 1, amount_max = 1 },
|
||||||
{ itemstring = "mcl_books:book", weight = 1, func = function(stack, pr)
|
{ itemstring = "mcl_books:book", weight = 1, func = function(stack, pr)
|
||||||
mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr)
|
mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr)
|
||||||
end },
|
end },
|
||||||
|
|
|
@ -38,6 +38,7 @@ mcl_structures.register_structure("jungle_temple",{
|
||||||
{ itemstring = "mcl_mobitems:gold_horse_armor", weight = 1, },
|
{ itemstring = "mcl_mobitems:gold_horse_armor", weight = 1, },
|
||||||
{ itemstring = "mcl_mobitems:diamond_horse_armor", weight = 1, },
|
{ itemstring = "mcl_mobitems:diamond_horse_armor", weight = 1, },
|
||||||
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
|
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
|
||||||
|
{ itemstring = "mcl_armor:wild", amount_min = 1, amount_max = 1, },
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ mcl_structures.register_structure("pillager_outpost",{
|
||||||
{ itemstring = "mcl_books:book", weight = 1, func = function(stack, pr)
|
{ itemstring = "mcl_books:book", weight = 1, func = function(stack, pr)
|
||||||
mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr)
|
mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr)
|
||||||
end },
|
end },
|
||||||
|
{ itemstring = "mcl_armor:sentry"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,7 +166,7 @@ mcl_structures.register_structure("shipwreck",{
|
||||||
{ itemstring = "mcl_clock:clock", weight = 1, amount_min = 1, amount_max = 1 },
|
{ itemstring = "mcl_clock:clock", weight = 1, amount_min = 1, amount_max = 1 },
|
||||||
{ itemstring = "mcl_compass:compass", weight = 1, amount_min = 1, amount_max = 1 },
|
{ itemstring = "mcl_compass:compass", weight = 1, amount_min = 1, amount_max = 1 },
|
||||||
{ itemstring = "mcl_maps:empty_map", weight = 1, amount_min = 1, amount_max = 1 },
|
{ itemstring = "mcl_maps:empty_map", weight = 1, amount_min = 1, amount_max = 1 },
|
||||||
|
{ itemstring = "mcl_armor:coast", weight = 20, amount_min = 2, amount_max = 2},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ mcl_structures.register_structure("woodland_cabin",{
|
||||||
{ itemstring = "mcl_armor:chestplate_chain", weight = 1, },
|
{ itemstring = "mcl_armor:chestplate_chain", weight = 1, },
|
||||||
{ itemstring = "mcl_armor:chestplate_diamond", weight = 1, },
|
{ itemstring = "mcl_armor:chestplate_diamond", weight = 1, },
|
||||||
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
|
{ itemstring = "mcl_core:apple_gold_enchanted", weight = 2, },
|
||||||
|
{ itemstring = "mcl_armor:vex", amount_max = 1, },
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
This mod allows advanced skin customization.
|
This mod allows advanced skin customization.
|
||||||
Use the /skin command to open the skin configuration screen.
|
Use the /skin command to open the skin configuration screen.
|
||||||
|
|
||||||
To include custom skins in MineClone2, please download [mcl_custom_skins](https://git.minetest.land/mineclone2/mcl_custom_skins)
|
To include custom skins in MineClone2, please download the [mcl_custom_skins](https://codeberg.org/MineClone2/mcl_custom_skins) mod.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Code under MIT license
|
Code under MIT license
|
||||||
|
|
|
@ -76,6 +76,7 @@ local node_search_list =
|
||||||
|
|
||||||
local success = storage:get_int("mcl_spawn_success")==1
|
local success = storage:get_int("mcl_spawn_success")==1
|
||||||
local searched = (storage:get_int("mcl_spawn_searched")==1) or mg_name == "v6" or mg_name == "singlenode" or minetest.settings:get("static_spawnpoint")
|
local searched = (storage:get_int("mcl_spawn_searched")==1) or mg_name == "v6" or mg_name == "singlenode" or minetest.settings:get("static_spawnpoint")
|
||||||
|
local return_spawn = minetest.settings:get_bool("mcl_return_spawn", true)
|
||||||
local wsp = minetest.string_to_pos(storage:get_string("mcl_spawn_world_spawn_point")) or {} -- world spawn position
|
local wsp = minetest.string_to_pos(storage:get_string("mcl_spawn_world_spawn_point")) or {} -- world spawn position
|
||||||
local check = storage:get_int("mcl_spawn_check") or 0
|
local check = storage:get_int("mcl_spawn_check") or 0
|
||||||
local cp = minetest.string_to_pos(storage:get_string("mcl_spawn_cp")) or {x=start_pos.x, y=start_pos.y, z=start_pos.z}
|
local cp = minetest.string_to_pos(storage:get_string("mcl_spawn_cp")) or {x=start_pos.x, y=start_pos.y, z=start_pos.z}
|
||||||
|
@ -498,7 +499,7 @@ function mcl_spawn.get_player_spawn_pos(player)
|
||||||
|
|
||||||
if(string.match(checknode.name, "mcl_beds:respawn_anchor_charged_")) then
|
if(string.match(checknode.name, "mcl_beds:respawn_anchor_charged_")) then
|
||||||
local charge_level = tonumber(string.sub(checknode.name, -1))
|
local charge_level = tonumber(string.sub(checknode.name, -1))
|
||||||
if not charge_level then
|
if not charge_level and return_spawn then
|
||||||
minetest.log("warning","could not get level of players respawn anchor, sending him back to spawn!")
|
minetest.log("warning","could not get level of players respawn anchor, sending him back to spawn!")
|
||||||
player:get_meta():set_string("mcl_beds:spawn", "")
|
player:get_meta():set_string("mcl_beds:spawn", "")
|
||||||
minetest.chat_send_player(player:get_player_name(), S("Couldn't get level of your respawn anchor!"))
|
minetest.chat_send_player(player:get_player_name(), S("Couldn't get level of your respawn anchor!"))
|
||||||
|
@ -510,10 +511,12 @@ function mcl_spawn.get_player_spawn_pos(player)
|
||||||
minetest.set_node(checkpos, {name="mcl_beds:respawn_anchor"})
|
minetest.set_node(checkpos, {name="mcl_beds:respawn_anchor"})
|
||||||
return checkpos, false
|
return checkpos, false
|
||||||
end
|
end
|
||||||
else
|
elseif return_spawn then
|
||||||
player:get_meta():set_string("mcl_beds:spawn", "")
|
player:get_meta():set_string("mcl_beds:spawn", "")
|
||||||
minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked, and you had no charged respawn anchor!"))
|
minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked, and you had no charged respawn anchor!"))
|
||||||
return mcl_spawn.get_world_spawn_pos(), false
|
return mcl_spawn.get_world_spawn_pos(), false
|
||||||
|
else
|
||||||
|
return checkpos, false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -51,6 +51,9 @@ mcl_disabled_events (Disabled events) string
|
||||||
# This setting is only read at startup.
|
# This setting is only read at startup.
|
||||||
enable_bed_respawn (Respawn at bed) bool true
|
enable_bed_respawn (Respawn at bed) bool true
|
||||||
|
|
||||||
|
#If enabled, players respawn at world spawn if bed is destroyed or respawn anchor has no charge.
|
||||||
|
mcl_return_spawn (Return to spawn if no bed) bool true
|
||||||
|
|
||||||
# How many players have to sleep to skip the night, in percent.
|
# How many players have to sleep to skip the night, in percent.
|
||||||
# Setting to 0 will mean 1 player is always enough to skip the night. Setting above 100 will prevent skipping the night.
|
# Setting to 0 will mean 1 player is always enough to skip the night. Setting above 100 will prevent skipping the night.
|
||||||
# 100 by default.
|
# 100 by default.
|
||||||
|
|
After Width: | Height: | Size: 126 B |
After Width: | Height: | Size: 131 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 175 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 256 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 382 B |
After Width: | Height: | Size: 305 B |
After Width: | Height: | Size: 341 B |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 144 B |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 113 B |
After Width: | Height: | Size: 153 B |
After Width: | Height: | Size: 244 B |
After Width: | Height: | Size: 256 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 353 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 294 B |
After Width: | Height: | Size: 250 B |
After Width: | Height: | Size: 143 B |
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 165 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 202 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 204 B |
After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 162 B |
After Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 300 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 141 B |
After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 167 B |
After Width: | Height: | Size: 278 B |
After Width: | Height: | Size: 169 B |
After Width: | Height: | Size: 298 B |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 316 B |