1
0
Fork 0

Compare commits

...

64 Commits

Author SHA1 Message Date
the-real-herowl 6dad5afec5 Merge pull request 'Correct the names of pumpkins and carved pumpkins. Slightly update their descriptions.' (#3828) from fix_pumpkin_names into master
Reviewed-on: VoxeLibre/VoxeLibre#3828
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-08-30 18:27:16 +02:00
the-real-herowl 508811d3b3 Fixed Polish and German translations 2024-08-30 18:26:18 +02:00
SmokeyDope 411cb2b9b9 Correct the names of pumpins and carved pumpkins. Slightly update their descriptions. 2024-08-30 18:26:18 +02:00
kno10 8fd736e0fd Improve cactus drops and spawning (#4581)
- breaking cactus will drop randomly in x=-0.75..+0.75, z=-0.75..+0.75
- breaking cactus will have an initial velocity in this direction
- if a larger cactus break, they break into the same direction
- cactus growth rate reduced 4x, to debuff farm efficiency (will need a larger rebalancing)
- cactus only spawns when there is air surrounding it and above, so it does not immediately break
- slightly increase the frequency of cactus to counter this

The first changes make cactus farms possible.

Reviewed-on: VoxeLibre/VoxeLibre#4581
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-08-30 18:22:05 +02:00
kno10 d2b96b6142 Queue is not used anywhere (#4608)
Dead code.

Reviewed-on: VoxeLibre/VoxeLibre#4608
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2024-08-30 18:20:38 +02:00
the-real-herowl a3cc105fa1 Merge pull request 'Fix Cauldrons' (#4615) from fix-cauldrons into master
Reviewed-on: VoxeLibre/VoxeLibre#4615
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-08-30 16:12:55 +02:00
teknomunk 5b039f1855 Fix getting water back into bottle 2024-08-28 06:30:12 -05:00
teknomunk 7e832dc641 Fix adding water bottles and emptying full cauldrons 2024-08-28 06:17:53 -05:00
the-real-herowl 91cecca135 Merge pull request 'Fix for fortune drops in mcl_farming from MCLA' (#4594) from farming_fortune_fix into master
Reviewed-on: VoxeLibre/VoxeLibre#4594
Reviewed-by: teknomunk <teknomunk@protonmail.com>
2024-08-27 16:28:39 +02:00
JoseDouglas26 95653a0676 ipairs to pairs 2024-08-27 13:11:08 +02:00
JoseDouglas26 b141f7c0a4 new special field to solve drop bug 2024-08-27 13:11:08 +02:00
the-real-herowl cf9bbb0551 Merge pull request 'mcl_weather sky color refactor' (#4338) from teknomunk/MineClone2:skycolor-refactor into master
Reviewed-on: VoxeLibre/VoxeLibre#4338
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-08-19 03:34:59 +02:00
teknomunk aea9e6d182 Update comment according to VoxeLibre/VoxeLibre#4338 (comment) 2024-08-19 03:02:02 +02:00
teknomunk 09307292bc Make sure overworld always gets a sky update regardless of weather, add assert to enforce sky color gets set every update 2024-08-19 03:02:02 +02:00
teknomunk e407e2e290 Force has_mcl_potions to boolean 2024-08-19 03:02:02 +02:00
teknomunk 87a48270f5 Add mcl_util.to_bool 2024-08-19 03:02:02 +02:00
teknomunk 21a88be2b2 Remove boolean coersion 2024-08-19 03:02:02 +02:00
teknomunk 37ff699a23 Add line break 2024-08-19 03:02:02 +02:00
teknomunk 18266137b2 Make sure clouds don't disappear when entering water 2024-08-19 03:02:02 +02:00
teknomunk 3667feddd3 Address review comments 2024-08-19 03:02:02 +02:00
teknomunk dc074ff555 Remove debug logging 2024-08-19 03:02:02 +02:00
teknomunk 0e1a2cbc1e Correct conditions for water-air transition forced skycolor update 2024-08-19 03:02:02 +02:00
teknomunk cb097d9bcd Add minimum time between skycolor updates (default is 250ms, tracked per player) 2024-08-19 03:02:02 +02:00
Wbjitscool cd213b75f7 Update mods/ENVIRONMENT/mcl_weather/skycolor.lua
adds in sunray shader support for Minetest version 5.9.0
2024-08-19 03:02:02 +02:00
teknomunk ef58a9809a Remove empty else block, fix up mg_name and add mapgen check to water.lua 2024-08-19 03:02:02 +02:00
teknomunk 3b01fe20ba Remove debug commented out logging, remove extra zero in 24-hour time 2024-08-19 03:02:02 +02:00
teknomunk d34c804ebf Remove local mod = mcl_weather and replace accesses to variables thru mcl_weather with local variable equivalents 2024-08-19 03:02:02 +02:00
teknomunk 03faa7764d Fix variable name (caused crash) 2024-08-19 03:02:02 +02:00
teknomunk 207c86b813 Fix crash and rearrange code 2024-08-19 03:02:02 +02:00
teknomunk cf4b1dbd1d Remove END function comment 2024-08-19 03:02:02 +02:00
teknomunk 7811e23611 Convert to use mcl_playerinfo 2024-08-19 03:02:02 +02:00
teknomunk 24ff7347b2 Further cleanup 2024-08-19 03:02:02 +02:00
teknomunk 820848fb2e Address review comments 2024-08-19 03:02:02 +02:00
teknomunk f2a638f8e9 Fix random crash in darkness effect in mcl_potions, finish refactoring of mcl_weather.skycolor that also makes darkness effect more reliable 2024-08-19 03:02:02 +02:00
teknomunk 161dd7d379 Start refactor 2024-08-19 03:02:02 +02:00
the-real-herowl d0e8b4141d Merge pull request 'Merge mcla kelp growing' (#4474) from WillConker/VoxeLibre:kelp_make_source into master
Reviewed-on: VoxeLibre/VoxeLibre#4474
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-08-18 21:47:46 +02:00
cora 15fa3ff775 Fix crash when growing kelp into water logged mangrove roots 2024-08-18 19:21:19 +02:00
WillConker 11168f226a Revert "WaterLoggedRootsKelpFix (#3994)"
This reverts commit a425d359f5.
2024-08-18 19:21:19 +02:00
teknomunk 2ad59c6df9 Stop lightning striking positions that don't have rain (#4386)
Stops lighting from being able to strike in locations where rain doesn't occur, but allows lightning in adjacent areas where is allowed.

Reviewed-on: VoxeLibre/VoxeLibre#4386
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2024-08-18 12:05:35 +02:00
the-real-herowl 948da34755 Readded missing stairs and slabs (#4601)
Also *probably* fixed their blast res and hardness

Reviewed-on: VoxeLibre/VoxeLibre#4601
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
2024-08-18 08:45:49 +02:00
WillConker 406e0e8169 Made soul speed and depth strider speed boosts additive instead of exclusive (#4422)
Reviewed-on: VoxeLibre/VoxeLibre#4422
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: WillConker <waj01@joanes.net>
Co-committed-by: WillConker <waj01@joanes.net>
2024-08-18 06:25:04 +02:00
the-real-herowl 09aba760cf Merge pull request 'Minor fixes on potion behavior on damage disabled servers (closes 4586)' (#4599) from goodspeed/VoxeLibre:potion-hud into master
Reviewed-on: VoxeLibre/VoxeLibre#4599
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-08-18 05:49:44 +02:00
William Goodspeed a6136ad158 Removing absorption bar on damage disabled servers
The absorption effect won't work on damage disabled servers and the
health bar and hunger bar is also hidden leaving the absorption bar
alone which makes it look not good. So not initializing it on those
servers might be a good idea.
2024-08-18 05:48:37 +02:00
William Goodspeed 77bcf6cff3 Allowing `hb.change_bar' called with hudbar uninitialized
Calling `hb.change_bar' with hunger bar on damage disabled server
will crash the server. To not overload other functions to check
`enable_damage' over and over, simply make `hb.change_bar' able to be
called with uninitialized identifiers. #4586
2024-08-18 05:48:37 +02:00
WillConker 293eb6d021 Stop tnt colliding with entities (#4476)
Reviewed-on: VoxeLibre/VoxeLibre#4476
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: WillConker <waj01@joanes.net>
Co-committed-by: WillConker <waj01@joanes.net>
2024-08-18 05:40:25 +02:00
the-real-herowl 1c5f7d05fe Merge pull request 'More hardness and blast resistance fixes' (#3952) from hardness_blast_res_fixes into master
Reviewed-on: VoxeLibre/VoxeLibre#3952
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2024-08-18 04:52:39 +02:00
seventeenthShulker f8fcd9954f Add back *some* changes that I reverted; and fix typo "Cherry Gate" 2024-08-18 04:47:19 +02:00
seventeenthShulker 8b9666137d All wood-type and nether-type fences now match material's blast resistance 2024-08-18 04:47:19 +02:00
seventeenthShulker b3087118fa Fix Gilded Blackstone blast res. (now 6) 2024-08-18 04:47:19 +02:00
seventeenthShulker b79a19f4d6 Add crimson/warped planks (_hyphae_wood) blast res
Relates to (#4414)
2024-08-18 04:47:19 +02:00
seventeenthShulker b0b5cc1265 Remaining stairs/slabs inherit properties instead of hardcoding
- Fix smooth quartz attributes
- Alternative recipes for (red) sandstone, quartz, purpur slabs/stairs have been added explicitly
2024-08-18 04:47:19 +02:00
seventeenthShulker b237c4642d Revert "Forgot about blackstone"
I left it in from another branch, didn't want to force push.

This reverts commit 58d2f59192073acf9f55406358bf48244e008b9b.

Revert "Walls use `source` parameter for default hardness and blast resistance"
I left it in from another branch, didn't want to force push.

This reverts commit e8944cc145dc59db53a9368d8ae269edf366e742.

Revert "Fix prismarine bricks and dark variant blast res."
I left it in from another branch, didn't want to force push.

This reverts commit 6125d625bc6ce15644cf8b579599f75da5bffd07.

Revert "Un-hardcode blast resistance, hardness for walls,"
I left it in from another branch, didn't want to force push.

This reverts commit 26e873703151bc4bfaf7588ad1e3afa731a05fbd.

Revert "All wood-type and nether-type fences now match material's blast resistance"
I left it in from another branch, didn't want to force push.

This reverts commit a1e20f29162462120fb1c046c2d34f8fcebfb413.
2024-08-18 04:47:19 +02:00
seventeenthShulker 49b2491b70 Fix the other bed node 2024-08-18 04:47:19 +02:00
seventeenthShulker 0408f9c3d8 Update hardness and blast res for value not matching the wiki
- Notably, smooth sandstone (and red) is much more durable than other sandstone variants
- Ender chest isn't actually more explosion resistant than obsidian, hmm
2024-08-18 04:47:12 +02:00
seventeenthShulker cbafdfa585 Make monster eggs' hardness consistent with MC
Change blast resistance to 0.75, add an optional hardness override parameter, because cobble is unique here

(Still instant-minable, this is a separate issue)
2024-08-18 04:46:19 +02:00
seventeenthShulker 2312989503 Fix several hardness and blast resistance values 2024-08-18 04:46:19 +02:00
seventeenthShulker 1471ad7181 Un-hardcode most slabs and stairs 2024-08-18 04:46:19 +02:00
seventeenthShulker 38d7609173 Forgot about blackstone 2024-08-18 04:46:19 +02:00
seventeenthShulker 5bce56cdd6 Walls use `source` parameter for default hardness and blast resistance
If no `source` given, fallbacks are 2 and 6 respectively
2024-08-18 04:46:19 +02:00
seventeenthShulker 7a05c32198 Fix prismarine bricks and dark variant blast res.
Should be 6 like regular prismarine
2024-08-18 04:46:19 +02:00
seventeenthShulker ff386e395f Un-hardcode blast resistance, hardness for walls,
now only based on their material
2024-08-18 04:46:19 +02:00
the-real-herowl a687ef19f6 Merge pull request 'Solving ladder placement issues' (#4596) from goodspeed/VoxeLibre:ladder-logic into master
Reviewed-on: VoxeLibre/VoxeLibre#4596
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2024-08-18 01:40:42 +02:00
William Goodspeed c03f9abd18 Fix the placement check of ladder
The old code takes the first return val of `minetest.item_place_node'
which is `itemstack'. Therefore, the variable `success' in the old code
is always true. The new code takes the second val which will be nil if
an invalid node placement occured.

This check is necessary since the ladder may be placed in the front of
pointed block while there is a node with hole (slabs, fences etc.) at
the same place resulting an invalid placement and sound played when
it shouldn't be played.
2024-08-17 18:38:01 +02:00
William Goodspeed 9657c9d8bb Make ladder placable on any solid block 2024-08-17 18:38:01 +02:00
63 changed files with 877 additions and 653 deletions

View File

@ -1103,3 +1103,8 @@ function mcl_util.is_it_christmas()
return false
end
end
function mcl_util.to_bool(val)
if not val then return false end
return true
end

View File

@ -321,6 +321,7 @@ function minetest.handle_node_drops(pos, drops, digger)
if tool and nodedef._mcl_fortune_drop and enchantments.fortune then
local fortune_level = enchantments.fortune
local fortune_drop = nodedef._mcl_fortune_drop
local simple_drop = nodedef._mcl_fortune_drop.drop_without_fortune
if fortune_drop.discrete_uniform_distribution then
local min_count = fortune_drop.min_count
local max_count = fortune_drop.max_count + fortune_level * (fortune_drop.factor or 1)
@ -336,6 +337,12 @@ function minetest.handle_node_drops(pos, drops, digger)
local drop = get_fortune_drops(fortune_drop, fortune_level)
drops = get_drops(drop, tool:get_name(), dug_node.param2, nodedef.paramtype2)
end
if simple_drop then
for _, item in pairs(simple_drop) do
table.insert(drops, item)
end
end
end
if digger and mcl_experience.throw_xp and not silk_touch_drop then

View File

@ -1,5 +1,5 @@
name = mcl_weather
author = xeranas
description = Weather and sky handling: Rain, snow, thunderstorm, End and Nether ambience
depends = mcl_init, mcl_worlds
depends = mcl_init, mcl_worlds, mcl_playerinfo, mcl_util
optional_depends = lightning

View File

@ -1,15 +1,19 @@
local mods_loaded = false
-- Constants
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local NIGHT_VISION_RATIO = 0.45
local MINIMUM_LIGHT_LEVEL = 0.2
-- Settings
local minimum_update_interval = { 250e3 }
local water_color = "#3F76E4"
local mg_name = minetest.get_mapgen_setting("mg_name")
-- Module state
local mods_loaded = false
function mcl_weather.set_sky_box_clear(player, sky, fog)
local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end
-- Make sure the player's head isn't in water before changing the skybox
local node_head = mcl_playerinfo[player:get_player_name()].node_head
if minetest.get_item_group(node_head, "water") ~= 0 then return end
local sc = {
day_sky = "#7BA4FF",
day_horizon = "#C0D8FF",
@ -38,8 +42,10 @@ function mcl_weather.set_sky_box_clear(player, sky, fog)
end
function mcl_weather.set_sky_color(player, def)
local pos = player:get_pos()
if minetest.get_item_group(minetest.get_node(vector.offset(pos, 0, 1.5, 0)).name, "water") ~= 0 then return end
-- Make sure the player's head isn't in water before changing the skybox
local node_head = mcl_playerinfo[player:get_player_name()].node_head
if minetest.get_item_group(node_head, "water") ~= 0 then return end
player:set_sky({
type = def.type,
sky_color = def.sky_color,
@ -47,25 +53,7 @@ function mcl_weather.set_sky_color(player, def)
})
end
-- Function to work out light modifier at different times
-- Noon is brightest, midnight is darkest, 0600 and 18000 is in the middle of this
local function get_light_modifier(time)
-- 0.1 = 0.2
-- 0.4 = 0.8
-- 0.5 = 1
-- 0.6 = 0.8
-- 0.9 = 0.2
local light_multiplier = time * 2
if time > 0.5 then
light_multiplier = 2 * (1 - time)
else
light_multiplier = time / 0.5
end
return light_multiplier
end
mcl_weather.skycolor = {
local skycolor = {
-- Should be activated before do any effect.
active = true,
@ -85,319 +73,205 @@ mcl_weather.skycolor = {
-- number of colors while constructing gradient of user given colors
max_val = 1000,
NIGHT_VISION_RATIO = NIGHT_VISION_RATIO,
-- Table for tracking layer order
layer_names = {},
-- To layer to colors table
add_layer = function(layer_name, layer_color, instant_update)
mcl_weather.skycolor.colors[layer_name] = layer_color
table.insert(mcl_weather.skycolor.layer_names, layer_name)
mcl_weather.skycolor.force_update = true
end,
current_layer_name = function()
return mcl_weather.skycolor.layer_names[#mcl_weather.skycolor.layer_names]
end,
-- Retrieve layer from colors table
retrieve_layer = function()
local last_layer = mcl_weather.skycolor.current_layer_name()
return mcl_weather.skycolor.colors[last_layer]
end,
-- Remove layer from colors table
remove_layer = function(layer_name)
for k, name in pairs(mcl_weather.skycolor.layer_names) do
if name == layer_name then
table.remove(mcl_weather.skycolor.layer_names, k)
mcl_weather.skycolor.force_update = true
return
end
end
end,
-- Wrapper for updating day/night ratio that respects night vision
override_day_night_ratio = function(player, ratio)
local meta = player:get_meta()
local has_night_vision = meta:get_int("night_vision") == 1
local has_darkness = meta:get_int("darkness") == 1
local is_visited_shepherd = meta:get_int("mcl_shepherd:special") == 1
local arg
if has_darkness and not is_visited_shepherd then
if has_night_vision then arg = 0.1
else arg = 0 end
else
-- Apply night vision only for dark sky
local is_dark = minetest.get_timeofday() > 0.8 or minetest.get_timeofday() < 0.2 or mcl_weather.state ~= "none"
local pos = player:get_pos()
local dim = mcl_worlds.pos_to_dimension(pos)
if (has_night_vision or is_visited_shepherd) and is_dark and dim ~= "nether" and dim ~= "end" then
if ratio == nil then
arg = NIGHT_VISION_RATIO
else
arg = math.max(ratio, NIGHT_VISION_RATIO)
end
else
arg = ratio
end
end
player:override_day_night_ratio(arg)
end,
-- Update sky color. If players not specified update sky for all players.
update_sky_color = function(players)
-- Override day/night ratio as well
players = mcl_weather.skycolor.utils.get_players(players)
for _, player in ipairs(players) do
local pos = player:get_pos()
local dim = mcl_worlds.pos_to_dimension(pos)
local has_weather = (mcl_worlds.has_weather(pos) and (mcl_weather.state == "snow" or mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_snow(pos)) or ((mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_rain(pos))
local checkname = minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name
if minetest.get_item_group(checkname, "water") ~= 0 then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then water_color = biome._mcl_waterfogcolor end
if not biome then water_color = "#3F76E4" end
if checkname == "mclx_core:river_water_source" or checkname == "mclx_core:river_water_flowing" then water_color = "#0084FF" end
player:set_sky({ type = "regular",
sky_color = {
day_sky = water_color,
day_horizon = water_color,
dawn_sky = water_color,
dawn_horizon = water_color,
night_sky = water_color,
night_horizon = water_color,
indoors = water_color,
fog_sun_tint = water_color,
fog_moon_tint = water_color,
fog_tint_type = "custom"
},
clouds = false,
})
end
if dim == "overworld" then
local biomesky
local biomefog
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
biomesky = biome._mcl_skycolor
biomefog = biome._mcl_fogcolor
else
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
end
end
if (mcl_weather.state == "none") then
-- Clear weather
mcl_weather.set_sky_box_clear(player,biomesky,biomefog)
player:set_sun({visible = true, sunrise_visible = true})
player:set_moon({visible = true})
player:set_stars({visible = true})
mcl_weather.skycolor.override_day_night_ratio(player, nil)
elseif not has_weather then
local day_color = mcl_weather.skycolor.get_sky_layer_color(0.15)
local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.27)
local night_color = mcl_weather.skycolor.get_sky_layer_color(0.1)
mcl_weather.set_sky_color(player, {
type = "regular",
sky_color = {
day_sky = day_color,
day_horizon = day_color,
dawn_sky = dawn_color,
dawn_horizon = dawn_color,
night_sky = night_color,
night_horizon = night_color,
},
clouds = true,
})
player:set_sun({visible = false, sunrise_visible = false})
player:set_moon({visible = false})
player:set_stars({visible = false})
elseif has_weather then
-- Weather skies
local day_color = mcl_weather.skycolor.get_sky_layer_color(0.5)
local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.75)
local night_color = mcl_weather.skycolor.get_sky_layer_color(0)
mcl_weather.set_sky_color(player, {
type = "regular",
sky_color = {
day_sky = day_color,
day_horizon = day_color,
dawn_sky = dawn_color,
dawn_horizon = dawn_color,
night_sky = night_color,
night_horizon = night_color,
},
clouds = true,
})
player:set_sun({visible = false, sunrise_visible = false})
player:set_moon({visible = false})
player:set_stars({visible = false})
local light_factor = mcl_weather.get_current_light_factor()
if mcl_weather.skycolor.current_layer_name() == "lightning" then
mcl_weather.skycolor.override_day_night_ratio(player, 1)
elseif light_factor then
local time = minetest.get_timeofday()
local light_multiplier = get_light_modifier(time)
local new_light = math.max(light_factor * light_multiplier, MINIMUM_LIGHT_LEVEL)
mcl_weather.skycolor.override_day_night_ratio(player, new_light)
else
mcl_weather.skycolor.override_day_night_ratio(player, nil)
end
end
elseif dim == "end" then
local biomesky = "#000000"
local biomefog = "#A080A0"
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
biomesky = biome._mcl_skycolor
biomefog = biome._mcl_fogcolor -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is seemingly used for both sky and fog?
else
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
end
end
local t = "mcl_playerplus_end_sky.png"
player:set_sky({ type = "skybox",
base_color = biomesky,
textures = {t,t,t,t,t,t},
clouds = false,
})
player:set_sun({visible = false , sunrise_visible = false})
player:set_moon({visible = false})
player:set_stars({visible = false})
mcl_weather.skycolor.override_day_night_ratio(player, 0.5)
elseif dim == "nether" then
local biomesky = "#6EB1FF"
local biomefog = "#330808"
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then
--minetest.log("action", string.format("Biome found for number: %s in biome: %s", tostring(biome_index), biome_name))
biomesky = biome._mcl_skycolor -- The Nether biomes seemingly don't use the sky colour, despite having this value according to the wiki. The fog colour is used for both sky and fog.
biomefog = biome._mcl_fogcolor
else
--minetest.log("action", string.format("No biome for number: %s in biome: %s", tostring(biome_index), biome_name))
end
end
mcl_weather.set_sky_color(player, {
type = "regular",
sky_color = {
day_sky = biomefog,
day_horizon = biomefog,
dawn_sky = biomefog,
dawn_horizon = biomefog,
night_sky = biomefog,
night_horizon = biomefog,
indoors = biomefog,
fog_sun_tint = biomefog,
fog_moon_tint = biomefog,
fog_tint_type = "custom"
},
clouds = false,
})
player:set_sun({visible = false , sunrise_visible = false})
player:set_moon({visible = false})
player:set_stars({visible = false})
mcl_weather.skycolor.override_day_night_ratio(player, nil)
elseif dim == "void" then
player:set_sky({ type = "plain",
base_color = "#000000",
clouds = false,
})
player:set_sun({visible = false, sunrise_visible = false})
player:set_moon({visible = false})
player:set_stars({visible = false})
end
end
end,
-- Returns current layer color in {r, g, b} format
get_sky_layer_color = function(timeofday)
if #mcl_weather.skycolor.layer_names == 0 then
return nil
end
-- min timeofday value 0; max timeofday value 1. So sky color gradient range will be between 0 and 1 * mcl_weather.skycolor.max_val.
local rounded_time = math.floor(timeofday * mcl_weather.skycolor.max_val)
local color = mcl_weather.skycolor.utils.convert_to_rgb(mcl_weather.skycolor.min_val, mcl_weather.skycolor.max_val, rounded_time, mcl_weather.skycolor.retrieve_layer())
return color
end,
utils = {
convert_to_rgb = function(minval, maxval, current_val, colors)
local max_index = #colors - 1
local val = (current_val-minval) / (maxval-minval) * max_index + 1.0
local index1 = math.floor(val)
local index2 = math.min(math.floor(val)+1, max_index + 1)
local f = val - index1
local c1 = colors[index1]
local c2 = colors[index2]
return {r=math.floor(c1.r + f*(c2.r - c1.r)), g=math.floor(c1.g + f*(c2.g-c1.g)), b=math.floor(c1.b + f*(c2.b - c1.b))}
end,
-- Simply getter. Ether returns user given players list or get all connected players if none provided
get_players = function(players)
if players == nil or #players == 0 then
if mods_loaded then
players = minetest.get_connected_players()
elseif players == nil then
players = {}
end
end
return players
end,
-- Returns first player sky color. I assume that all players are in same color layout.
get_current_bg_color = function()
local players = mcl_weather.skycolor.utils.get_players(nil)
if players[1] then
return players[1]:get_sky(true).sky_color
end
return nil
end
},
utils = {},
}
mcl_weather.skycolor = skycolor
local skycolor_utils = skycolor.utils
-- Add layer to colors table
function skycolor.add_layer(layer_name, layer_color, instant_update)
skycolor.colors[layer_name] = layer_color
table.insert(skycolor.layer_names, layer_name)
skycolor.force_update = true
end
function skycolor.current_layer_name()
return skycolor.layer_names[#skycolor.layer_names]
end
-- Retrieve layer from colors table
function skycolor.retrieve_layer()
local last_layer = skycolor.current_layer_name()
return skycolor.colors[last_layer]
end
-- Remove layer from colors table
function skycolor.remove_layer(layer_name)
for k, name in pairs(skycolor.layer_names) do
if name == layer_name then
table.remove(skycolor.layer_names, k)
skycolor.force_update = true
return
end
end
end
-- Wrapper for updating day/night ratio that respects night vision
function skycolor.override_day_night_ratio(player, ratio)
player._skycolor_day_night_ratio = ratio
skycolor.update_player_sky_color(player)
player._skycolor_day_night_ratio = nil
end
local skycolor_filters = {}
skycolor.filters = skycolor_filters
dofile(modpath.."/skycolor/water.lua")
dofile(modpath.."/skycolor/dimensions.lua")
dofile(modpath.."/skycolor/effects.lua")
local function get_skycolor_info(player)
local player_name = player:get_player_name()
local info = mcl_playerinfo[player_name] or {}
local skycolor_data = info.skycolor
if not skycolor_data then
skycolor_data = {}
info.skycolor = skycolor_data
end
return skycolor_data
end
local water_sky = skycolor.water_sky
function skycolor.update_player_sky_color(player)
-- Don't update more than once every 250 milliseconds
local skycolor_data = get_skycolor_info(player)
local last_update = skycolor_data.last_update or 0
local now_us = minetest.get_us_time()
if (now_us - last_update) < minimum_update_interval[1] then return end
skycolor_data.last_update = now_us
local sky_data = {
day_night_ratio = player._skycolor_day_night_ratio
}
for i = 1,#skycolor_filters do
skycolor_filters[i](player, sky_data)
end
assert(sky_data.sky)
player:set_sky(sky_data.sky)
if sky_data.sun then player:set_sun(sky_data.sun) end
if sky_data.moon then player:set_moon(sky_data.moon) end
if sky_data.stars then player:set_stars(sky_data.stars) end
player:override_day_night_ratio(sky_data.day_night_ratio)
end
-- Update sky color. If players not specified update sky for all players.
function skycolor.update_sky_color(players)
-- Override day/night ratio as well
players = skycolor_utils.get_players(players)
local update = skycolor.update_player_sky_color
for _, player in ipairs(players) do
update(player)
end
end
-- Returns current layer color in {r, g, b} format
function skycolor.get_sky_layer_color(timeofday)
if #skycolor.layer_names == 0 then
return nil
end
-- min timeofday value 0; max timeofday value 1. So sky color gradient range will be between 0 and 1 * skycolor.max_val
local rounded_time = math.floor(timeofday * skycolor.max_val)
return skycolor_utils.convert_to_rgb(
skycolor.min_val, skycolor.max_val,
rounded_time, skycolor.retrieve_layer()
)
end
function skycolor_utils.convert_to_rgb(minval, maxval, current_val, colors)
-- Clamp current_val to valid range
current_val = math.min(minval, current_val)
current_val = math.max(maxval, current_val)
-- Rescale current_val from a number between minval and maxval to a number between 1 and #colors
local scaled_value = (current_val - minval) / (maxval - minval) * (#colors - 1) + 1.0
-- Get the first color's values
local index1 = math.floor(scaled_value)
local color1 = colors[index1]
local frac1 = scaled_value - index1
-- Get the second color's values
local index2 = math.min(index1 + 1, #colors) -- clamp to maximum color index (will occur if index1 == #colors)
local frac2 = 1.0 - frac1
local color2 = colors[index2]
-- Interpolate between color1 and color2
return {
r = math.floor(frac1 * color1.r + frac2 * color2.r),
g = math.floor(frac1 * color1.g + frac2 * color2.g),
b = math.floor(frac1 * color1.b + frac2 * color2.b),
}
end
-- Simple getter. Either returns user given players list or get all connected players if none provided
function skycolor_utils.get_players(players)
if players == nil or #players == 0 then
if mods_loaded then
players = minetest.get_connected_players()
elseif players == nil then
players = {}
end
end
return players
end
-- Returns the sky color of the first player, which is done assuming that all players are in same color layout.
function skycolor_utils.get_current_bg_color()
local players = skycolor_utils.get_players(nil)
if players[1] then
return players[1]:get_sky(true).sky_color
end
return nil
end
local timer = 0
minetest.register_globalstep(function(dtime)
if mcl_weather.skycolor.active ~= true or #minetest.get_connected_players() == 0 then
if skycolor.active ~= true or #minetest.get_connected_players() == 0 then
return
end
if mcl_weather.skycolor.force_update then
mcl_weather.skycolor.update_sky_color()
mcl_weather.skycolor.force_update = false
if skycolor.force_update then
skycolor.update_sky_color()
skycolor.force_update = false
return
end
-- regular updates based on iterval
timer = timer + dtime;
if timer >= mcl_weather.skycolor.update_interval then
mcl_weather.skycolor.update_sky_color()
if timer >= skycolor.update_interval then
skycolor.update_sky_color()
timer = 0
end
end)
local function initsky(player)
if player.set_lighting then
player:set_lighting({ shadows = { intensity = tonumber(minetest.settings:get("mcl_default_shadow_intensity") or 0.33) } })
player:set_lighting({
shadows = { intensity = 0.33 },
volumetric_light = { strength = 0.45 },
exposure = {
luminance_min = -3.5,
luminance_max = -2.5,
exposure_correction = 0.35,
speed_dark_bright = 1500,
speed_bright_dark = 700,
},
saturation = 1.1,
})
end
if (mcl_weather.skycolor.active) then
if (skycolor.active) then
mcl_weather.skycolor.force_update = true
end
@ -408,7 +282,7 @@ minetest.register_on_joinplayer(initsky)
minetest.register_on_respawnplayer(initsky)
mcl_worlds.register_on_dimension_change(function(player)
mcl_weather.skycolor.update_sky_color({player})
skycolor.update_sky_color({player})
end)
minetest.register_on_mods_loaded(function()

View File

@ -0,0 +1,184 @@
local MINIMUM_LIGHT_LEVEL = 0.2
local VALID_SNOW_WEATHER_STATES = { snow = true, rain = true, thunder = true }
local VALID_RAIN_WEATHER_STATES = { rain = true, thunder = true }
local mg_name = minetest.get_mapgen_setting("mg_name")
local dimension_handlers = {}
mcl_weather.skycolor.dimension_handlers = dimension_handlers
-- Function to work out light modifier at different times
-- Noon is brightest, midnight is darkest, 0600 and 1800 is in the middle of this
local function get_light_modifier(time)
-- 0.1 = 0.2
-- 0.4 = 0.8
-- 0.5 = 1
-- 0.6 = 0.8
-- 0.9 = 0.2
local light_multiplier = time * 2
if time > 0.5 then
light_multiplier = 2 * (1 - time)
else
light_multiplier = time / 0.5
end
return light_multiplier
end
function dimension_handlers.overworld(player, sky_data)
local pos = player:get_pos()
local biomesky
local biomefog
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then
biomesky = biome._mcl_skycolor
biomefog = biome._mcl_fogcolor
end
end
-- Use overworld defaults
local day_color = mcl_weather.skycolor.get_sky_layer_color(0.15)
local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.27)
local night_color = mcl_weather.skycolor.get_sky_layer_color(0.1)
sky_data.sky = {
type = "regular",
sky_color = {
day_sky = day_color,
day_horizon = day_color,
dawn_sky = dawn_color,
dawn_horizon = dawn_color,
night_sky = night_color,
night_horizon = night_color,
},
clouds = true,
}
sky_data.sun = {visible = true, sunrise_visible = true}
sky_data.moon = {visible = true}
sky_data.stars = {visible = true}
if mcl_weather.state == "none" then
-- Clear weather
mcl_weather.set_sky_box_clear(player,biomesky,biomefog)
return
end
-- Check if we currently have weather that affects the sky color
local has_weather = mcl_worlds.has_weather(pos) and (
mcl_weather.has_snow(pos) and VALID_SNOW_WEATHER_STATES[mcl_weather.state] or
mcl_weather.has_rain(pos) and VALID_RAIN_WEATHER_STATES[mcl_weather.state]
)
if has_weather then
-- Weather skies
local day_color = mcl_weather.skycolor.get_sky_layer_color(0.5)
local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.75)
local night_color = mcl_weather.skycolor.get_sky_layer_color(0)
sky_data.sky = {
type = "regular",
sky_color = {
day_sky = day_color,
day_horizon = day_color,
dawn_sky = dawn_color,
dawn_horizon = dawn_color,
night_sky = night_color,
night_horizon = night_color,
},
clouds = true,
}
sky_data.sun = {visible = false, sunrise_visible = false}
sky_data.moon = {visible = false}
sky_data.stars = {visible = false}
local light_factor = mcl_weather.get_current_light_factor()
if mcl_weather.skycolor.current_layer_name() == "lightning" then
sky_data.day_night_ratio = 1
elseif light_factor then
local time = minetest.get_timeofday()
local light_multiplier = get_light_modifier(time)
local new_light = math.max(light_factor * light_multiplier, MINIMUM_LIGHT_LEVEL)
sky_data.day_night_ratio = new_light
end
end
end
-- This can't be function dimension_handlers.end() due to lua syntax
dimension_handlers["end"] = function(player, sky_data)
local biomesky = "#000000"
local biomefog = "#A080A0"
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then
biomesky = biome._mcl_skycolor
biomefog = biome._mcl_fogcolor -- The End biomes seemingly don't use the fog colour, despite having this value according to the wiki. The sky colour is seemingly used for both sky and fog?
end
end
local t = "mcl_playerplus_end_sky.png"
sky_data.sky = { type = "skybox",
base_color = biomesky,
textures = {t,t,t,t,t,t},
clouds = false,
}
sky_data.sun = {visible = false , sunrise_visible = false}
sky_data.moon = {visible = false}
sky_data.stars = {visible = false}
sky_data.day_night_ratio = 0.5
end
function dimension_handlers.nether(player, sky_data)
local biomesky = "#6EB1FF"
local biomefog = "#330808"
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(player:get_pos()).biome
local biome_name = minetest.get_biome_name(biome_index)
local biome = minetest.registered_biomes[biome_name]
if biome then
-- The Nether biomes seemingly don't use the sky colour, despite having this value according to the wiki.
-- The fog colour is used for both sky and fog.
biomesky = biome._mcl_skycolor
biomefog = biome._mcl_fogcolor
end
end
sky_data.sky = {
type = "regular",
sky_color = {
day_sky = biomefog,
day_horizon = biomefog,
dawn_sky = biomefog,
dawn_horizon = biomefog,
night_sky = biomefog,
night_horizon = biomefog,
indoors = biomefog,
fog_sun_tint = biomefog,
fog_moon_tint = biomefog,
fog_tint_type = "custom"
},
clouds = false,
}
sky_data.sun = {visible = false , sunrise_visible = false}
sky_data.moon = {visible = false}
sky_data.stars = {visible = false}
end
function dimension_handlers.void(player, sky_data)
sky_data.sky = { type = "plain",
base_color = "#000000",
clouds = false,
}
sky_data.sun = {visible = false, sunrise_visible = false}
sky_data.moon = {visible = false}
sky_data.stars = {visible = false}
end
local function dimension(player, sky_data)
local pos = player:get_pos()
local dim = mcl_worlds.pos_to_dimension(pos)
local handler = dimension_handlers[dim]
if handler then return handler(player, sky_data) end
end
table.insert(mcl_weather.skycolor.filters, dimension)

View File

@ -0,0 +1,56 @@
local DIM_ALLOW_NIGHT_VISION = {
overworld = true,
void = true,
}
local NIGHT_VISION_RATIO = mcl_weather.skycolor.NIGHT_VISION_RATIO
local effects_handlers = {}
local has_mcl_potions = mcl_util.to_bool(minetest.get_modpath("mcl_potions"))
function effects_handlers.darkness(player, meta, effect, sky_data)
-- No darkness effect if is a visited shepherd
if meta:get_int("mcl_shepherd:special") == 1 then return end
-- High stars
sky_data.stars = {visible = false}
-- Minor visibility if the player has the night vision effect
if mcl_potions.has_effect(player, "night_vision") then
sky_data.day_night_ratio = 0.1
else
sky_data.day_night_ratio = 0
end
end
function effects_handlers.night_vision(player, meta, effect, sky_data)
-- Apply night vision only for dark sky
if not (minetest.get_timeofday() > 0.8 or minetest.get_timeofday() < 0.2 or mcl_weather.state ~= "none") then return end
-- Only some dimensions allow night vision
local pos = player:get_pos()
local dim = mcl_worlds.pos_to_dimension(pos)
if not DIM_ALLOW_NIGHT_VISION[dim] then return end
-- Apply night vision
sky_data.day_night_ratio = math.max(sky_data.day_night_ratio or 0, NIGHT_VISION_RATIO)
end
local function effects(player, sky_data)
if not has_mcl_potions then return end
local meta = player:get_meta()
for name,effect in pairs(mcl_potions.registered_effects) do
local effect_data = mcl_potions.get_effect(player, name)
if effect_data then
local hook = effect.mcl_weather_skycolor or effects_handlers[name]
if hook then hook(player, meta, effect_data, sky_data) end
end
end
-- Handle night vision for shepherd
if meta:get_int("mcl_shepherd:special") == 1 then
return effects_handlers.night_vision(player, meta, {}, sky_data)
end
end
table.insert(mcl_weather.skycolor.filters, effects)

View File

@ -0,0 +1,40 @@
local DEFAULT_WATER_COLOR = "#3F76E4"
local mg_name = minetest.get_mapgen_setting("mg_name")
local function water_sky(player, sky_data)
local water_color = DEFAULT_WATER_COLOR
local checkname = mcl_playerinfo[player:get_player_name()].node_head
if minetest.get_item_group(checkname, "water") == 0 then return end
local pos = player:get_pos()
local biome = nil
if mg_name ~= "v6" and mg_name ~= "singlenode" then
local biome_index = minetest.get_biome_data(pos).biome
local biome_name = minetest.get_biome_name(biome_index)
biome = minetest.registered_biomes[biome_name]
end
if biome then water_color = biome._mcl_waterfogcolor end
if not biome then water_color = DEFAULT_WATER_COLOR end
if checkname == "mclx_core:river_water_source" or checkname == "mclx_core:river_water_flowing" then water_color = "#0084FF" end
sky_data.sky = { type = "regular",
sky_color = {
day_sky = water_color,
day_horizon = water_color,
dawn_sky = water_color,
dawn_horizon = water_color,
night_sky = water_color,
night_horizon = water_color,
indoors = water_color,
fog_sun_tint = water_color,
fog_moon_tint = water_color,
fog_tint_type = "custom"
},
clouds = true,
}
end
table.insert(mcl_weather.skycolor.filters, water_sky)

View File

@ -10,6 +10,10 @@ mcl_weather.thunder = {
init_done = false,
}
lightning.register_on_strike(function(pos, pos2, objects)
if not mcl_weather.has_rain(pos) then return nil, true end
end)
minetest.register_globalstep(function(dtime)
if mcl_weather.get_weather() ~= "thunder" then
return false

View File

@ -330,9 +330,16 @@ function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon
local name = player:get_player_name()
local hudtable = hb.get_hudtable(identifier)
-- hb.change_hudbar may be called with a non-existing hudbar like hunger.
if hudtable == nil then
return false
end
if not hudtable.hudstate[name] then
return false
end
local value_changed, max_changed = false, false
if new_value then

View File

@ -113,8 +113,8 @@ mesecon.register_node("mcl_observers:observer", {
sounds = mcl_sounds.node_sound_stone_defaults(),
paramtype2 = "facedir",
on_rotate = false,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
}, {
description = S("Observer"),
_tt_help = S("Emits redstone pulse when block in front changes"),
@ -172,8 +172,8 @@ mesecon.register_node("mcl_observers:observer_down", {
sounds = mcl_sounds.node_sound_stone_defaults(),
groups = {pickaxey=1, material_stone=1, not_opaque=1, not_in_creative_inventory=1 },
on_rotate = false,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
drop = "mcl_observers:observer_off",
}, {
tiles = {
@ -224,8 +224,8 @@ mesecon.register_node("mcl_observers:observer_up", {
sounds = mcl_sounds.node_sound_stone_defaults(),
groups = {pickaxey=1, material_stone=1, not_opaque=1, not_in_creative_inventory=1 },
on_rotate = false,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
drop = "mcl_observers:observer_off",
}, {
tiles = {

View File

@ -218,7 +218,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_up_normal_off"})
@ -255,7 +255,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = false,
})
@ -326,7 +326,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_up_sticky_off"})
@ -363,7 +363,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = false,
})
@ -449,7 +449,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_off", {
footstep = mcl_sounds.node_sound_wood_defaults().footstep
}),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_down_normal_off"})
@ -487,7 +487,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = false,
})
@ -556,7 +556,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_down_sticky_off"})
@ -594,7 +594,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = false,
})
@ -680,7 +680,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_normal_off"})
@ -718,7 +718,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = false,
})
@ -782,7 +782,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
minetest.set_node(pos, {name="mesecons_pistons:piston_sticky_off"})
@ -820,7 +820,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", {
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_hardness = 1.5,
on_rotate = false,
})

View File

@ -62,7 +62,7 @@ local bamboo_def = {
inventory_image = "mcl_bamboo_bamboo_shoot.png",
wield_image = "mcl_bamboo_bamboo_shoot.png",
_mcl_blast_resistance = 1,
_mcl_hardness = 1.5,
_mcl_hardness = 1,
node_box = {
type = "fixed",
fixed = {
@ -277,7 +277,7 @@ local bamboo_block_def = {
sounds = node_sound,
paramtype2 = "facedir",
drops = "mcl_bamboo:bamboo_block",
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 2,
_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 = mcl_util.rotate_axis,

View File

@ -208,7 +208,7 @@ if minetest.get_modpath("mcl_fences") then
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.
node_sound)
mcl_bamboo.mcl_log(dump(fence_id))
mcl_bamboo.mcl_log(dump(gate_id))

View File

@ -210,7 +210,7 @@ function mcl_beds.register_bed(name, def)
stack_max = 1,
groups = {handy=1, bed = 1, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, deco_block = 1, flammable=-1},
_mcl_hardness = 0.2,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
sounds = def.sounds or default_sounds,
selection_box = common_box,
collision_box = common_box,
@ -288,7 +288,7 @@ function mcl_beds.register_bed(name, def)
is_ground_content = false,
groups = {handy = 1, flammable = -1, bed = 2, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, not_in_creative_inventory = 1},
_mcl_hardness = 0.2,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
sounds = def.sounds or default_sounds,
drop = "",
selection_box = common_box,

View File

@ -33,8 +33,8 @@ minetest.register_node("mcl_blackstone:blackstone_gilded", {
{items = {"mcl_blackstone:blackstone_gilded"}, rarity = 1},
}
},
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = {
discrete_uniform_distribution = true,
@ -226,18 +226,7 @@ mcl_stairs.register_stair_and_slab("blackstone_brick_polished", "mcl_blackstone:
S("Double Polished Blackstone Brick Slab"), nil)
--Wall
mcl_walls.register_wall(
"mcl_blackstone:wall",
S("Blackstone Wall"),
"mcl_blackstone:blackstone",
{
"mcl_blackstone_top.png",
"mcl_blackstone_top.png",
"mcl_blackstone_side.png"
},
"",
{ cracky=3, pickaxey=1, material_stone=1 }
)
mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone")
--lavacooling

View File

@ -456,8 +456,8 @@ minetest.register_node("mcl_brewing:stand_000", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -537,8 +537,8 @@ minetest.register_node("mcl_brewing:stand_100", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -617,8 +617,8 @@ minetest.register_node("mcl_brewing:stand_010", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -692,8 +692,8 @@ minetest.register_node("mcl_brewing:stand_001", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -777,8 +777,8 @@ minetest.register_node("mcl_brewing:stand_110", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -858,8 +858,8 @@ minetest.register_node("mcl_brewing:stand_101", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -939,8 +939,8 @@ minetest.register_node("mcl_brewing:stand_011", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
@ -1027,8 +1027,8 @@ minetest.register_node("mcl_brewing:stand_111", {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_destruct = on_destruct,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,

View File

@ -209,7 +209,7 @@ local function on_place_bucket_empty(itemstack, user, pointed_thing)
-- Call on_rightclick if the pointed node defines it
local new_stack = mcl_util.call_on_rightclick(itemstack, user, pointed_thing)
if new_stack then
if new_stack and new_stack ~= itemstack then
return new_stack
end

View File

@ -19,6 +19,6 @@ Cherry Slab=Dalle en cerisier
Double Cherry Slab=Double Dalle en cerisier
Cherry Sign=Panneau de cerisier
Cherry Fence=Barrière en cerisier
Cherry Gate=Portillion en cerisier
Cherry Fence Gate=Portillion en cerisier
Cherry Pressure Plate=Plaque de pression en cerisier
Cherry Button=Bouton de Cerisier

View File

@ -19,6 +19,6 @@ Cherry Slab=Laje de Cerejeira
Double Cherry Slab=Laje Dupla de Cerejeira
Cherry Sign=Placa de Cerejeira
Cherry Fence=Cerca de Cerejeira
Cherry Gate=Portão de Cerejeira
Cherry Fence Gate=Portão de Cerejeira
Cherry Pressure Plate=Placa de Pressão de Cerejeira
Cherry Button=Botão de Cerejeira

View File

@ -19,6 +19,6 @@ Cherry Slab=Вишнёвая плита
Double Cherry Slab=Двойная вишнёвая плита
Cherry Sign=Вишнёвая табличка
Cherry Fence=Вишнёвый забор
Cherry Gate=Вишнёвая калитка
Cherry Fence Gate=Вишнёвая калитка
Cherry Pressure Plate=Вишнёвая нажимная плита
Cherry Button=Вишнёвая кнопка

View File

@ -19,6 +19,6 @@ Cherry Slab=
Double Cherry Slab=
Cherry Sign=
Cherry Fence=
Cherry Gate=
Cherry Fence Gate=
Cherry Pressure Plate=
Cherry Button=

View File

@ -51,13 +51,13 @@ mcl_stairs.register_stair("cherrywood", "mcl_cherry_blossom:cherrywood",
{handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
{"mcl_cherry_blossom_planks.png"},
S("Cherry Stairs"),
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
"woodlike")
mcl_stairs.register_slab("cherrywood", "mcl_cherry_blossom:cherrywood",
{handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
{"mcl_cherry_blossom_planks.png"},
S("Cherry Slab"),
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
S("Double Cherry Slab"))
-- Signs
@ -69,7 +69,7 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood",
mcl_fences.register_fence_and_fence_gate(
"cherry_fence",
S("Cherry Fence"),
S("Cherry Gate"),
S("Cherry Fence 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,

View File

@ -94,7 +94,7 @@ minetest.register_node("mcl_chests:ender_chest_small", {
mcl_chests.player_chest_close(sender)
end
end,
_mcl_blast_resistance = 3000,
_mcl_blast_resistance = 600,
_mcl_hardness = 22.5,
_mcl_silk_touch_drop = { "mcl_chests:ender_chest" },
on_rotate = mcl_chests.simple_rotate,

View File

@ -295,7 +295,7 @@ for color, desc in pairs(boxtypes) do
end
end,
on_rotate = mcl_chests.simple_rotate,
_mcl_blast_resistance = 6,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
_mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list)
local meta = minetest.get_meta(pos)

View File

@ -162,7 +162,7 @@ for _, row in ipairs(block.dyes) do
stack_max = 64,
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4.2,
_mcl_blast_resistance = 1.4,
_mcl_hardness = 1.4,
on_rotate = on_rotate,
})

View File

@ -312,8 +312,8 @@ minetest.register_node("mcl_compass:lodestone",{
"lodestone_side4.png"
},
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 1.5,
_mcl_blast_resistance = 6,
_mcl_hardness = 3.5,
_mcl_blast_resistance = 3.5,
sounds = mcl_sounds.node_sound_stone_defaults()
})

View File

@ -58,7 +58,7 @@ minetest.register_node("mcl_copper:block_exposed", {
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_oxidized_variant = "mcl_copper:block_weathered",
_mcl_waxed_variant = "mcl_copper:waxed_block_exposed",
_mcl_stripped_variant = "mcl_copper:block",
@ -72,7 +72,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_exposed",
})
@ -84,7 +84,7 @@ minetest.register_node("mcl_copper:block_weathered", {
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_oxidized_variant = "mcl_copper:block_oxidized",
_mcl_waxed_variant = "mcl_copper:waxed_block_weathered",
_mcl_stripped_variant = "mcl_copper:block_exposed",
@ -98,7 +98,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_weathered",
})
@ -110,7 +110,7 @@ minetest.register_node("mcl_copper:block_oxidized", {
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_waxed_variant = "mcl_copper:waxed_block_oxidized",
_mcl_stripped_variant = "mcl_copper:block_weathered",
})
@ -123,7 +123,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_oxidized",
})
@ -135,7 +135,7 @@ minetest.register_node("mcl_copper:block_cut", {
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_oxidized_variant = "mcl_copper:block_exposed_cut",
_mcl_waxed_variant = "mcl_copper:waxed_block_cut",
})
@ -148,7 +148,7 @@ minetest.register_node("mcl_copper:waxed_block_cut", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_cut",
})
@ -160,7 +160,7 @@ minetest.register_node("mcl_copper:block_exposed_cut", {
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_waxed_variant = "mcl_copper:waxed_block_exposed_cut",
_mcl_oxidized_variant = "mcl_copper:block_weathered_cut",
_mcl_stripped_variant = "mcl_copper:block_cut",
@ -174,7 +174,7 @@ minetest.register_node("mcl_copper:waxed_block_exposed_cut", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
})
@ -186,7 +186,7 @@ minetest.register_node("mcl_copper:block_weathered_cut", {
groups = {pickaxey = 2, building_block = 1, oxidizable = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_exposed_cut",
_mcl_oxidized_variant = "mcl_copper:block_oxidized_cut",
_mcl_waxed_variant = "mcl_copper:waxed_block_weathered_cut",
@ -200,7 +200,7 @@ minetest.register_node("mcl_copper:waxed_block_weathered_cut", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
})
@ -212,7 +212,7 @@ minetest.register_node("mcl_copper:block_oxidized_cut", {
groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_weathered_cut",
_mcl_waxed_variant = "mcl_copper:waxed_block_oxidized_cut",
})
@ -225,7 +225,7 @@ minetest.register_node("mcl_copper:waxed_block_oxidized_cut", {
groups = {pickaxey = 2, building_block = 1, waxed = 1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
_mcl_hardness = 3,
_mcl_stripped_variant = "mcl_copper:block_oxidized_cut",
})
@ -289,54 +289,54 @@ mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut",
{pickaxey = 2, oxidizable = 1},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
S("Stairs of Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_cut", "mcl_copper:waxed_block_cut",
{pickaxey = 2, waxed = 1},
{"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"},
S("Waxed Stairs of Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut",
{pickaxey = 2, oxidizable = 1},
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
S("Stairs of Exposed Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut",
{pickaxey = 2, waxed = 1},
{"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"},
S("Waxed Stairs of Exposed Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("copper_weathered_cut", "mcl_copper:block_weathered_cut",
{pickaxey = 2, oxidizable = 1},
{"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"},
S("Stairs of Weathered Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut",
{pickaxey = 2, waxed = 1},
{"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"},
S("Waxed Stairs of Weathered Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut",
{pickaxey = 2},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Stairs of Oxidized Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut",
{pickaxey = 2, waxed = 1},
{"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"},
S("Waxed Stairs of Oxidized Cut Copper"),
nil, 6, nil,
nil, nil, nil,
"woodlike")

View File

@ -191,12 +191,16 @@ minetest.register_abm({
nodenames = {"mcl_core:cactus"},
neighbors = {"group:sand"},
interval = 25,
chance = 10,
chance = 40,
action = function(pos)
mcl_core.grow_cactus(pos)
end,
})
local function is_walkable(pos)
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
return ndef and ndef.walkable
end
minetest.register_abm({
label = "Cactus mechanisms",
nodenames = {"mcl_core:cactus"},
@ -209,18 +213,21 @@ minetest.register_abm({
object:remove()
end
end
local posses = { { 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 } }
for _, p in pairs(posses) do
local ndef = minetest.registered_nodes[minetest.get_node(vector.new(pos.x + p[1], pos.y, pos.z + p[2])).name]
if ndef and ndef.walkable then
local posy = pos.y
while minetest.get_node(vector.new(pos.x, posy, pos.z)).name == "mcl_core:cactus" do
local pos = vector.new(pos.x, posy, pos.z)
minetest.dig_node(pos)
-- minetest.add_item(vector.offset(pos, math.random(-0.5, 0.5), 0, math.random(-0.5, 0.5)), "mcl_core:cactus")
posy = posy + 1
end
break
if is_walkable(vector.offset(pos, 1, 0, 0))
or is_walkable(vector.offset(pos, -1, 0, 0))
or is_walkable(vector.offset(pos, 0, 0, 1))
or is_walkable(vector.offset(pos, 0, 0, -1)) then
local lpos = vector.copy(pos)
local dx, dy
while true do
local node = minetest.get_node(lpos)
if not node or node.name ~= "mcl_core:cactus" then break end
minetest.dig_node(lpos)
dx = dx or ((math.random(0,1)-0.5) * math.sqrt(math.random())) * 1.5
dy = dy or ((math.random(0,1)-0.5) * math.sqrt(math.random())) * 1.5
local obj = minetest.add_item(vector.offset(lpos, dx, 0.25, dy), "mcl_core:cactus")
obj:set_velocity(vector.new(dx, 1, dy))
lpos.y = lpos.y + 1
end
end
end,

View File

@ -288,7 +288,7 @@ minetest.register_node("mcl_core:stone_smooth", {
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
_mcl_hardness = 2,
})
minetest.register_node("mcl_core:granite", {
@ -424,7 +424,7 @@ minetest.register_node("mcl_core:grass_path", {
footstep = {name="default_grass_footstep", gain=0.1},
}),
_mcl_blast_resistance = 0.65,
_mcl_hardness = 0.6,
_mcl_hardness = 0.65,
})
-- TODO: Add particles
@ -497,8 +497,8 @@ minetest.register_node("mcl_core:podzol", {
sounds = mcl_sounds.node_sound_dirt_defaults(),
on_construct = mcl_core.on_snowable_construct,
_mcl_snowed = "mcl_core:podzol_snow",
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
_mcl_silk_touch_drop = true,
})
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow"))
@ -600,8 +600,8 @@ minetest.register_node("mcl_core:sandstonesmooth", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
minetest.register_node("mcl_core:sandstonecarved", {
@ -687,8 +687,8 @@ minetest.register_node("mcl_core:redsandstonesmooth2", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
---
@ -1139,8 +1139,8 @@ minetest.register_node("mcl_core:snowblock", {
on_construct = mcl_core.on_snow_construct,
after_destruct = mcl_core.after_snow_destruct,
drop = "mcl_throwing:snowball 4",
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
_mcl_silk_touch_drop = true,
})

View File

@ -40,7 +40,7 @@ end
minetest.register_node("mcl_core:ladder", {
description = S("Ladder"),
_doc_items_longdesc = S(
"A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns."),
"A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks."),
drawtype = "signlike",
is_ground_content = false,
tiles = { "default_ladder.png" },
@ -85,9 +85,8 @@ minetest.register_node("mcl_core:ladder", {
end
local groups = def.groups
-- Don't allow to place the ladder at particular nodes
if (groups and (groups.glass or groups.leaves or groups.slab)) or
node.name == "mcl_core:ladder" or node.name == "mcl_core:ice" or node.name == "mcl_nether:glowstone" or node.name == "mcl_ocean:sea_lantern" then
-- Don't allow to place the ladder at non-solid nodes
if (groups and (not groups.solid)) then
return itemstack
end
@ -105,9 +104,10 @@ minetest.register_node("mcl_core:ladder", {
return itemstack
end
local idef = itemstack:get_definition()
local success = minetest.item_place_node(itemstack, placer, pointed_thing)
local itemstack, pos = minetest.item_place_node(itemstack, placer, pointed_thing)
if success then
-- A non-nil pos indicates the node was placed in a valid position.
if pos then
if idef.sounds and idef.sounds.place then
minetest.sound_play(idef.sounds.place, { pos = above, gain = 1 }, true)
end

View File

@ -191,8 +191,7 @@ minetest.register_node("mcl_crimson:twisting_vines", {
"mcl_crimson:twisting_vines",
"mcl_crimson:twisting_vines",
},
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
_mcl_blast_resistance = 0,
})
minetest.register_node("mcl_crimson:weeping_vines", {
@ -281,8 +280,7 @@ minetest.register_node("mcl_crimson:weeping_vines", {
"mcl_crimson:weeping_vines",
"mcl_crimson:weeping_vines",
},
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
_mcl_blast_resistance = 0,
})
minetest.register_node("mcl_crimson:nether_sprouts", {
@ -465,6 +463,7 @@ minetest.register_node("mcl_crimson:warped_hyphae_wood", {
tiles = {"mcl_crimson_warped_hyphae_wood.png"},
groups = {handy = 5,axey = 1, wood=1,building_block = 1, material_wood = 1},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
@ -662,6 +661,7 @@ minetest.register_node("mcl_crimson:crimson_hyphae_wood", {
tiles = {"mcl_crimson_crimson_hyphae_wood.png"},
groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})

View File

@ -38,8 +38,8 @@ minetest.register_node("mcl_deepslate:infested_deepslate", {
drop = "",
sounds = mcl_sounds.node_sound_stone_defaults(),
after_dig_node = spawn_silverfish,
_mcl_hardness = 0,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 1.5,
_mcl_blast_resistance = 0.75,
})
minetest.register_node("mcl_deepslate:tuff", {
@ -218,10 +218,7 @@ local function register_deepslate_variant(item, desc, longdesc)
end
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_walls.register_wall(
"mcl_deepslate:deepslate"..item.."wall",
S(desc.." Wall"),
"mcl_deepslate:deepslate_"..item)
mcl_walls.register_wall("mcl_deepslate:deepslate"..item.."wall", S(desc.." Wall"), "mcl_deepslate:deepslate_"..item)
end
end

View File

@ -230,7 +230,7 @@ minetest.register_node("mcl_end:chorus_flower_dead", {
groups = {handy=1,axey=1, deco_block = 1, dig_by_piston = 1, destroy_by_lava_flow = 1,chorus_plant = 1, not_in_creative_inventory=1},
after_dig_node = mcl_end.check_detach_chorus_plant,
on_blast = mcl_end.check_blast_chorus_plant,
_mcl_blast_resistance = 2,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
})
@ -309,7 +309,7 @@ minetest.register_node("mcl_end:chorus_plant", {
end,
after_dig_node = mcl_end.check_detach_chorus_plant,
on_blast = mcl_end.check_blast_chorus_plant,
_mcl_blast_resistance = 2,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
})

View File

@ -119,6 +119,7 @@ minetest.register_node("mcl_farming:beetroot", {
_mcl_fortune_drop = {
discrete_uniform_distribution = true,
items = {"mcl_farming:beetroot_seeds"},
drop_without_fortune = {"mcl_farming:beetroot_item"},
min_count = 1,
max_count = 3,
cap = 5,

View File

@ -63,10 +63,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=Junger Kürbisstängel (@1. Stufe)
Mature Pumpkin Stem=Ausgewachsener Kürbisstängel
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=Ein ausgewachsener Kürbisstängel versucht, auf einem seiner vier benachbarten Blöcke einen Kürbis wachsen zu lassen. Ein Kürbis kann nur auf Ackerboden, Erde oder einem Grasblock wachsen. Wenn sich ein Kürbis neben einem Kürbisstängel befindet, verbiegt sich der Kürbisstängel und verbindet sich mit dem Kürbis. Solange der Stängel verbunden ist, kann aus ihm kein neuer Kürbis wachsen. Wenn alle Kürbisse um den Kürbisstängel entfernt wurden, verliert er die Verbindung und aus ihm kann ein weiterer Kürbis wachsen.
Faceless Pumpkin=Gesichtsloser Kürbis
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=Ein gesichtsloser Kürbis ist ein dekorativer Block. Mit einer Schere kann man in ihm ein Muster schnitzen, um Kürbissamen zu erhalten.
Pumpkin=Kürbis
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=Einen Kürbis kann zum Spaß als Helm getragen werden, aber er bietet keinen Schutz. Kürbisse wachsen aus Kürbisstängeln, welche wiederum aus Kürbissamen wachsen.
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=Ein Kürbis ist ein dekorativer Block. Mit einer Schere kann man in ihm ein Muster schnitzen, um einen Geschnitzter Kürbis und Kürbissamen zu erhalten.
Carved Pumpkin=Geschnitzter Kürbis
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=Ein Geschnitzter Kürbis ist ein dekorativer Block, der kann benützt werden, um Schnee- oder Eisengolem zu beschwören, oder zum Spaß als Helm getragen werden, aber er bietet keinen Schutz. Man erhaltet diesen Block, indem man einen Kürbis schnitzt.
Jack o'Lantern=Kürbislaterne
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=Eine Kürbislaterne ist eine traditionelle Dekoration für Halloween. Sie leuchtet hell.
Pumpkin Pie=Kürbiskuchen
@ -89,7 +89,7 @@ Cookie=Keks
Bread=Brot
Hay Bale=Heuballen
Hay bales are decorative blocks made from wheat.=Heuballen sind dekorative Blöcke, die aus Weizen gemacht sind.
To carve a face into the pumpkin, use the shears on the side you want to carve.=Um ein Gesicht in den Kürbis zu schnitzen, benutzen Sie die Schere an der Seite, die Sie schnitzen wollen.
To carve a pumpkin, use the shears on the side you want the face to appear.=Um ein Gesicht in den Kürbis zu schnitzen, benutzen Sie die Schere an der Seite, die Sie schnitzen wollen.
Use the “Place” key on an animal to try to feed it wheat.=Benutzen Sie die „Platzieren“-Taste auf einem Tier, um zu versuchen, es zu füttern.
Grows on farmland=Wächst auf Ackerboden
Turns block into farmland=Macht Block zu Ackerboden

View File

@ -63,10 +63,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=Tallo de calabaza prematuro (Etapa @1)
Mature Pumpkin Stem=Tallo maduro de calabaza
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=Un tallo maduro de calabaza intenta cultivar una calabaza en uno de sus cuatro bloques adyacentes. Una calabaza solo puede crecer sobre tierras de cultivo, tierra o un bloque de hierba. Cuando una calabaza está al lado de un tallo de calabaza, el tallo de la calabaza se dobla inmediatamente y se conecta a la calabaza. Un tallo de calabaza conectado no puede cultivar otra calabaza. Tan pronto como se hayan eliminado todas las calabazas alrededor del tallo, pierde la conexión y está lista para cultivar otra calabaza.
Faceless Pumpkin=Calabaza sin rostro
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=Una calabaza sin rostro es un bloque decorativo. Se puede tallar con tijeras para obtener semillas de calabaza.
Pumpkin=Calabaza
A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=Una calabaza se puede usar como casco por diversión, pero no ofrece ninguna protección. Las calabazas crecen de tallos de calabaza, que a su vez crecen de semillas de calabaza.
Pumpkin=Calabaza sin rostro
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=Una calabaza sin rostro es un bloque decorativo. Se puede tallar con tijeras para obtener semillas de calabaza.
Carved Pumpkin=Calabaza
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=Una calabaza se puede usar como casco por diversión, pero no ofrece ninguna protección. Las calabazas crecen de tallos de calabaza, que a su vez crecen de semillas de calabaza.
Jack o'Lantern=Calabaza de Halloween
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=La calabaza de Halloween es una decoración tradicional de Halloween hecha de una calabaza. Brilla intensamente.
Pumpkin Pie=Tarta de calabaza
@ -89,5 +89,5 @@ Cookie=Galleta
Bread=Pan
Hay Bale=Fardo de heno
Hay bales are decorative blocks made from wheat.=Las balas de heno son bloques decorativos hechos de trigo.
To carve a face into the pumpkin, use the shears on the side you want to carve.=Para tallar una cara en la calabaza, use las tijeras en el lado que desea tallar.
To carve a pumpkin, use the shears on the side you want the face to appear.=Para tallar una cara en la calabaza, use las tijeras en el lado que desea tallar.
Use the “Place” key on an animal to try to feed it wheat.=Use la tecla "Colocar" en un animal para tratar de alimentarlo con trigo.

View File

@ -64,10 +64,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=Tige de citrouille prématurée (étape @1)
Mature Pumpkin Stem=Tige de citrouille mature
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=Une tige de citrouille mature tente de faire pousser une citrouille dans l'un de ses quatre blocs adjacents. Une citrouille ne peut pousser que sur des terres agricoles, de la terre ou un bloc d'herbe. Lorsqu'une citrouille est à côté d'une tige de citrouille, la tige de citrouille se plie immédiatement et se connecte à la citrouille. Une tige de citrouille connectée ne peut pas faire pousser une autre citrouille. Dès que toutes les citrouilles autour de la tige ont été retirées, elle perd la connexion et est prête à faire pousser une autre citrouille.
Faceless Pumpkin=Citrouille sans visage
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=Une citrouille sans visage est un bloc décoratif. Il peut être sculpté avec une cisaille pour obtenir des graines de citrouille.
Pumpkin=Citrouille
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=Une citrouille peut être portée comme un casque. Les citrouilles poussent à partir de tiges de citrouille, qui à leur tour poussent à partir de graines de citrouille.
Pumpkin=Citrouille sans visage
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=Une citrouille sans visage est un bloc décoratif. Il peut être sculpté avec une cisaille pour obtenir des graines de citrouille.
Carved Pumpkin=Citrouille
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=Une citrouille peut être portée comme un casque. Les citrouilles poussent à partir de tiges de citrouille, qui à leur tour poussent à partir de graines de citrouille.
Jack o'Lantern=Citrouille-lanterne
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=Une citrouille-lanterne est une décoration traditionnelle d'Halloween à base de citrouille. Elle brille de mille feux.
Pumpkin Pie=Tarte à la citrouille
@ -93,10 +93,10 @@ Cookie=Cookie
Bread=Pain
Hay Bale=Balle de foin
Hay bales are decorative blocks made from wheat.=Les balles de foin sont des blocs décoratifs en blé.
To carve a face into the pumpkin, use the shears on the side you want to carve.=Pour sculpter un visage dans la citrouille, utilisez les cisailles du côté que vous souhaitez sculpter.
To carve a pumpkin, use the shears on the side you want the face to appear.=Pour sculpter un visage dans la citrouille, utilisez les cisailles du côté que vous souhaitez sculpter.
Use the “Place” key on an animal to try to feed it wheat.=Utilisez la touche "Placer" sur un animal pour essayer de le nourrir de blé.
Grows on farmland=Pousse sur les terres agricoles
Turns block into farmland=Transforme un bloc en terre agricole
Turns block into farmland=Transforme un bloc en terres agricoles
60% chance of poisoning=60% de chances d'empoisonnement
Surface for crops=Surface pour les cultures
Can become wet=Peut devenir humide

View File

@ -63,10 +63,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=未成熟なカボチャの茎(@1段階目
Mature Pumpkin Stem=成熟したカボチャの茎
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=成熟したカボチャの茎は、隣接する4つのブロックのいずれかでカボチャを実らせようとします。実るのは、耕地、土、草原の上だけです。カボチャの茎の隣にカボチャがあると、茎はすぐに曲がってカボチャにつながります。つながっている間は、他のカボチャを実らせられません。茎の周りのカボチャをすべて取り除くと、接続が切れて次のカボチャが実るようになります。
Faceless Pumpkin=顔のないカボチャ
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=顔のないカボチャは装飾ブロックです。これをハサミで彫ると、カボチャの種が得られます。
Pumpkin=カボチャ
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=カボチャは、カボチャの種から育つ茎を経て実ります。ハサミで彫るとヘルメットとして被る事もできます。
Pumpkin=顔のないカボチャ
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=顔のないカボチャは装飾ブロックです。これをハサミで彫ると、カボチャの種が得られます。
Carved Pumpkin=カボチャ
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=カボチャは、カボチャの種から育つ茎を経て実ります。ハサミで彫るとヘルメットとして被る事もできます。
Jack o'Lantern=ジャック・オー・ランタン
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=ジャック・オー・ランタンとは、カボチャから作られるハロウィンの伝統的な飾りです。明るく光ります。
Pumpkin Pie=パンプキンパイ
@ -89,7 +89,7 @@ Cookie=クッキー
Bread=パン
Hay Bale=干草の俵
Hay bales are decorative blocks made from wheat.=干草の俵とは、小麦から作られた装飾ブロックのことです。
To carve a face into the pumpkin, use the shears on the side you want to carve.=カボチャに顔を彫るには、彫りたい方の面にハサミを使います。
To carve a pumpkin, use the shears on the side you want the face to appear.=カボチャに顔を彫るには、彫りたい方の面にハサミを使います。
Use the “Place” key on an animal to try to feed it wheat.=動物に「配置」キーを使って、小麦を与えてみましょう。
Grows on farmland=耕地に生育
Turns block into farmland=ブロックを耕地にする

View File

@ -64,10 +64,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=Niedojrzała łodyga dyni (etap @1)
Mature Pumpkin Stem=Dojrzała łodyga dyni
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=Dojrzała łodyga dyni próbuje postawić dynię na jednym z czterech sąsiadujących bloków. Dynia może wyrosnąć tylko na polu uprawnym, ziemi lub bloku trawy. Gdy dynia jest obok łodygi dyni, ugina się ona i łączy z dynią. Z połączonej łodygi dyni nie może wyrosnąć kolejna dynia. Jak tylko wszystkie pobliskie dynie są usunięte, traci ona połączenie i może z niej wyrosnąć następna dynia.
Faceless Pumpkin=Dynia bez twarzy
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=Dynia bez twarzy jest blokiem dekoracyjnym. Może być pokrojona nożycami aby otrzymać nasiona dyni.
Pumpkin=Dynia
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=Dynia może być noszona jak hełm. Dynie rosną z łodygi dyni, która z kolei rośnie z nasion dyni.
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=Dynia jest blokiem dekoracyjnym. Może być pokrojona nożycami aby otrzymać wydrążoną dynię i nasiona dyni.
Carved Pumpkin=Wydrążona dynia
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=Wydrążona dynia jest blokiem dekoracyjnym, który może być użyty do przywołania śnieżnych i żelaznych golemów. Może być też noszona jak hełm. Jest otrzymywana poprzez wydrążenie zwykłej dyni nożycami.
Jack o'Lantern=Świecąca dynia
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=Świecąca dynia jest tradycyjną dekoracją Halloween wykonaną z dyni, która jasno świeci.
Pumpkin Pie=Ciasto z dyni
@ -90,7 +90,7 @@ Cookie=Ciastko
Bread=Chleb
Hay Bale=Bela siana
Hay bales are decorative blocks made from wheat.=Bele siana są blokami dekoracyjnymi wytwarzanymi ze zboża.
To carve a face into the pumpkin, use the shears on the side you want to carve.=Aby wyrzeźbić twarz w dyni, użyj nożyc na boku w którym chcesz wyrzeźbić.
To carve a pumpkin, use the shears on the side you want the face to appear.=Aby wyrzeźbić twarz w dyni, użyj nożyc na boku w którym chcesz wyrzeźbić.
Use the “Place” key on an animal to try to feed it wheat.=Użyj przycisku "Umieść" na zwierzęciu, aby spróbować je nakarmić.
Grows on farmland=Rośnie na polu uprawnym
Turns block into farmland=Zamienia blok w pole uprawne

View File

@ -64,10 +64,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=Молодой стебель тыквы (стадия @1)
Mature Pumpkin Stem=Созревший тыквенный стебель
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=Зрелый стебель тыквы пытается вырастить тыкву на одном из четырех соседних блоков. Тыква может расти только на грядках, грязи или на травяном блоке. Когда тыква находится рядом со стеблем, он сразу же изгибается и соединяется с ней. При этом стебель не может выращивать другую тыкву. И только когда все тыквы вокруг стебля убраны, он будет готов вырастить другую тыкву.
Faceless Pumpkin=Тыква
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=Тыква это декоративный блок. Её можно разрезать ножницами для получения семян тыквы.
Pumpkin=Вырезанная тыква
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=Вырезанную тыкву можно носить как шлем. Тыквы растут из тыквенных стеблей, которые растут из семян тыквы.
Pumpkin=Тыква
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=Тыква это декоративный блок. Её можно разрезать ножницами для получения семян тыквы.
Carved Pumpkin=Вырезанная тыква
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=Вырезанную тыкву можно носить как шлем. Тыквы растут из тыквенных стеблей, которые растут из семян тыквы.
Jack o'Lantern=Светильник Джека
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=Светильник Джека это традиционное украшение на Хеллоуин, изготавливаемое из тыквы. Он ярко светит.
Pumpkin Pie=Тыквенный пирог
@ -93,7 +93,7 @@ Cookie=Печенье
Bread=Хлеб
Hay Bale=Сноп сена
Hay bales are decorative blocks made from wheat.=Сноп сена - декоративный блок сделанный из пшеницы.
To carve a face into the pumpkin, use the shears on the side you want to carve.=Чтобы вырезать лицо на тыкве примените ножницы к выбранной стороне тыквы.
To carve a pumpkin, use the shears on the side you want the face to appear.=Чтобы вырезать лицо на тыкве примените ножницы к выбранной стороне тыквы.
Use the “Place” key on an animal to try to feed it wheat.=Нажмите клавишу [Использовать] на животном, чтобы попытаться покормить его пшеницей.
Grows on farmland=Прорастает на грядке
Turns block into farmland=Делает из блока грядку

View File

@ -63,10 +63,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=成長中的南瓜莖(第@1階段
Mature Pumpkin Stem=成熟的南瓜莖
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=一個成熟的南瓜莖試圖在其四個相鄰的區塊之一長出一個南瓜。南瓜只能生長在農田、泥土或草塊的上面。當南瓜挨著南瓜莖時,南瓜莖會立即彎曲並連接到該南瓜上。連接的南瓜莖不能再長出另一個南瓜。只要南瓜莖周圍的所有南瓜都被移走,它就失去了連接,可以再長出一個南瓜。
Faceless Pumpkin=南瓜
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=南瓜是一種裝飾方塊。它可以用剪刀進行雕刻,以獲得南瓜種子。
Pumpkin=雕刻過的南瓜
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=南瓜可以作為頭盔佩戴。南瓜由南瓜莖生長,而南瓜莖又由南瓜種子生長。
Pumpkin=南瓜
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=南瓜是一種裝飾方塊。它可以用剪刀進行雕刻,以獲得南瓜種子。
Carved Pumpkin=雕刻過的南瓜
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=南瓜可以作為頭盔佩戴。南瓜由南瓜莖生長,而南瓜莖又由南瓜種子生長。
Jack o'Lantern=南瓜燈
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=南瓜燈是由南瓜製成的傳統萬聖節裝飾。它發出明亮的光芒。
Pumpkin Pie=南瓜派
@ -89,7 +89,7 @@ Cookie=餅乾
Bread=面包
Hay Bale=乾草捆
Hay bales are decorative blocks made from wheat.=乾草捆是用小麥製成的裝飾方塊。
To carve a face into the pumpkin, use the shears on the side you want to carve.=要在南瓜上雕刻,請將剪刀放在你要雕刻的一側。
To carve a pumpkin, use the shears on the side you want the face to appear.=要在南瓜上雕刻,請將剪刀放在你要雕刻的一側。
Use the “Place” key on an animal to try to feed it wheat.=在動物身上使用「放置」鍵以嘗試給它餵食小麥。
Grows on farmland=在農田上生長
Turns block into farmland=把方塊變成農田

View File

@ -64,10 +64,10 @@ Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is
Premature Pumpkin Stem (Stage @1)=
Mature Pumpkin Stem=
A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=
Faceless Pumpkin=
A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=
Pumpkin=
A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=
A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds.=
Carved Pumpkin=
A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.=
Jack o'Lantern=
A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=
Pumpkin Pie=
@ -93,7 +93,7 @@ Cookie=
Bread=
Hay Bale=
Hay bales are decorative blocks made from wheat.=
To carve a face into the pumpkin, use the shears on the side you want to carve.=
To carve a pumpkin, use the shears on the side you want the face to appear.=
Use the “Place” key on an animal to try to feed it wheat.=
Grows on farmland=
Turns block into farmland=

View File

@ -93,9 +93,9 @@ local stem_def = {
-- Template for pumpkin
local pumpkin_base_def = {
description = S("Faceless Pumpkin"),
_doc_items_longdesc = S("A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds."),
_doc_items_usagehelp = S("To carve a face into the pumpkin, use the shears on the side you want to carve."),
description = S("Pumpkin"),
_doc_items_longdesc = S("A pumpkin is a decorative block. It can be carved with shears to obtain a carved pumpkin and pumpkin seeds."),
_doc_items_usagehelp = S("To carve a pumpkin, use the shears on the side you want the face to appear."),
stack_max = 64,
paramtype2 = "facedir",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
@ -110,8 +110,8 @@ local pumpkin_base_def = {
}
local pumpkin_face_base_def = table.copy(pumpkin_base_def)
pumpkin_face_base_def.description = S("Pumpkin")
pumpkin_face_base_def._doc_items_longdesc = S("A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.")
pumpkin_face_base_def.description = S("Carved Pumpkin")
pumpkin_face_base_def._doc_items_longdesc = S("A carved pumpkin is a decorative block that can be used to summon snow and iron golems. It can also be worn as a helmet. It is made from shearing a pumpkin.")
pumpkin_face_base_def._doc_items_usagehelp = nil
pumpkin_face_base_def.tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"}
pumpkin_face_base_def.groups.armor=1

View File

@ -44,7 +44,7 @@ minetest.register_node("mcl_farming:soil_wet", {
end,
groups = {handy=1,shovely=1, not_in_creative_inventory=1, dirtifies_below_solid=1, dirtifier=1, soil=3, soil_sapling=1 },
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_blast_resistance = 0.5,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})

View File

@ -92,6 +92,7 @@ minetest.register_node("mcl_farming:wheat", {
_mcl_fortune_drop = {
discrete_uniform_distribution = true,
items = {"mcl_farming:wheat_seeds"},
drop_without_fortune = {"mcl_farming:wheat_item"},
min_count = 1,
max_count = 6,
cap = 7

View File

@ -31,8 +31,8 @@ local lectern_def = {
walkable = true,
is_ground_content = false,
node_placement_prediction = "",
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5,
selection_box = {
type = "fixed",
fixed = {

View File

@ -60,7 +60,8 @@ local rod_def = {
return minetest.item_place(itemstack, placer, pointed_thing, param2)
end,
_mcl_blast_resistance = 0,
_mcl_blast_resistance = 6,
_mcl_hardness = 3,
}
minetest.register_node("mcl_lightning_rods:rod", rod_def)

View File

@ -221,7 +221,7 @@ local wlroots = {
liquids_pointable = true,
drop = "mcl_mangrove:mangrove_roots",
groups = {
handy = 1, hoey = 1, water=3, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, waterlogged = 1, not_in_creative_inventory=1 },
handy = 1, hoey = 1, water=4, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, not_in_creative_inventory=1 },
_mcl_blast_resistance = 100,
_mcl_hardness = -1, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
on_construct = function(pos)
@ -322,14 +322,14 @@ mcl_stairs.register_stair("mangrove_wood", "mcl_mangrove:mangrove_wood",
{handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
{"mcl_mangrove_planks.png"},
S("Mangrove Wood Stairs"),
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
"woodlike")
mcl_stairs.register_slab("mangrove_wood", "mcl_mangrove:mangrove_wood",
{handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
{"mcl_mangrove_planks.png"},
S("Mangrove Wood Slab"),
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
S("Double Mangrove Wood Slab"))
minetest.register_craft({

View File

@ -155,6 +155,7 @@ local function drink_milk_delayed(itemstack, player, pointed_thing)
mcl_hunger.stop_poison(player)
end
mcl_potions._reset_effects(player)
mcl_weather.skycolor.update_player_sky_color(player)
end
-- Wrapper for handling mcl_hunger delayed eating

View File

@ -10,10 +10,15 @@ local function spawn_silverfish(pos, oldnode, oldmetadata, digger)
end
-- Template function for registering monster egg blocks
local function register_block(subname, description, tiles, is_ground_content)
local function register_block(subname, description, tiles, is_ground_content, hardness_override)
if is_ground_content == nil then
is_ground_content = false
end
-- Default hardness matches for stone and stone brick variants; cobble has 1.0
local hardness = 0.75
if hardness_override then
hardness = hardness_override
end
minetest.register_node("mcl_monster_eggs:monster_egg_"..subname, {
description = description,
tiles = tiles,
@ -24,14 +29,14 @@ local function register_block(subname, description, tiles, is_ground_content)
after_dig_node = spawn_silverfish,
_tt_help = S("Hides a silverfish"),
_doc_items_longdesc = S("An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart."),
_mcl_hardness = 0,
_mcl_blast_resistance = 0.5,
_mcl_hardness = hardness,
_mcl_blast_resistance = 0.75,
})
end
-- Register all the monster egg blocks
register_block("stone", S("Infested Stone"), {"default_stone.png"}, true)
register_block("cobble", S("Infested Cobblestone"), {"default_cobble.png"})
register_block("cobble", S("Infested Cobblestone"), {"default_cobble.png"}, nil, 1.0)
register_block("stonebrick", S("Infested Stone Bricks"), {"default_stone_brick.png"})
register_block("stonebrickcracked", S("Infested Cracked Stone Bricks"), {"mcl_core_stonebrick_cracked.png"})
register_block("stonebrickmossy", S("Infested Mossy Stone Bricks"), {"mcl_core_stonebrick_mossy.png"})

View File

@ -259,8 +259,8 @@ minetest.register_node("mcl_nether:quartz_smooth", {
tiles = {"mcl_nether_quartz_block_bottom.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
minetest.register_craftitem("mcl_nether:glowstone_dust", {

View File

@ -81,7 +81,8 @@ end
-- Is this water?
-- Returns the liquidtype, if indeed water.
function kelp.is_submerged(node)
if mt_get_item_group(node.name, "water") ~= 0 then
local g = mt_get_item_group(node.name, "water")
if g > 0 and g <= 3 then
-- Expected only "source" and "flowing" from water liquids
return mt_registered_nodes[node.name].liquidtype
end
@ -267,8 +268,7 @@ function kelp.next_height(pos, node, pos_tip, node_tip, submerged, downward_flow
-- Flowing liquid: Grow 1 step, but also turn the tip node into a liquid source.
if downward_flowing then
local alt_liq = mt_registered_nodes[node_tip.name].liquid_alternative_source
local alt_liq_accessible = mt_get_item_group(node_tip.name,"waterlogged") -- returns 0 if it isn't waterlogged.
if alt_liq and not alt_liq_accessible then
if alt_liq and mt_registered_nodes[alt_liq] then
mt_set_node(pos_tip, {name=alt_liq})
end
end

View File

@ -492,7 +492,7 @@ mcl_potions.register_effect({
end,
on_step = function(dtime, object, factor, duration)
if object:get_meta():get_int("night_vision") ~= 1 then
local flash = EF.darkness[object].flash
local flash = EF.darkness[object].flash or 0
if flash < 0.2 then EF.darkness[object].flashdir = true
elseif flash > 0.6 then EF.darkness[object].flashdir = false end
flash = EF.darkness[object].flashdir and (flash + dtime) or (flash - dtime)
@ -1260,7 +1260,11 @@ local function potions_init_icons(player)
})
table.insert(icon_ids[name], id)
end
hb.init_hudbar(player, "absorption")
-- Absorption bar in damage disabled server is unneccessary
if minetest.settings:get_bool("enable_damage") == true then
hb.init_hudbar(player, "absorption")
end
end
local function potions_set_icons(player)

View File

@ -61,10 +61,9 @@ minetest.register_craftitem("mcl_potions:glass_bottle", {
local def = minetest.registered_nodes[node.name]
-- Call on_rightclick if the pointed node defines it
if placer and not placer:get_player_control().sneak then
if def and def.on_rightclick then
return def.on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
end
local new_stack = mcl_util.call_on_rightclick(itemstack, placer, pointed_thing)
if new_stack and new_stack ~= itemstack then
return new_stack
end
-- Try to fill glass bottle with water
@ -226,10 +225,9 @@ local function water_bottle_on_place(itemstack, placer, pointed_thing)
local def = minetest.registered_nodes[node.name]
-- Call on_rightclick if the pointed node defines it
if placer and not placer:get_player_control().sneak then
if def and def.on_rightclick then
return def.on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
end
local new_stack = mcl_util.call_on_rightclick(itemstack, placer, pointed_thing)
if new_stack and new_stack ~= itemstack then
return new_stack
end
local cauldron = nil
@ -239,11 +237,10 @@ local function water_bottle_on_place(itemstack, placer, pointed_thing)
cauldron = fill_cauldron(node.name, "mclx_core:river_water_source")
end
if cauldron then
set_node_empty_bottle(itemstack, placer, pointed_thing, cauldron)
return set_node_empty_bottle(itemstack, placer, pointed_thing, cauldron)
elseif node.name == "mcl_core:dirt" or node.name == "mcl_core:coarse_dirt" then
set_node_empty_bottle(itemstack, placer, pointed_thing, "mcl_mud:mud")
return set_node_empty_bottle(itemstack, placer, pointed_thing, "mcl_mud:mud")
end
end

View File

@ -194,7 +194,7 @@ minetest.register_node("mcl_sculk:sculk", {
is_ground_content = false,
on_destruct = sculk_on_destruct,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.6,
_mcl_hardness = 0.2,
_mcl_silk_touch_drop = true,
})

View File

@ -155,7 +155,7 @@ minetest.register_node("mcl_sponges:sponge_wet", {
buildable_to = false,
stack_max = 64,
sounds = mcl_sounds.node_sound_dirt_defaults(),
groups = {handy=1, hoey=1, waterlogged = 1, building_block=1},
groups = {handy=1, hoey=1, building_block=1},
on_place = place_wet_sponge,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
@ -175,7 +175,7 @@ if minetest.get_modpath("mclx_core") then
buildable_to = false,
stack_max = 64,
sounds = mcl_sounds.node_sound_dirt_defaults(),
groups = {handy=1, waterlogged = 1, building_block=1},
groups = {handy=1, building_block=1},
on_place = place_wet_sponge,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,

View File

@ -11,7 +11,8 @@ mcl_stairs.register_stair_and_slab_simple("platinum", "example:platinum", "Plati
```
## `mcl_stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab, double_description, corner_stair_texture_override)`
Register a simple stair and a slab. The stair and slab will inherit all attributes from `sourcenode`. The `sourcenode` is also used as the item for crafting recipes.
Register a simple stair and a slab. The stair and slab will inherit all attributes from `sourcenode`. The `sourcenode` is also used as the item for crafting recipes. If multiple nodes should craft into the same stairs/slab, see
`mcl_stairs.register_craft_stairs` or `mcl_stairs.register_craft_slab`
This function is meant for simple nodes; if you need more flexibility, use one of the other functions instead.
@ -44,7 +45,7 @@ The itemstrings for the registered nodes will be of the form:
### Parameters
* `subname`: Name fragment for node itemstrings (see above)
* `recipeitem`: Item for crafting recipe. Use `group:` prefix to use a group instead
* `recipeitem`: Item for crafting recipe and attribute inheritance. Do not use `group:` prefix here, alternative recipes can be registered using `mcl_stairs.register_craft_stairs(subname, recipeitem_or_group)`.
* `groups`: Groups used for stair
* `images`: Textures
* `description`: Stair description/tooltip
@ -81,3 +82,35 @@ The itemstrings for the registered nodes will be of the form:
* `double_description`: Node description/tooltip for double slab
* Other parameters: Same as for `register_stair`
## `mcl_stairs.register_craft_stairs(subname, recipeitem)`
Just registers a recipe for `mcl_stairs:stair_<subname>`.
Useful if a node variant should craft the same stairs as the base node, since the above functions use the same
parameter for crafting material and attribute inheritance.
e.g. 6 Purpur Pillar -> 4 Purpur Stairs is an alternate recipe.
Creates staircase recipes with 6 input items, both left-facing and right-facing. Outputs 4 stairs.
The itemstring for the output node will be of the form:
* `mcl_stairs:stair_<subname>`: Normal stair
### Parameters
* `subname`: Name fragment for node itemstring (see above)
* `recipeitem`: Item for crafting recipe. Use `group:` prefix to use a group instead
## `mcl_stairs.register_craft_slab(subname, recipeitem)`
Just registers a recipe for `mcl_stairs:slab_<subname>`.
Useful if a node variant should craft the same stairs as the base node, since the above functions use the same
parameter for crafting material and attribute inheritance.
e.g. 3 Quartz Pillar -> 6 Quartz Slab is an alternate recipe.
Creates slab recipe with 3 input items in any horizontal line. Outputs 6 slabs.
The itemstring for the output node will be of the form:
* `mcl_stairs:slab_<subname>`: Slab
### Parameters
* `subname`: Name fragment for node itemstring (see above)
* `recipeitem`: Item for crafting recipe. Use `group:` prefix to use a group instead

View File

@ -1,10 +1,39 @@
-- Register all Minecraft stairs and slabs
-- Note about hardness: For some reason, the hardness of slabs and stairs don't always match nicely, so that some
-- slabs actually take slightly longer to be dug than their stair counterparts.
-- Note sure if it is a good idea to preserve this oddity.
local S = minetest.get_translator(minetest.get_current_modname())
-- Cut Sandstone Stairs do not exist, and register_stair_and_slab does not allow multiple recipes
-- (e.g. using group:node) if we try to copy the properties of the node at the same parameter.
-- The missing recipes can be added separately via these:
function mcl_stairs.register_craft_stairs(subname, recipeitem)
minetest.register_craft({
output = "mcl_stairs:stair_" .. subname .. " 4",
recipe = {
{recipeitem, "", ""},
{recipeitem, recipeitem, ""},
{recipeitem, recipeitem, recipeitem},
},
})
-- Flipped recipe
minetest.register_craft({
output = "mcl_stairs:stair_" .. subname .. " 4",
recipe = {
{"", "", recipeitem},
{"", recipeitem, recipeitem},
{recipeitem, recipeitem, recipeitem},
},
})
end
function mcl_stairs.register_craft_slab(subname, recipeitem)
minetest.register_craft({
output = "mcl_stairs:slab_" .. subname .. " 6",
recipe = {
{recipeitem, recipeitem, recipeitem},
},
})
end
local woods = {
{ "wood", "default_wood.png", S("Oak Wood Stairs"), S("Oak Wood Slab"), S("Double Oak Wood Slab") },
{ "junglewood", "default_junglewood.png", S("Jungle Wood Stairs"), S("Jungle Wood Slab"), S("Double Jungle Wood Slab") },
@ -20,13 +49,13 @@ for w=1, #woods do
{handy=1,axey=1, flammable=3,wood_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
{wood[2]},
wood[3],
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
"woodlike")
mcl_stairs.register_slab(wood[1], "mcl_core:"..wood[1],
{handy=1,axey=1, flammable=3,wood_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
{wood[2]},
wood[4],
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
wood[5])
end
@ -47,7 +76,7 @@ mcl_stairs.register_slab("stone", "mcl_core:stone_smooth",
{pickaxey=1, material_stone=1},
{"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"},
S("Polished Stone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Polished Stone Slab"))
mcl_stairs.register_stair("andesite", "mcl_core:andesite",
@ -86,118 +115,95 @@ mcl_stairs.register_slab("diorite", "mcl_core:diorite",
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Diorite Slab"))
mcl_stairs.register_stair("cobble", "mcl_core:cobble",
mcl_stairs.register_stair_and_slab("cobble", "mcl_core:cobble",
{pickaxey=1, material_stone=1},
{"default_cobble.png"},
S("Cobblestone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("cobble", "mcl_core:cobble",
{pickaxey=1, material_stone=1},
{"default_cobble.png"},
S("Cobblestone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Cobblestone Slab"))
mcl_stairs.register_stair("mossycobble", "mcl_core:mossycobble",
mcl_stairs.register_stair_and_slab("mossycobble", "mcl_core:mossycobble",
{pickaxey=1, material_stone=1},
{"default_mossycobble.png"},
S("Mossy Cobblestone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("mossycobble", "mcl_core:mossycobble",
{pickaxey=1, material_stone=1},
{"default_mossycobble.png"},
S("Mossy Cobblestone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Mossy Cobblestone Slab"))
mcl_stairs.register_stair("brick_block", "mcl_core:brick_block",
mcl_stairs.register_stair_and_slab("brick_block", "mcl_core:brick_block",
{pickaxey=1, material_stone=1},
{"default_brick.png"},
S("Brick Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("brick_block", "mcl_core:brick_block",
{pickaxey=1, material_stone=1},
{"default_brick.png"},
S("Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Brick Slab"))
mcl_stairs.register_stair("sandstone", "mcl_core:sandstone",
mcl_stairs.register_stair_and_slab("sandstone", "mcl_core:sandstone",
{pickaxey=1, material_stone=1},
{"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"},
S("Sandstone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8,
nil, "mcl_core:sandstone") --fixme: extra parameter from previous release
mcl_stairs.register_slab("sandstone", "mcl_core:sandstone",
{pickaxey=1, material_stone=1},
{"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"},
S("Sandstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Sandstone Slab"), "mcl_core:sandstone") --fixme: extra parameter from previous release
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Sandstone Slab"))
mcl_stairs.register_craft_stairs("sandstone", "mcl_core:sandstonesmooth") -- Comment this line out if Cut Sandstone Stairs are implemented
mcl_stairs.register_craft_stairs("sandstone", "mcl_core:sandstonecarved")
mcl_stairs.register_craft_slab("sandstone", "mcl_core:sandstonecarved")
mcl_stairs.register_stair("sandstonesmooth2", "mcl_core:sandstonesmooth2",
{pickaxey=1, material_stone=1},
{"mcl_core_sandstone_top.png"},
S("Smooth Sandstone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("sandstonesmooth2", "mcl_core:sandstonesmooth2",
{pickaxey=1, material_stone=1},
{"mcl_core_sandstone_top.png"},
S("Smooth Sandstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Smooth Sandstone Slab"))
-- mcl_stairs.register_stair_and_slab("sandstonesmooth", "mcl_core:sandstonesmooth",
-- {pickaxey=1, material_stone=1},
-- {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_smooth.png"},
-- S("Cut Sandstone Stairs"), S("Cut Sandstone Slab"),
-- mcl_sounds.node_sound_stone_defaults(), nil, nil,
-- S("Double Cut Sandstone Slab"))
mcl_stairs.register_stair("redsandstone", "mcl_core:redsandstone",
mcl_stairs.register_stair_and_slab_simple("sandstonesmooth2", "mcl_core:sandstonesmooth2", S("Smooth Sandstone Stairs"), S("Smooth Sandstone Slab"), S("Double Smooth Sandstone Slab"))
mcl_stairs.register_stair_and_slab("redsandstone", "mcl_core:redsandstone",
{pickaxey=1, material_stone=1},
{"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"},
S("Red Sandstone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8,
nil, "mcl_core:redsandstone") --fixme: extra parameter from previous release
mcl_stairs.register_slab("redsandstone", "mcl_core:redsandstone",
{pickaxey=1, material_stone=1},
{"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"},
S("Red Sandstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Red Sandstone Slab"), "mcl_core:redsandstone") --fixme: extra parameter from previous release
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Red Sandstone Slab"))
mcl_stairs.register_craft_stairs("redsandstone", "mcl_core:redsandstonesmooth") -- Comment this line out if Cut Red Sandstone Stairs are implemented
mcl_stairs.register_craft_stairs("redsandstone", "mcl_core:redsandstonecarved")
mcl_stairs.register_craft_slab("redsandstone", "mcl_core:redsandstonecarved")
mcl_stairs.register_stair("redsandstonesmooth2", "mcl_core:redsandstonesmooth2",
{pickaxey=1, material_stone=1},
{"mcl_core_red_sandstone_top.png"},
S("Smooth Red Sandstone Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8)
mcl_stairs.register_slab("redsandstonesmooth2", "mcl_core:redsandstonesmooth2",
{pickaxey=1, material_stone=1},
{"mcl_core_red_sandstone_top.png"},
S("Smooth Red Sandstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Smooth Red Sandstone Slab"))
-- mcl_stairs.register_stair_and_slab("redsandstonesmooth", "mcl_core:redsandstonesmooth",
-- {pickaxey=1, material_stone=1},
-- {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_smooth.png"},
-- S("Cut Red Sandstone Stairs"), S("Cut Red Sandstone Slab"),
-- mcl_sounds.node_sound_stone_defaults(), nil, nil,
-- S("Double Cut Red Sandstone Slab"))
mcl_stairs.register_stair_and_slab_simple("redsandstonesmooth2", "mcl_core:redsandstonesmooth2", S("Smooth Red Sandstone Stairs"), S("Smooth Red Sandstone Slab"), S("Double Smooth Red Sandstone Slab"))
-- Intentionally not group:stonebrick because of mclx_stairs
mcl_stairs.register_stair("stonebrick", "mcl_core:stonebrick",
{pickaxey=1, material_stone=1},
{"default_stone_brick.png"},
S("Stone Bricks Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil, "mcl_core:stonebrick") --fixme: extra parameter from previous release
mcl_sounds.node_sound_stone_defaults(), nil, nil,
nil)
mcl_stairs.register_slab("stonebrick", "mcl_core:stonebrick",
{pickaxey=1, material_stone=1},
{"default_stone_brick.png"},
S("Stone Bricks Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Stone Bricks Slab"), "mcl_core:stonebrick") --fixme: extra parameter from previous release
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Stone Bricks Slab"))
mcl_stairs.register_stair("quartzblock", "mcl_nether:quartz_block",
mcl_stairs.register_stair_and_slab("quartzblock", "mcl_nether:quartz_block",
{pickaxey=1, material_stone=1},
{"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"},
S("Quartz Stairs"),
mcl_sounds.node_sound_stone_defaults(), 0.8, 0.8,
nil, "mcl_nether:quartz_block") --fixme: extra parameter from previous release
mcl_stairs.register_slab("quartzblock", "mcl_nether:quartz_block",
{pickaxey=1, material_stone=1},
{"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"},
S("Quartz Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Quartz Slab"), "mcl_nether:quartz_block") --fixme: extra parameter from previous release
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Quartz Slab"))
mcl_stairs.register_craft_stairs("quartzblock", "mcl_nether:quartz_pillar")
mcl_stairs.register_craft_stairs("quartzblock", "mcl_nether:quartz_chiseled")
mcl_stairs.register_craft_slab("quartzblock", "mcl_nether:quartz_pillar")
mcl_stairs.register_craft_slab("quartzblock", "mcl_nether:quartz_chiseled")
mcl_stairs.register_stair("quartz_smooth", "mcl_nether:quartz_smooth",
{pickaxey=1, material_stone=1},
@ -216,14 +222,14 @@ mcl_stairs.register_stair_and_slab("nether_brick", "mcl_nether:nether_brick",
{"mcl_nether_nether_brick.png"},
S("Nether Brick Stairs"),
S("Nether Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Nether Brick Slab"), nil)
mcl_stairs.register_stair_and_slab("red_nether_brick", "mcl_nether:red_nether_brick",
{pickaxey=1, material_stone=1},
{"mcl_nether_red_nether_brick.png"},
S("Red Nether Brick Stairs"),
S("Red Nether Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Red Nether Brick Slab"), nil)
mcl_stairs.register_stair_and_slab("end_bricks", "mcl_end:end_bricks",
@ -234,18 +240,15 @@ mcl_stairs.register_stair_and_slab("end_bricks", "mcl_end:end_bricks",
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double End Stone Brick Slab"), nil)
mcl_stairs.register_stair("purpur_block", "mcl_end:purpur_block",
mcl_stairs.register_stair_and_slab("purpur_block", "mcl_end:purpur_block",
{pickaxey=1, material_stone=1},
{"mcl_end_purpur_block.png"},
S("Purpur Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
nil)
mcl_stairs.register_slab("purpur_block", "mcl_end:purpur_block",
{pickaxey=1, material_stone=1},
{"mcl_end_purpur_block.png"},
S("Purpur Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Purpur Slab"))
mcl_stairs.register_craft_stairs("purpur_block", "mcl_end:purpur_pillar")
mcl_stairs.register_craft_slab("purpur_block", "mcl_end:purpur_pillar")
mcl_stairs.register_stair("prismarine", "mcl_ocean:prismarine",
{pickaxey=1, material_stone=1},
@ -298,52 +301,52 @@ mcl_stairs.register_slab("andesite_smooth", "mcl_core:andesite_smooth",
{pickaxey=1},
{"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"},
S("Polished Andesite Slab"),
nil, 6, nil,
nil, nil, nil,
S("Double Polished Andesite Slab"))
mcl_stairs.register_stair("andesite_smooth", "mcl_core:andesite_smooth",
{pickaxey=1},
{"mcl_stairs_andesite_smooth_slab.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"},
S("Polished Andesite Stairs"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_slab("granite_smooth", "mcl_core:granite_smooth",
{pickaxey=1},
{"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"},
S("Polished Granite Slab"),
nil, 6, nil,
nil, nil, nil,
S("Double Polished Granite Slab"))
mcl_stairs.register_stair("granite_smooth", "mcl_core:granite_smooth",
{pickaxey=1},
{"mcl_stairs_granite_smooth_slab.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"},
S("Polished Granite Stairs"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_slab("diorite_smooth", "mcl_core:diorite_smooth",
{pickaxey=1},
{"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"},
S("Polished Diorite Slab"),
nil, 6, nil,
nil, nil, nil,
S("Double Polished Diorite Slab"))
mcl_stairs.register_stair("diorite_smooth", "mcl_core:diorite_smooth",
{pickaxey=1},
{"mcl_stairs_diorite_smooth_slab.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"},
S("Polished Diorite Stairs"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("stonebrickmossy", "mcl_core:stonebrickmossy",
{pickaxey=1},
{"mcl_core_stonebrick_mossy.png"},
S("Mossy Stone Brick Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
nil)
mcl_stairs.register_slab("stonebrickmossy", "mcl_core:stonebrickmossy",
{pickaxey=1},
{"mcl_core_stonebrick_mossy.png"},
S("Mossy Stone Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Mossy Stone Brick Slab"), "mcl_core:stonebrickmossy") --fixme: extra parameter from previous release
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Mossy Stone Brick Slab"))

View File

@ -116,6 +116,7 @@ minetest.register_node("mcl_tnt:tnt", {
local TNT = {
-- Static definition
physical = true, -- Collides with things
collide_with_objects = false,
--weight = -100,
collisionbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
visual = "cube",

View File

@ -22,13 +22,13 @@ for b=1, #barks do
{handy=1,axey=1, flammable=3, bark_stairs=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
{minetest.registered_nodes[id].tiles[3]},
bark[2],
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
"woodlike")
mcl_stairs.register_slab(sub, id,
{handy=1,axey=1, flammable=3, bark_slab=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
{minetest.registered_nodes[id].tiles[3]},
bark[3],
mcl_sounds.node_sound_wood_defaults(), 3, 2,
mcl_sounds.node_sound_wood_defaults(), nil, nil,
bark[4])
end
@ -42,7 +42,7 @@ mcl_stairs.register_stair("lapisblock", "mcl_core:lapisblock",
{pickaxey=3},
{"mcl_stairs_lapis_block_slab.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"},
S("Lapis Lazuli Stairs"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_slab("goldblock", "mcl_core:goldblock",
@ -55,7 +55,7 @@ mcl_stairs.register_stair("goldblock", "mcl_core:goldblock",
{pickaxey=4},
{"mcl_stairs_gold_block_slab.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"},
S("Stairs of Gold"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_slab("ironblock", "mcl_core:ironblock",
@ -68,21 +68,21 @@ mcl_stairs.register_stair("ironblock", "mcl_core:ironblock",
{pickaxey=2},
{"mcl_stairs_iron_block_slab.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"},
S("Stairs of Iron"),
nil, 6, nil,
nil, nil, nil,
"woodlike")
mcl_stairs.register_stair("stonebrickcracked", "mcl_core:stonebrickcracked",
{pickaxey=1},
{"mcl_core_stonebrick_cracked.png"},
S("Cracked Stone Brick Stairs"),
mcl_sounds.node_sound_stone_defaults(), 6, 1.5,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
"woodlike")
mcl_stairs.register_slab("stonebrickcracked", "mcl_core:stonebrickcracked",
{pickaxey=1},
{"mcl_core_stonebrick_cracked.png"},
S("Cracked Stone Brick Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
mcl_sounds.node_sound_stone_defaults(), nil, nil,
S("Double Cracked Stone Brick Slab"))
local block = {}

View File

@ -4656,9 +4656,9 @@ local function register_decorations()
place_on = {"group:sand"},
sidelen = 16,
noise_params = {
offset = -0.012,
offset = -0.01,
scale = 0.024,
spread = {x = 100, y = 100, z = 100},
spread = vector.new(100, 100, 100),
seed = 257,
octaves = 3,
persist = 0.6
@ -4672,6 +4672,9 @@ local function register_decorations()
"MesaPlateauFM", "MesaPlateauFM_sandlevel"},
height = 1,
height_max = 3,
spawn_by = "air",
check_offset = 1,
num_spawn_by = 16
})
-- Sugar canes

View File

@ -1,6 +1,5 @@
mcl_structures.registered_structures = {}
local place_queue = {}
local disabled_structures = minetest.settings:get("mcl_disabled_structures")
if disabled_structures then disabled_structures = disabled_structures:split(",")
else disabled_structures = {} end
@ -216,17 +215,6 @@ local function foundation(ground_p1,ground_p2,pos,sidelen)
minetest.bulk_set_node(stone,{name=node_stone})
end
local function process_queue()
if #place_queue < 1 then return end
local s = table.remove(place_queue)
mcl_structures.place_schematic(s.pos, s.file, s.rot, nil, true, "place_center_x,place_center_z",function(s)
if s.after_place then
s.after_place(s.pos,s.def,s.pr)
end
end,s.pr)
minetest.after(0.5,process_queue)
end
function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n,water)
n = n or 1
local sp = {}

View File

@ -407,13 +407,23 @@ minetest.register_globalstep(function(dtime)
set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
end
local underwater
if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and underwater ~= true then
mcl_weather.skycolor.update_sky_color()
local underwater = true
elseif get_item_group(mcl_playerinfo[name].node_head, "water") == 0 and underwater == true then
mcl_weather.skycolor.update_sky_color()
local underwater = false
local playerinfo = mcl_playerinfo[name] or {}
local plusinfo = playerinfo.mcl_playerplus
if not plusinfo then
plusinfo = {}
playerinfo.mcl_playerplus = plusinfo
end
-- Only process if node_head changed
if plusinfo.old_node_head ~= playerinfo.node_head then
local node_head = playerinfo.node_head or ""
local old_node_head = plusinfo.old_node_head or ""
plusinfo.old_node_head = playerinfo.node_head
-- Update skycolor if moving in or out of water
if (get_item_group(node_head, "water") == 0) ~= (get_item_group(old_node_head, "water") == 0) then
mcl_weather.skycolor.update_sky_color()
end
end
elytra.last_yaw = player:get_look_horizontal()
@ -512,23 +522,27 @@ minetest.register_globalstep(function(dtime)
local boots = player:get_inventory():get_stack("armor", 5)
local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed")
if soul_speed > 0 then
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", soul_speed * 0.105 + 1.3)
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3)
else
if node_stand_below == "mcl_core:ice" or node_stand_below == "mcl_core:packed_ice" or node_stand_below == "mcl_core:slimeblock" or node_stand_below == "mcl_core:water_source" then
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", 0.1)
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", 0.1)
else
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", 0.4)
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", 0.4)
end
end
elseif get_item_group(node_feet, "liquid") ~= 0 and mcl_enchanting.get_enchantment(player:get_inventory():get_stack("armor", 5), "depth_strider") then
else
playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:soul_speed")
end
if get_item_group(node_feet, "liquid") ~= 0 and mcl_enchanting.get_enchantment(player:get_inventory():get_stack("armor", 5), "depth_strider") then
local boots = player:get_inventory():get_stack("armor", 5)
local depth_strider = mcl_enchanting.get_enchantment(boots, "depth_strider")
if depth_strider > 0 then
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", (depth_strider / 3) + 0.75)
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:depth_strider", (depth_strider / 3) + 0.75)
else
playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:depth_strider")
end
else
playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:surface")
playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:depth_strider")
end
-- Is player suffocating inside node? (Only for solid full opaque cube type nodes
@ -679,6 +693,8 @@ minetest.register_on_joinplayer(function(player)
player:respawn()
minetest.log("warning", name .. " joined the game with 0 hp and has been forced to respawn")
end
playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:surface")
end)
-- clear when player leaves