1
0
Fork 0

Tweak move physics for liquids, ladders, vines and cobwebs

This commit is contained in:
iliekprogrammar 2022-12-30 20:52:06 +08:00
parent e7ace0c87c
commit 5042b3ea51
No known key found for this signature in database
GPG Key ID: 8E7B20514DBCFBFA
4 changed files with 22 additions and 14 deletions

View File

@ -19,9 +19,9 @@ movement_speed_jump = 6.6
movement_speed_climb = 2.35 movement_speed_climb = 2.35
# TODO: Add descend speed (3.0) when available # TODO: Add descend speed (3.0) when available
movement_liquid_fluidity = 1.13 movement_liquid_fluidity = 0.88
movement_liquid_fluidity_smooth = 0.5 movement_liquid_fluidity_smooth = 0.5
movement_liquid_sink = 23 movement_liquid_sink = 16
movement_gravity = 10.4 movement_gravity = 10.4

View File

@ -24,6 +24,7 @@ minetest.register_node("mcl_core:ladder", {
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
walkable = true, walkable = true,
climbable = true, climbable = true,
move_resistance = 1,
node_box = { node_box = {
type = "wallmounted", type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }, wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 },
@ -32,8 +33,15 @@ minetest.register_node("mcl_core:ladder", {
type = "wallmounted", type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }, wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 },
}, },
collision_box = {
type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 },
},
stack_max = 64, stack_max = 64,
groups = {handy=1,axey=1, attached_node=1, deco_block=1, dig_by_piston=1}, groups = {
handy=1, axey=1, attached_node=1, deco_block=1, dig_by_piston=1,
no_fall_damage=1
},
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
node_placement_prediction = "", node_placement_prediction = "",
-- Restrict placement of ladders -- Restrict placement of ladders
@ -99,6 +107,7 @@ minetest.register_node("mcl_core:vine", {
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
walkable = false, walkable = false,
climbable = true, climbable = true,
move_resistance = 1,
buildable_to = true, buildable_to = true,
selection_box = { selection_box = {
type = "wallmounted", type = "wallmounted",
@ -107,7 +116,7 @@ minetest.register_node("mcl_core:vine", {
groups = { groups = {
handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1, handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1,
dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50, dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50,
flammable = 2, fire_encouragement = 15, fire_flammability = 100 flammable = 2, fire_encouragement = 15, fire_flammability = 100, no_fall_damage=1
}, },
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = "", drop = "",

View File

@ -102,14 +102,18 @@ minetest.register_node("mcl_core:cobweb", {
tiles = {"mcl_core_web.png"}, tiles = {"mcl_core_web.png"},
inventory_image = "mcl_core_web.png", inventory_image = "mcl_core_web.png",
paramtype = "light", paramtype = "light",
liquid_viscosity = 14, liquid_viscosity = 60,
liquidtype = "source", liquidtype = "source",
liquid_alternative_flowing = "mcl_core:cobweb", liquid_alternative_flowing = "mcl_core:cobweb",
liquid_alternative_source = "mcl_core:cobweb", liquid_alternative_source = "mcl_core:cobweb",
liquid_renewable = false, liquid_renewable = false,
liquid_range = 0, liquid_range = 0,
walkable = false, walkable = false,
groups = {swordy_cobweb=1, shearsy_cobweb=1, fake_liquid=1, disable_jump=1, deco_block=1, dig_by_piston=1, dig_by_water=1,destroy_by_lava_flow=1,}, groups = {
swordy_cobweb=1, shearsy_cobweb=1, fake_liquid=1, disable_jump=1,
deco_block=1, dig_by_piston=1, dig_by_water=1,destroy_by_lava_flow=1,
no_fall_damage=1
},
drop = "mcl_mobitems:string", drop = "mcl_mobitems:string",
_mcl_shears_drop = true, _mcl_shears_drop = true,
sounds = mcl_sounds.node_sound_leaves_defaults(), sounds = mcl_sounds.node_sound_leaves_defaults(),

View File

@ -717,19 +717,14 @@ mcl_damage.register_modifier(function(obj, damage, reason)
end end
if minetest.get_item_group(node.name, "water") ~= 0 then if minetest.get_item_group(node.name, "water") ~= 0 then
return 0 return 0
end elseif minetest.get_item_group(node.name, "no_fall_damage") ~= 0 then
if node.name == "mcl_portals:portal_end" then return 0
elseif node.name == "mcl_portals:portal_end" then
if mcl_portals and mcl_portals.end_teleport then if mcl_portals and mcl_portals.end_teleport then
mcl_portals.end_teleport(obj) mcl_portals.end_teleport(obj)
end end
return 0 return 0
end end
if node.name == "mcl_core:cobweb" then
return 0
end
if node.name == "mcl_core:vine" then
return 0
end
end end
pos = vector.add(pos, step) pos = vector.add(pos, step)
node = minetest.get_node(pos) node = minetest.get_node(pos)