Skip to content

fix(PlayerTestUtil): fixes for player creation #118

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

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

p1k0chu
Copy link
Contributor

@p1k0chu p1k0chu commented Mar 20, 2025

  • fix Lukynka domain expansion
  • fix player being repeatedly added to PlayerManager
  • fix World.join(Player) method never being called for test player
This code...
@Test
fun test() {
    TestServer.getOrSetupServer()

    repeat(5) { PlayerTestUtil.getOrCreateFakePlayer() }

    log("world.entities = ${WorldManager.mainWorld.entities}")
    log("PlayerManager.players = ${PlayerManager.players}")
}

Prints this:

✨ Runtime: world.entities = []
✨ Runtime: PlayerManager.players = [LukynkaCZE, LukynkaCZE, LukynkaCZE, LukynkaCZE, LukynkaCZE]

wow thats a lot of Lukynkas

fix player being repeatedly added to PlayerManager
fix World.join(Player) method never being called
@LukynkaCZE
Copy link
Contributor

That's a lot of me

@LukynkaCZE
Copy link
Contributor

Yknow this is really shit method..
If you look at branch restructure/monorepo I'm working on splitting everything into it's own packages, including protocol. Another change having both read and write methods for every packet meaning I will be able to make actual client with that for testing

@LukynkaCZE LukynkaCZE merged commit 9e4bb0a into DockyardMC:master Mar 21, 2025
2 checks passed
@p1k0chu p1k0chu deleted the fix/test-player-creation branch March 21, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants