forked from VoxeLibre/VoxeLibre
Compare commits
19 Commits
71dba005e8
...
7abffa8500
Author | SHA1 | Date |
---|---|---|
Tuxilio | 7abffa8500 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | a620d24ec8 | |
ancientmarinerdev | 178b24886f | |
ancientmarinerdev | 8333281b4f | |
Nicu | 6d3e55ce12 | |
ancientmarinerdev | 2c2f5595f3 | |
ancientmarinerdev | c51442704c | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 2bd6678b08 | |
Codiac | e0c44244f9 | |
Codiac | 5b7352a23a | |
Michieal | e8c658658d | |
Michieal | e9d994b74d | |
Michieal | eafe6627d8 | |
Blockhead | 882c3ef339 | |
Michieal | b2ebcf5d4f | |
Michieal | f57220f784 | |
Eliy21 | 2d9bffaa43 | |
Eliy21 | eb658a4996 | |
Julien Palard | 878480d010 |
|
@ -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.
|
||||
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_radius = 3.5,
|
||||
explosion_damage_radius = 3.5,
|
||||
explosiontimer_reset_radius = 6,
|
||||
explosiontimer_reset_radius = 3,
|
||||
reach = 3,
|
||||
explosion_timer = 1.5,
|
||||
allow_fuse_reset = true,
|
||||
|
@ -172,7 +172,7 @@ mcl_mobs.register_mob("mobs_mc:creeper_charged", {
|
|||
explosion_strength = 6,
|
||||
explosion_radius = 8,
|
||||
explosion_damage_radius = 8,
|
||||
explosiontimer_reset_radius = 6,
|
||||
explosiontimer_reset_radius = 3,
|
||||
reach = 3,
|
||||
explosion_timer = 1.5,
|
||||
allow_fuse_reset = true,
|
||||
|
|
|
@ -3,7 +3,7 @@ mcl_bamboo
|
|||
|
||||
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 images / textures: CC-BY-SA except where noted.
|
||||
|
|
|
@ -86,6 +86,11 @@ local bamboo_def = {
|
|||
on_rotate = on_rotate,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
||||
if not pointed_thing then
|
||||
return itemstack
|
||||
end
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
end
|
||||
|
@ -276,6 +281,13 @@ local bamboo_block_def = {
|
|||
_mcl_hardness = 2,
|
||||
_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)
|
||||
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
|
||||
|
||||
|
|
|
@ -18,13 +18,21 @@ local function on_place_fish(itemstack, placer, pointed_thing)
|
|||
return new_stack
|
||||
end
|
||||
|
||||
local pos = pointed_thing.above or pointed_thing.under
|
||||
if not pos then return end
|
||||
local n = minetest.get_node_or_nil(pos)
|
||||
if n.name and minetest.registered_nodes[n.name].buildable_to or n.name == "mcl_portals:portal" then
|
||||
local fish = itemstack:get_name():gsub(fishbucket_prefix,"")
|
||||
if pointed_thing.type ~= "node" then return end
|
||||
|
||||
local pos = pointed_thing.above
|
||||
local n = minetest.get_node(pointed_thing.above)
|
||||
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
|
||||
local o = minetest.add_entity(pos, "mobs_mc:" .. fish)
|
||||
if o and o:get_pos() then
|
||||
local props = itemstack:get_meta():get_string("properties")
|
||||
if props ~= "" then
|
||||
o:set_properties(minetest.deserialize(props))
|
||||
|
@ -60,6 +68,7 @@ for techname, fishname in pairs(fish_names) do
|
|||
stack_max = 1,
|
||||
groups = {bucket = 1, fish_bucket = 1},
|
||||
liquids_pointable = false,
|
||||
_mcl_buckets_fish = techname,
|
||||
on_place = on_place_fish,
|
||||
on_secondary_use = on_place_fish,
|
||||
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
||||
|
|
|
@ -9,9 +9,10 @@ Authors:
|
|||
Gerold55 - Code Start + Models?
|
||||
PrairieWind - Improved and Cleaned Up Code, and added the soul campfire and crafting recipes.
|
||||
cora - Added burning damage.
|
||||
DinoNuggies4665 - Cooking logic implemented
|
||||
thunder1035 - Redesigned model and texture tweaks
|
||||
DinoNuggies4665 - Cooking logic implemented.
|
||||
thunder1035 - Redesigned model and texture tweaks.
|
||||
AncientMariner - Changed smoke to particle spawner and tweaked particle configuration.
|
||||
Michieal - Fixed misc. errors.
|
||||
|
||||
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
|
||||
mcl_campfires.take_item(pos, node, player, itemstack)
|
||||
else
|
||||
if not pointed_thing then
|
||||
return itemstack
|
||||
end
|
||||
minetest.item_place_node(itemstack, player, pointed_thing)
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -1581,7 +1581,7 @@ end
|
|||
-- MUST NOT be called if there is a snow cover node above pos.
|
||||
function mcl_core.clear_snow_dirt(pos, node)
|
||||
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})
|
||||
end
|
||||
end
|
||||
|
@ -1602,7 +1602,7 @@ function mcl_core.on_snowable_construct(pos)
|
|||
-- Make snowed if needed
|
||||
if minetest.get_item_group(anode.name, "snow_cover") == 1 then
|
||||
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})
|
||||
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 node = minetest.get_node(npos)
|
||||
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})
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1038,7 +1038,7 @@ for i=1,8 do
|
|||
|
||||
-- Get position where snow would be placed
|
||||
local target
|
||||
if minetest.registered_nodes[unode.name].buildable_to then
|
||||
if def and def.buildable_to then
|
||||
target = under
|
||||
else
|
||||
target = above
|
||||
|
|
|
@ -155,7 +155,8 @@ minetest.register_node("mcl_end:chorus_flower", {
|
|||
1) On top of end stone or chorus plant
|
||||
2) On top of air and horizontally adjacent to exactly 1 chorus plant ]]
|
||||
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
|
||||
else
|
||||
pos = pointed_thing.above
|
||||
|
@ -283,7 +284,8 @@ minetest.register_node("mcl_end:chorus_plant", {
|
|||
condition is met:
|
||||
- placed on end stone or any chorus node ]]
|
||||
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
|
||||
node_check = node_above
|
||||
else
|
||||
|
|
|
@ -301,7 +301,8 @@ minetest.register_node("mcl_mobspawners:spawner", {
|
|||
local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing)
|
||||
if success then
|
||||
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
|
||||
else
|
||||
placepos = pointed_thing.above
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
This mod allows advanced skin customization.
|
||||
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
|
||||
Code under MIT license
|
||||
|
|
|
@ -76,6 +76,7 @@ local node_search_list =
|
|||
|
||||
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 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 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}
|
||||
|
@ -498,7 +499,7 @@ function mcl_spawn.get_player_spawn_pos(player)
|
|||
|
||||
if(string.match(checknode.name, "mcl_beds:respawn_anchor_charged_")) then
|
||||
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!")
|
||||
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!"))
|
||||
|
@ -510,10 +511,12 @@ function mcl_spawn.get_player_spawn_pos(player)
|
|||
minetest.set_node(checkpos, {name="mcl_beds:respawn_anchor"})
|
||||
return checkpos, false
|
||||
end
|
||||
else
|
||||
elseif return_spawn then
|
||||
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!"))
|
||||
return mcl_spawn.get_world_spawn_pos(), false
|
||||
else
|
||||
return checkpos, false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -51,6 +51,9 @@ mcl_disabled_events (Disabled events) string
|
|||
# This setting is only read at startup.
|
||||
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.
|
||||
# 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.
|
||||
|
|
Loading…
Reference in New Issue