Entities become invisible in culled chunks when they shouldn't
Felix14-v2 opened this issue ยท 0 comments
Bug Description
In some scenarios, if an entity is partially hidden in a culled chunk section, the entity model can become invisible until you forcefully load the chunk section.
Demo
Minecraft_.1.21.-.Singleplayer.2024-08-20.21-40-48.mp4
The interesting part is that disabling the "Entity culling" option does nothing:
Minecraft_.1.21.-.Singleplayer.2024-08-20.21-40-48.mp4
Reproduction Steps
Preparing the area (you can just load the attached world)
- Create an empty world with the "void" preset
- Cover a chunk section with a solid block (example:
/fill -1 -1 -1 16 16 16 stone
) - Unload the chunk and load it again in a way you prefer (for example, just rejoin the world)
Triggering the bug - Place an entity on top of the cube you've just created and disable gravity for it (example:
/summon minecraft:armor_stand 5 17 5 {NoGravity:1b}
) - Tweak the vertical position of the entity to hide its hitbox origin inside the chunk section (example:
/execute as @e[type=minecraft:armor_stand] at @s run tp ~ ~-1.001 ~
) - The entity will immediately disappear (expected: it should be visible)
Debug info
latest.log
crash-2024-08-20_22.41.21-client.txt
Additional
I heard about this behavior from a server administrator, who complained to me that Sodium is breaking decorations on his server. I debugged it a bit and found this bug. So this may be a real-world scenario, not just a limited edge case.
Minecraft_.1.21.-.Singleplayer.2024-08-20.21-27-28.mp4
By the way, you can see another issue with the entity shadowing in the video above (0:02-0:03), but that's unrelated.