EntityCulling icon indicating copy to clipboard operation
EntityCulling copied to clipboard

display_entity bug when clipping is enabled

Open R411gun opened this issue 7 months ago • 6 comments

When you summon a block_display and enable clipping and teleport this entity while NOT looking at it, EntityCulling kinda looses track of it. When looking at the location this entity SHOULD be, it is invisible. When you turn around and look where it was BEFORE teleporting, it get's visible again

I tested this with entityculling-fabric-1.7.4-mc1.21.4, to reproduce use following commands:

in command_block: /summon minecraft:block_display ~ ~2 ~ { block_state: {"Name": "minecraft:oak_log"}, transformation: { left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[5f,5f,5f]}, width:0.1f, height:0.1f, teleport_duration: 3, Tags: ["DispBug"], }

now move back and looking at it, enter /tp @e[tag=DispBug] ~ ~ ~

now do the same but turn around, move some blocks and enter /tp @e[tag=DispBug] ~ ~ ~ move back and while it should be visible, it only is when you look at the origin position

I can send a video of this id needed

R411gun avatar May 18 '25 13:05 R411gun

Uhhh hm. I'll have to look into it, possible that display entity moving like that doesn't update its state correctly, as it's a bit of a special case. width:0.1f, height:0.1f, also keep in mind that this sets the culling box size. Without that, the display entity won't be culled at all. But 0.1 sounds awfully small for scale:[5f,5f,5f]. The other issue is, entityculling doesn't use the camera at all. So looking/not looking at something shouldn't cause issues, but maybe due to display entities special state in the client, the tick culling messes something up. Can you try adding the minecraft:block_display into the tickCullingWhitelist in the config, restart, and then retry your setup?

tr7zw avatar May 18 '25 13:05 tr7zw

The specific culling size doesnt reallly matter, this was just something we used for testing. It also occurs with much larger width/height cull boxes, for larger models/scales.

bergerkiller avatar May 18 '25 14:05 bergerkiller

Can you try adding the minecraft:block_display into the tickCullingWhitelist in the config, restart, and then retry your setup?

tr7zw avatar May 18 '25 14:05 tr7zw

Can you try adding the minecraft:block_display into the tickCullingWhitelist in the config, restart, and then retry your setup?

Yes that fixes it! This should maybe be set per default "minecraft:block_display", "minecraft:item_display"

R411gun avatar May 18 '25 14:05 R411gun

Yep, if that fixes it, then I'll add the 3 to the default config. (text display too)

tr7zw avatar May 18 '25 14:05 tr7zw

oh I missed that! And thanks for being this quick :)

R411gun avatar May 18 '25 14:05 R411gun

Thanks for including the commands, at least for me, the tick culling didn't seem to fix it. Will do some more testing tomorrow. (Or my config screen is broken)

tr7zw avatar Jun 19 '25 21:06 tr7zw

Ok after a quick test, my config screen just doesn't work correctly without a restart of the game. So tick cull whitelist it is.

tr7zw avatar Jun 20 '25 13:06 tr7zw

I'm so done. Turns out, the "tick" whitelist never worked, and accidentally fed into the normal whitelist... Well, it's fixed now 🙃.

tr7zw avatar Jun 20 '25 14:06 tr7zw