---first we join the necessary channels so the mod can "listen" to what the server says
-local weather = minetest.mod_channel_join("weather_nodes")
-local weather_type = minetest.mod_channel_join("weather_type")
-local running_send = minetest.mod_channel_join("running_send")
-local running_receive = minetest.mod_channel_join("running_receive")
-
-
---we load everything seperately because it's easier to work on individual files than have everything jammed into one file
---not into seperate mods because that is unnecessary and cumbersome
-local path = minetest.get_modpath("crafter_client")
-dofile(path.."/weather_handling.lua")
-
---0 is nothing
---1 is up
---2 is down
---4 is left
---8 is right
---16 is jump
---32 is auxilary
---64 is sneak
---128 is left click
---256 is right click
-
---make the data from get_key_pressed usable
---Thanks Thou shalt use my mods!
-function minetest.get_control_bits(player)
- local input = player:get_key_pressed()
- local input_table = {}
- --iterate through the table using the highest value first
- local keys = {"rightclick","leftclick","sneak","aux","jump","right","left","down","up"}
- for index,data in pairs(keys) do
- local modifier = math.pow(2, 9-index)
- if input >= modifier then
- input_table[data] = true
- input = input - modifier
- else
- input_table[data] = false
- end
- end
- return(input_table)
+--declare globals
+weather_intake = nil
+weather = nil
+weather_type = nil
+running_send = nil
+player_movement_state = nil
+nether = nil
+
+function initialize_all()
+ --declare globals for now
+ weather_intake = minetest.mod_channel_join("weather_intake")
+ weather = minetest.mod_channel_join("weather_nodes")
+ weather_type = minetest.mod_channel_join("weather_type")
+ running_send = minetest.mod_channel_join("running_send")
+ player_movement_state = minetest.mod_channel_join("player.player_movement_state")
+ nether = minetest.mod_channel_join("nether_teleporters")
+ aether = minetest.mod_channel_join("aether_teleporters")
+
+ --next we load everything seperately because it's easier to work on individual files than have everything jammed into one file
+ --not into seperate mods because that is unnecessary and cumbersome
+ local path = minetest.get_modpath("crafter_client")
+ dofile(path.."/player_input.lua")
+ dofile(path.."/weather_handling.lua")
+ dofile(path.."/environment_effects.lua")
+ dofile(path.."/nether.lua")
+ dofile(path.."/aether.lua")