Skip to content

Sable Sub levels going into storage even though they're being forceloaded (temp fix) #1098

@greganbs

Description

@greganbs

Description

Problem

When a Sable sublevel (e.g. an Aeronautics airship) travels more than ~320 blocks
from the world origin at high speed, PhysicsChunkTicketManager puts the sublevel
into "storage" and unloads it. This kills any third-party chunk loaders running on
the sublevel (specifically Create Power Loader). This means that an airship will stay loaded for the time it stays in those loaded chunks but once it drove out of them it would unload. It also just wasnt loading the chunks in front fast enough for a 55m/s airship.

There is currently no API for third-party mods to tell Sable "keep this sublevel loaded".

Workaround

We've implemented a mixin (PhysicsChunkTicketManagerMixin) in Create Power Loader
that intercepts the storage decision and skips it for pinned sublevels:
https://github.com/greganbs/create_power_loader/tree/fix/sable-high-velocity-chunk-loading

This works but is fragile — it relies on internal Sable implementation details and
could break with any Sable update. But it consitently kept my ship loaded at 55m/s with inf range. Hopefully this can be added in the next update :)!

Requested API

A simple public API on PhysicsChunkTicketManager would let CPL and other mods
handle this cleanly without mixins:

PhysicsChunkTicketManager.forceLoadSubLevel(UUID subLevelId)
PhysicsChunkTicketManager.releaseForceLoad(UUID subLevelId)

### Game Log

https://mclo.gs/Dd6sw7E

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions