-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird bug causes entities to become invisible #39
Comments
This is a current issue with the math/logic screwing up. Currently trying to lookup/get together the math to make the tracing work differently, and then this should be resolved in the same go. |
Any luck on this |
Haven't got around to it yet, since this bug is like searching for a needle in a haystack. Somewhere something is done the wrong way around, the direction of checking the blocks is an issue or something like that. I know that it's an issue with what gets put into the cache, the issue is that removing the cache slows down the entire thing by a good chunk. I want to try to redo the vision-logic by using a pyramid from the eye to the corners of the hitbox and then checking the cubes in between. The issue with that is to get the math down which will eat many many hours. |
I made a test world: EntityCulling item frame test.zip Stand on or near the planks and place an item frame on the iron block. The bug doesn't seem to happen if an item frame is already on the iron block when the world is loaded. In this case, remove and replace the item frame to trigger the bug again. There's also an item frame behind the wall by the way. (I tested this in Minecraft 1.18.1 with Entity Culling 1.3.3 for Fabric) |
Thanks, I'll look into it once I'm done handling a big license issue I'm facing currently. |
OH MY GOD... I want to die...
And the issue is in line 4... it doesn't increment the id it is on... So depending on entity loading order, the back itemframe gets checked first, and correctly marks the 2 stone blocks sticking out and the 2 below and 2 left to it as solid blocks. Now the front itemframe gets checked, the first loop notes the 2 sticking out stone blocks as checked invalid, then the second check(because it starts at the min position and goes to the max position) will first check the front left stone, see that it's noted as invalid, but forget to increment the value it is on. This causes all other(absolutely valid paths) to also check this front stone. Result: the code assumes there is no valid free block around the item frame, therefore it does no tracing at all, turning it invisible. |
Fixed in 1.5.0. |
Don't want to be that guy, but it seems to me that in some cases the problem persists, and one of them is simply when there's a 3-or-4-block high ceiling while in third person mode... Here's hoping it's instantly reproducible and not an obscure conflict with some other e.g. trig optimization thing I've got installed :) Quick video showcasing it here, if there was, say, a lot of chests nearby, some would also disappear: 2022-02-11.02-07-43.mp4Anyways, while I'm still here, many thanks for the mod! |
Ehhhhh I think that's something else, that the camera sliiiightly clips into the block(I hope). Shouldn't be that bad to fix and is certainly less of an issue compared to the one above^^ |
Adding a bit of code so that if the ray starts inside a solid block, to allow it to travel through solid blocks till it's outside once. Could potentially make spectator compatible(currently it just turns off) and allow better freecam compatibility(or other cases where you manage to ram your head/camera into a solid wall). |
Hm so far unable to reproduce it(1.18 fabric only entityculling 1.5.0/ 1.18.1 fabric highly modded with version 1.4.0). Do you potentially have a mod like better third person mod installed? (or other info like optifine?) |
A few are custom in here, but a wild guess would be that only Ferrite Core or Magnesium could be the culprit... I will take a quick look without. |
Also happens with both removed. Maybe it's something with Forge? |
Ok was able to reproduce it... But only under Forge... So this actually seems to be a Forge bug that probably moves the camera ever so slightly into the wall... 🙃 |
RjkSD4uGSm.mp4You can actually see that the pixels of the tree/grass shift by one pixel on a 4k image... That's fun... Thanks Forge. |
This will be tracked at #11 . |
Best replicable in an igloo.
The text was updated successfully, but these errors were encountered: