Entity Culling Fabric/Forge

Entity Culling Fabric/Forge

138M Downloads

display_entity bug when clipping is enabled

R411gun opened this issue · 9 comments

commented

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

commented

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?

commented

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.

commented

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

commented

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"

commented

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

commented

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

commented

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)

commented

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.

commented

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