petz forceload #6345

Open
opened 2024-02-24 21:31:12 +01:00 by AliasAlreadyTaken · 4 comments

The petz home teleport feature permanently forceloads mapblocks, without ever releasing them again.

The petz home teleport feature permanently forceloads mapblocks, without ever releasing them again.
AliasAlreadyTaken added the
1. kind/bug
3. source/mod upstream
3. source/petz
labels 2024-02-24 21:31:27 +01:00
Member
  • It should set transient arg to true in minetest.forceload_block(pos, transient) call
  • It should use same coords when calling forceload_block and forceload_free_block

(assuming that code is needed at all)

- It should set transient arg to true in `minetest.forceload_block(pos, transient)` call - It should use same coords when calling `forceload_block` and `forceload_free_block` (assuming that code is needed at all)
Author
Owner

There is a file in the world folder "force_loaded.txt"

If we copy the content into the gimme_forceloaded function, we can see and remove those forceloading

local function gimme_forceloaded()
    return {[141276506783801] = 1, [138162655493655] = 1, [141577154625710] = 1, [141160542732362] = 1, [138149770591770] = 1, [138149770591764] = 1, [140606492082348] = 1, [138154065559065] = 1, [139923592216509] = 1, [139841987772357] = 1}
end

for hashpos,_ in pairs(gimme_forceloaded()) do
    local blockpos = core.get_position_from_hash(hashpos)
    local pos = vector.multiply(blockpos, 16)
    core.log("warning","[DEBUG] Removed forceloading at ".. core.pos_to_string(pos))
    core.forceload_free_block(pos, true)
end
There is a file in the world folder "force_loaded.txt" If we copy the content into the gimme_forceloaded function, we can see and remove those forceloading ```lua local function gimme_forceloaded() return {[141276506783801] = 1, [138162655493655] = 1, [141577154625710] = 1, [141160542732362] = 1, [138149770591770] = 1, [138149770591764] = 1, [140606492082348] = 1, [138154065559065] = 1, [139923592216509] = 1, [139841987772357] = 1} end for hashpos,_ in pairs(gimme_forceloaded()) do local blockpos = core.get_position_from_hash(hashpos) local pos = vector.multiply(blockpos, 16) core.log("warning","[DEBUG] Removed forceloading at ".. core.pos_to_string(pos)) core.forceload_free_block(pos, true) end ```
Member

Still unclear to me how to properly handle moving entities into unloaded blocks but...

Forceload is transient now, so this issue should not happen because of petz anymore:
575cedc1b9

Still unclear to me how to properly handle moving entities into unloaded blocks but... Forceload is transient now, so this issue should not happen because of petz anymore: https://gitea.your-land.de/your-land/petz/commit/575cedc1b96236dc6f73b69a6473689460120e27
whosit added the
4. step/ready to QA test
label 2025-04-07 16:07:42 +02:00
AliasAlreadyTaken added this to the 1.1.128 milestone 2025-04-08 10:01:17 +02:00
Author
Owner

QA

Upon update delivery, we should probably clear that file

QA Upon update delivery, we should probably clear that file
AliasAlreadyTaken added the
4. step/QA OK
4. step/QA main
labels 2025-05-11 18:25:52 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#6345
No description provided.