Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About entity rewrite #7

Closed
Leymooo opened this issue Jul 31, 2018 · 13 comments
Closed

About entity rewrite #7

Leymooo opened this issue Jul 31, 2018 · 13 comments

Comments

@Leymooo
Copy link
Contributor

Leymooo commented Jul 31, 2018

I read that you want integrate velocity to paper and sponge.

How about to make velocity to handle(generate) players entity ids and sync it across network?

Ex:

  1. Paper reserve from 1 to 50000 entity ids.
  2. Player join to network and velocity generate a player id.
  3. Velocity send a custom packet or handshake with generated player entity id(from 1 to 50000)
  4. Paper send a login(joinGame) packet.
  5. Velocity check if sended entity id is generated by velocity and disable entity rewrite, if not enable entity rewrite.
@kashike
Copy link
Member

kashike commented Jul 31, 2018

Entity rewrite is not necessary in modern versions of Minecraft - this is not necessary.

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

But why bungeecord is using a entity rewrite?

@kashike
Copy link
Member

kashike commented Jul 31, 2018

Because BungeeCord is dumb.

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

You can not send a login packet twice, because some clients may have bugs or crashes (mods or cheats)

Without entity rewrite can cause a entity id duplication on client (entity and client player entity id)

@kashike
Copy link
Member

kashike commented Jul 31, 2018

Yes you can - you've been able to send the "join game" packet more than once for a while now.

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

Yes, you can send join game twice. but it cause bugs on modded clients(random disconnects, crashes). I am tested it and online was lower by ~20%

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

In bungeecord repo only one branch without entity rewrite.

On master Login packet from server is cancelled. https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/ServerConnector.java#L285

@mikroskeem
Copy link
Contributor

because some clients may have bugs or crashes (mods or cheats)

cheats

lolno. go away with that talk.

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

If you want to lose online, its a your chose. There are a lot of players with cheats. And with mods too.

I am already say, that online on my server was dropped by 20% when i try to use a alt-respawn.

@mikroskeem
Copy link
Contributor

It's your choice to press the fork button as well.

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

I just said to kashike why send login packet twice is bad.

Also there is commit with begin of entity rewrite, 515248f.

I just write some ideas how to make entity rewrite better, and reduce cpu usage by disabling entity rewrite.

@electronicboy
Copy link
Member

On the branch which disables entity rewrites, it sends its own login packet, as opposed to passing through original one, so that it can send a login packet and then a respawn packet.

There are several servers which run their own forks of bungee without this entity rewrite logic without any issues, in fact, many modded servers take this approach and run perfectly fine and quite practically have no option other than this in order to run;

Are there going to be teething issues with some mods? Yes, but there is a whole idea here that by providing an environment which attempts to drop a lot of the quirky behavior that bungeecord shoves onto these mods sees a better chance of them actually attempting to provide some level of support for this software, as opposed to the current behavior of mod developers either providing support for it reluctantly, or shoving off support entirely.

@Leymooo
Copy link
Contributor Author

Leymooo commented Jul 31, 2018

Okey. Now i see, that velocity uses a rewriter/remapper only for 1.8.

But why you use it only for 1.8 if in 1.8 and 1.12.2 implementation/packet_handle is the same. https://www.diffchecker.com/Vrr01myy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants