Dueris / OriginsPaper

Custom Origins Plugin for PaperMC
https://modrinth.com/plugin/originspaper
Other
27 stars 5 forks source link

[BUG] - Player doesn't have collision with ground for a bit when teleporting #73

Closed ItsaGlitch1 closed 8 months ago

ItsaGlitch1 commented 9 months ago

Describe the bug When teleporting or logging in, the player doesn't have collision for a bit and will spawn in the ground and suffocate.

Plugin Version mc1.20-v0.2.5

Minecraft version 1.20.4

Server software Paper MC "This server is running Paper version git-Paper-351 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d1f507f)"

Steps to reproduce Make sure you are in a gamemode that has gravity and are not flying teleport to another player where that player is standing on ground, or teleport to a random location that is on top of the ground.

What should happen? You render the chunks around you and see yourself standing on ground

What is happening instead? You are inside a block, sometimes further down and suffocating

Stacktrace/Errors on Console No error

Dueris commented 9 months ago

In 0.2.6 I have a SLIGHT workaround that works around 98% of the time. It freezes the player for abt 2 seconds to let the chunks load. I never thought of it being a collision issue though, how did u know it was collisions?

ItsaGlitch1 commented 9 months ago

In 0.2.6 I have a SLIGHT workaround that works around 98% of the time. It freezes the player for abt 2 seconds to let the chunks load. I never thought of it being a collision issue though, how did u know it was collisions?

If you teleport in spectator mode or flying in creative mode, you don't fall into the ground

Dueris commented 9 months ago

that actually makes a lot of sense XD.

ItsaGlitch1 commented 9 months ago

now that you know what the main cause is, please fix it soon as I use it for a server and starborne players keep exploding their bases

Dueris commented 9 months ago

I can get you a build of 0.2.6 if you want. It has a workaround for this and I havent encountered it much at all(ignoring the one time it did happen).

Dueris commented 9 months ago

Its a custom jar tho, so some server hosts(like Artenos) wont let you.

ItsaGlitch1 commented 9 months ago

Its a custom jar tho, so some server hosts(like Artenos) wont let you.

I don't use aternos to host my server.

Dueris commented 9 months ago

Alrighty. Do you want to try out the jar?

ItsaGlitch1 commented 9 months ago

sure

ItsaGlitch1 commented 9 months ago

and don't you think it would be a good idea to post v0.2.6 on the modrinth page?

Dueris commented 9 months ago

I plan on posting it on Sunday. Ive been working on 0.2.6 for abt 1 1/2 months and it full of bug fixes and parity fixes. I wanted to squeeze in a few more things before a release of 0.2.6

ItsaGlitch1 commented 9 months ago

I plan on posting it on Sunday. Ive been working on 0.2.6 for abt 1 1/2 months and it full of bug fixes and parity fixes. I wanted to squeeze in a few more things before a release of 0.2.6

I can understand that, for now, I do have another workaround for my server, so I can wait for the next update. Hopefully my bug report can help you find the actual cause of this.

Dueris commented 9 months ago

Weirdly tho, Genesis doesnt do much when it comes to collisions. I can try and see what I can do tho

ItsaGlitch1 commented 9 months ago

one more thing: while I did test this with no other plugins and was able to recreate this bug, most of my testing was using the random teleport command from essentialsX.

And yes, I did test the random teleport command without GenesisMC and I didn't have any issues.

Dueris commented 9 months ago

Weird... Gimme a few minutes tho, im fixing 1 more bug with power registration and then ill send u a build

Dueris commented 9 months ago

Its with ModelColor requiring an external dependency to work correctly. Im trying to add support for powers that require those dependencies

ItsaGlitch1 commented 9 months ago

forgot to say: This can happen anytime you teleport to or spawn in unrendered chunks (doesn't matter if the chunks are loaded or not), wheather it was respawning at the default spawn point, respawning at your bed, logging in to the server, and any teleportation by commands.

Dueris commented 9 months ago

👍

Dueris commented 9 months ago

image this totally works

Dueris commented 9 months ago

Alright we got powers working again, Im gonna quickly test to ensure this works first lol

Dueris commented 9 months ago

https://we.tl/t-cQGJUb7u94

ItsaGlitch1 commented 9 months ago

thanks

ItsaGlitch1 commented 9 months ago

the bug is still happening, at least when using teleport commands. Here is a quick video of what can happen (though its usually not as bad, only a few blocks), watch the coords for the Y axis in the video too. I apply resistance V as I teleport so I don't suffocate and the command I use is EssentialsX's random tp. I also forgot to record audio, but that isn't needed.

https://github.com/Dueris/GenesisMC/assets/23035675/c5e2523e-cc3a-4e89-bcfb-27c87fa20284

ItsaGlitch1 commented 9 months ago

For some reason it only affects Java edition players, bedrock players connecting through geyserMC are fine

Dueris commented 9 months ago

The weird thing is, genesis barely interacts with teleportation.

Dueris commented 9 months ago

In what cases are you able to replicate this? Does it happen with Genesis ALONE or with a specific plugin?

ItsaGlitch1 commented 9 months ago

In what cases are you able to replicate this? Does it happen with Genesis ALONE or with a specific plugin?

Just tested it in a seperate paper server with no other plugins with a vanilla client, and while I couldn't get it as bad as the video, I still find myself inside the ground, usually just 1 block.

ItsaGlitch1 commented 9 months ago

am going to add essentialsX to the test server and keep checking it out

ItsaGlitch1 commented 9 months ago

with essentialsX, teleporting to an ungenerated chunk with random tp will put you into the ground, i think because it takes longer to load and you fall further. I took it off again and started the test server up and when I logged in, I was around 3 blocks underground. Did a bit more testing, and it only happens on first login after the server starts.

Dueris commented 9 months ago

Hmm. One thing I could try and do is save the logout point in the playerdata and use that as the anchor point for the workaround to fix the spawning in ground on first login after startup.

To fix what's going on with essentials, I got no clue. I can see what I can do abt that tho

Dueris commented 8 months ago

https://github.com/Dueris/GenesisMC/commit/6725f8e7f18f1a0da6fdcbbb6bcdfa23a95d7583

This commit ensures that chunks are loaded, and if they arent, it will load them. Could you try the commit build that comes with this inside the releases to see if the issue is fixed? And your theory was correct, the chunks werent loaded yet.

Dueris commented 8 months ago

Fixed in 0.2.8, i cant replicate this anymore