TheEpicBlock / PolyMc

Making minecraft mods compatible with a vanilla client
GNU Lesser General Public License v3.0
560 stars 28 forks source link

Jittery Entities #237

Open AlexanderwithaA opened 9 months ago

AlexanderwithaA commented 9 months ago

I have polymc and Yamato Gun on the latest version of minecraft, I used an override to do so. When I fire a gun the bullet jitters as it flies.

https://github.com/TheEpicBlock/PolyMc/assets/101488091/9805322d-2824-43c5-aa14-fe65d89d4e81

Also I tried disabling gravity with a command block yet it didn't allow me to do so, didn't like the entity id I put, so how is that formatted with polymc?

TheEpicBlock commented 9 months ago

The main cause of this issue is PolyMc uses snowballs for this, which have slightly different physics to bullets. The situation can definitely be improved on PolyMc's side but any solution will have it's downsides. Regarding the entity id, if you type @e[type=smth] then it might appear red on the client, but it'll still work if you press enter

Patbox commented 9 months ago

I think replacing snowball with display entity with correct teleport interpolation for position and billboard enabled could solve this

TheEpicBlock commented 9 months ago

That is the best option but I think you'd end up with slightly more lag since you'll miss out on the prediction part. Minor downside but still a downside. Calculating where the projectile will be next tick and sending that might help but I'm unsure if that's correct, will have to check projectile code.