From 04e0d1c3004d740fb0f3750e8dd6e9375a95168e Mon Sep 17 00:00:00 2001 From: squiddible <63127872+squidKid-deluxe@users.noreply.github.com> Date: Sat, 2 May 2020 16:32:54 -0400 Subject: [PATCH] Add files via upload --- init.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..3df6db1 --- /dev/null +++ b/init.lua @@ -0,0 +1,28 @@ +local func = function() + local player = minetest.get_player_by_name("singleplayer") + local pos = player:get_pos() + local grav = 1 + if pos.y > 10 then grav = 10/pos.y end + player:set_physics_override({gravity=grav}) + +end + +minetest.register_abm({ + nodenames = { + "air", + "default:stone", + "default:dirt", + "default:sand", + "default:water_source" + }, + neighbors = { + "air", + "default:stone", + "default:dirt", + "default:sand", + "default:water_source" + }, + interval = 1, + chance = 1, + action = func +})