1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-05 09:36:19 +00:00
CC-Tweaked/projects
Jonathan Coates 4daa2a2b6a
Reschedule block entities when chunks are loaded
Minecraft sometimes keeps chunks in-memory, but not actively loaded. If
we schedule a block entity to be ticked and that chunk is is then
transitioned to this partially-loaded state, then the block entity is
never actually ticked.

This is most visible with monitors. When a monitor's contents changes,
if the monitor is not already marked as changed, we set it as changed
and schedule a tick (see ServerMonitor). However, if the tick is
dropped, we don't clear the changed flag, meaning subsequent changes
don't requeue the monitor to be ticked, and so the monitor is never
updated.

We fix this by maintaining a list of block entities whose tick was
dropped. If these block entities (or rather their owning chunk) is ever
re-loaded, then we reschedule them to be ticked.

An alternative approach here would be to add the scheduled tick directly
to the LevelChunk. However, getting hold of the LevelChunk for unloaded
blocks is quiet nasty, so I think best avoided.

Fixes #1146. Fixes #1560 - I believe the second one is a duplicate, and
I noticed too late :D.
2024-02-26 19:25:38 +00:00
..
common Reschedule block entities when chunks are loaded 2024-02-26 19:25:38 +00:00
common-api Deprecate WiredNetwork 2024-02-24 14:55:22 +00:00
core Bump CC:T to 1.109.6 2024-02-18 18:33:42 +00:00
core-api Allow ILuaAPIs to be exposed as a module 2024-02-05 18:53:24 +00:00
fabric Reschedule block entities when chunks are loaded 2024-02-26 19:25:38 +00:00
fabric-api Rewrite turtle upgrade modeller registration API 2024-01-16 23:00:49 +00:00
forge Reschedule block entities when chunks are loaded 2024-02-26 19:25:38 +00:00
forge-api Rewrite turtle upgrade modeller registration API 2024-01-16 23:00:49 +00:00
lints Flesh out MemoryMount into a writable mount 2023-09-29 22:15:23 +01:00
standalone Allow local domains in the standalone emulator 2023-12-20 17:43:08 +00:00
web Bump CC:T to 1.109.1 2023-12-16 19:09:39 +00:00
ARCHITECTURE.md Add a standalone CC:T UI 2023-10-28 17:58:11 +01:00