forked from VoxeLibre/VoxeLibre
parent
b239549774
commit
79e8452f62
|
@ -691,7 +691,7 @@ mcl_enchanting.enchantments.soul_speed = {
|
||||||
disallow = {non_combat_armor = true},
|
disallow = {non_combat_armor = true},
|
||||||
incompatible = {frost_walker = true},
|
incompatible = {frost_walker = true},
|
||||||
weight = 2,
|
weight = 2,
|
||||||
description = S("Increases walking speed on soul sand."),
|
description = S("Increases walking speed on soul sand and soul soil."),
|
||||||
curse = false,
|
curse = false,
|
||||||
on_enchant = function() end,
|
on_enchant = function() end,
|
||||||
requires_tool = false,
|
requires_tool = false,
|
||||||
|
|
|
@ -514,13 +514,18 @@ minetest.register_globalstep(function(dtime)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots)
|
local boots = player:get_inventory():get_stack("armor", 5)
|
||||||
if node_stand == "mcl_nether:soul_sand" then
|
local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed")
|
||||||
|
|
||||||
|
-- Standing on soul soil? If so, apply Soul Speed bonus
|
||||||
|
if node_stand == "mcl_blackstone:soul_soil" and soul_speed > 0 then
|
||||||
|
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3)
|
||||||
|
|
||||||
|
-- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots, then apply bonus)
|
||||||
|
elseif node_stand == "mcl_nether:soul_sand" then
|
||||||
-- TODO: Tweak walk speed
|
-- TODO: Tweak walk speed
|
||||||
-- TODO: Also slow down mobs
|
-- TODO: Also slow down mobs
|
||||||
-- Slow down even more when soul sand is above certain block
|
-- Slow down even more when soul sand is above certain block
|
||||||
local boots = player:get_inventory():get_stack("armor", 5)
|
|
||||||
local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed")
|
|
||||||
if soul_speed > 0 then
|
if soul_speed > 0 then
|
||||||
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3)
|
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue