EntityCulling
EntityCulling copied to clipboard
try to fix #126
PR Summary
-
Introduction of new calculation improvement file A new file titled
CameraMixin.java
has been added. This file includes a code modification aiming to improve the accuracy of the third-person camera rotation in the Minecraft game. -
Update and modification in DebugHudMixin.java file The
DebugHudMixin.java
file now includes two exclusive aspects:lastTickedEntities
andlastSkippedEntityTicks
. ThegetLeftText
method has been adjusted - it updates these new aspects when the debug feature is switched off, and instead of returning aList<String>
, it now returnsvoid
. -
Inclusion of new feature in entityculling.mixins.json file The file
entityculling.mixins.json
has been updated to include theCameraMixin
in its list of interleaved code modifications.
Huh, that is certainly a way to fix it. My plan was to modify the culling code to allow going through blocks when the initial point is inside a block(until it's outside once, then continue as normal). That would also fix spectator mode and freecam mods. Will have to check out if this has other potential side effects/conflicts with other mods.
Visually no changes. And in general, it seems like there is a bug on the side of the Minecraft developers, that by 0.001 the camera fails inside the block when rotated > ~85 degrees
Huh, that is certainly a way to fix it. My plan was to modify the culling code to allow going through blocks when the initial point is inside a block(until it's outside once, then continue as normal). That would also fix spectator mode and freecam mods. Will have to check out if this has other potential side effects/conflicts with other mods.
I wanted to change the culling code, but it ended up inside another library
Yea, I know that the bug is that the f3 camera is able to sliiiightly clip into blocks. My point is that this fix might become redundant by implementing the other fix to make spectator/freecam mode work. But might as well use this fix for the time being. Will check/merge/publish it tomorrow as EntityCulling is still on the old project setup.
https://github.com/LogisticsCraft/OcclusionCulling the lib is developed by me^^
https://github.com/LogisticsCraft/OcclusionCulling the lib is developed by me^^
Oups... :D
Feel free to implement the fix I mentioned above there, should just be one boolean that is set to true if the ray starts in a wall, and allows progressing till it's outside the wall, then gets set to false. While true it can continue in walls. Just haven't gotten around to it because irl time(currently looking for a job) 🙃 .
Quality Gate passed
Issues
0 New issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Feel free to implement the fix I mentioned above there, should just be one boolean that is set to true if the ray starts in a wall, and allows progressing till it's outside the wall, then gets set to false. While true it can continue in walls. Just haven't gotten around to it because irl time(currently looking for a job) 🙃 .
To be honest, I don’t have time either, being a student is all that...
Yea I just finished uni, so now need to get stuff worked out. Currently prototyping something for ItemSwapper, then I'll try to add my fix, if that has issues/doesnt work well I'll merge this fix instead.
Ok, I implemented the in-wall bypass and also removed the spectator mode special handling since this new logic should take care of that. Please try the new build, at least with f5 and spectator mode it seems to be all working.
Oops, I have a bit of a problem right now, have you ever had this happen when you move a project from one folder to another?
Possible that some intellij project file has absolute paths. I use eclipse, so not sure.
But a built version with my proposed fix for #126 and spectator mode can be downloaded from the actions tab above.
In block (spectator)
Normal (survival)
The pass time increased from ~6 to ~64, it seems to me that this should not be the case, I even felt slight lags
Why not just disable the mod in spectator mode?
..and as for the main problem, I could not identify any problems, everything else works fine :+1:
The pass time increased from ~6 to ~64, it seems to me that this should not be the case, I even felt slight lags
Since it traces to the caves in that moment. Yea it could turn off culling while in a wall in spectator mode, but that just feels like splitting hairs. 64ms is still fine, worstcase stuff pops in after flying into a wall, which it does anyway since the chunk culling by vanilla/sodium needs to happen(that might also be the cause for the lag you noticed).