ohowe1 / SpectatorModeRewrite

Minecraft plugin that allows players to go into spectator mode but enables admins to prevent features of it.
https://www.spigotmc.org/resources/smp-spectator-mode-1-16-support.77267/
MIT License
17 stars 9 forks source link

Clipping still possible when pass though blocks is disabled #2

Closed TEXHIK closed 4 years ago

TEXHIK commented 4 years ago

When pass through blocks is disabled, despite player can not move through blocks, clipping still possible, because restriction applied too late, so player could move slightly into the block, that is enough for blocks to become transparent.

ohowe1 commented 4 years ago

I really don't know what to do about this issue. My testing does not bring up this issue because I run my test server on my computer giving me 0 ping. I have put the priority to high if that could help. If you have any ideas feel free to reach out and let me know.

TEXHIK commented 4 years ago

I've Made some research and figured out that besides wall-clipping, that is reverted by plugin (when player forced back after trying to clip into wall) there is another problem - vanilla spectator has no collision model, so when you come close to the wall, even not trying to clip into - you can see through when watching down. This looks very similar to vanilla survival sand-bug (may be still exist? don't know). Another problem is that coordinates are at feet, but camera - 1 block higher, so coordinates must be corrected but +1, now you can just simply fly into roof with no problem and plugin think it is legal. There is a problem #4 with stucking in slabs or rails when go into spec while standing on them too caused by this. For now the only Idea I have - is to check some sort of a circle around the player instead of real coordinates to hold them out of the wall.

ohowe1 commented 4 years ago

I changed the eye level so that should help with some of the clipping

TEXHIK commented 4 years ago

Currently working on fix. Already fixed walls, but have some trouble with top block. It still clipping, cause when you move up - you move at about 0.4 per event (as my F3 says - it jump between .005 and .4). You could look at my fork current state in clipping branch.

TEXHIK commented 4 years ago

I changed the eye level so that should help with some of the clipping

Could you push your comment, so I can use it in my fix, please?

ohowe1 commented 4 years ago

Going to close this issue due to most of it being fixed and inactivity.