ValkyrienSkies / Valkyrien-Skies-2

Valkyrien Skies 2
https://valkyrienskies.org/
GNU Lesser General Public License v3.0
220 stars 92 forks source link

When I try to add tfcambiental, an addon for TFC, on top of TFC+VS2, the vehicles in VS2 experience bugs. #655

Open wglpython opened 8 months ago

wglpython commented 8 months ago

This issue occurs when only Valkyrien Skies and addons are installed and no other mods

Minecraft Version

1.18

Mod Loader

Forge

Issue description

2~NSQ Z$%G`SE@G@LF$2509

https://github.com/ValkyrienSkies/Valkyrien-Skies-2/assets/153580345/4d227a52-43ce-4028-86cd-40e079b16087

When a player stands on a vehicle in VS2, the rendering loading becomes extremely laggy, and it only functions properly when the player is not on the vehicle. I am the developer who previously submitted the compatibility code for TFC and VS2, but this time I can't figure out the cause of the issue.

Issue reproduction

2~NSQ Z$%G`SE@G@LF$2509 use it

Logs

No response

wglpython commented 8 months ago

However, what is puzzling is that there are no error messages in the log.

StewStrong commented 8 months ago

Can run a Spark profile? https://spark.lucko.me/

That will tell us which parts of the code are running slow.

wglpython commented 8 months ago

是否可以运行 Spark 配置文件?https://spark.lucko.me/

这将告诉我们代码的哪些部分运行缓慢。

https://spark.lucko.me/Zfd056Sjnz thx bro

StewStrong commented 8 months ago

Its the com.lumintorious.tfcambiental.api.EnvironmentalTemperatureProvider.calculateEnclosure() function thats lagging the server. See the flame graph below, I got it from looking at the spark you posted https://spark.lucko.me/Zfd056Sjnz?hl=12203

Screenshot 2023-12-20 001400

Rubydesic commented 8 months ago

Does TFC lag if your player moves very fast in general? I made a mixin to fix calculateEnclosure. Or maybe a newer version of TFCAmbiental broke the mixin and it no longer works? Can you send a log?

wglpython commented 8 months ago

如果你的玩家总体上移动得非常快,TFC会滞后吗?我做了一个mixin来修复calculateEnclosure。或者,也许较新版本的 TFCAmbiental 破坏了混合,它不再起作用?可以发送日志吗?

i think probably a question for TFCAmbiental