+-- When we create/free a forceload, it's either transient or persistent. We want
+-- to add to/remove from the table that corresponds to the type of forceload, but
+-- we also need the other table because whether we forceload a block depends on
+-- both tables.
+-- This function returns the "primary" table we are adding to/removing from, and
+-- the other table.
+local function get_relevant_tables(transient)
+ if transient then
+ return blocks_temploaded, blocks_forceloaded
+ else
+ return blocks_forceloaded, blocks_temploaded
+ end
+end
+
+function core.forceload_block(pos, transient)
+ -- set changed flag
+ forceload_blocks_changed = true
+