Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

1.20.4 Support #92

Merged
merged 59 commits into from
Jan 16, 2024
Merged

1.20.4 Support #92

merged 59 commits into from
Jan 16, 2024

Conversation

mworzala
Copy link

Currently based against the 1.20.2 PR, but it's just for comparison. Later I will close that PR and target main.

Closes #83

@mworzala mworzala self-assigned this Dec 18, 2023
@mworzala mworzala mentioned this pull request Dec 18, 2023
@mworzala mworzala changed the base branch from 1_20_2 to main December 18, 2023 22:59
@mworzala
Copy link
Author

I switched the base immediately because I wanted the ci to run and the PR has to target main for it to run :)

@davidmayr
Copy link

Will there be API for awaiting a resource pack in the configuration phase? Because as of now the server switches back to play as fast as it can without awaiting anything. Theoretically, I think I could block the AsyncPlayerConfigurationEvent until the pack is present, but I think there could be better options implemented.

@davidmayr
Copy link

Will there be API for awaiting a resource pack in the configuration phase? Because as of now the server switches back to play as fast as it can without awaiting anything. Theoretically, I think I could block the AsyncPlayerConfigurationEvent until the pack is present, but I think there could be better options implemented.

This might be especially important because of the velocity proxies shortcomings: PaperMC/Velocity#1164

@MelonHell
Copy link

Will there be API for awaiting a resource pack in the configuration phase? Because as of now the server switches back to play as fast as it can without awaiting anything. Theoretically, I think I could block the AsyncPlayerConfigurationEvent until the pack is present, but I think there could be better options implemented.

That's what I do, here's my code. But I think in any case it’s worth adding a similar API to Minestom

fun Player.setResourcePackAsync(resourcePack: ResourcePack): CompletableFuture<Unit> {
    val completableFuture = CompletableFuture<Unit>()
    val rpStatusListener = EventListener.builder(PlayerResourcePackStatusEvent::class.java)
        .expireWhen {
            val status = it.status
            if (status != ResourcePackStatus.ACCEPTED && status != ResourcePackStatus.DOWNLOADED) {
                completableFuture.complete(Unit)
                return@expireWhen true
            }
            return@expireWhen false
        }
        .build()
    val disconnectListener = EventListener.builder(PlayerDisconnectEvent::class.java).expireWhen {
        completableFuture.complete(Unit)
        return@expireWhen true
    }.build()
    eventNode().addListener(rpStatusListener)
    eventNode().addListener(disconnectListener)
    setResourcePack(resourcePack)
    return completableFuture
}

@mworzala
Copy link
Author

Yeah I agree there should be an api for this.

@mworzala
Copy link
Author

Expanding on above: Adventure has a resource pack API in Audience now (including a callback api). I will implement this for Player.

Most likely if you want to send a resource pack without waiting you will need to send the rp push packet yourself.

DeidaraMC and others added 8 commits January 2, 2024 06:15
* new scoreboard protocol conformance

* fix: pass number format through when reading scoreboard packet

---------

Co-authored-by: mworzala <[email protected]>
* Fix Minecraft changes since 1.19 (Block.GRASS, recipe packet, DamageType.VOID)

* Add packets in play state

* Fix some tests via TestConnectionImpl and API changes

* fix: add some missing entity metas, group projectiles

---------

Co-authored-by: GoldenStack <[email protected]>
This seems to be the right place to send the metadata without interfering with the configuration state
…atch wiki.vg (#103)

* packet fixes

* explosion packet touchup
@mworzala
Copy link
Author

mworzala commented Jan 6, 2024

@MelonHell @MenschenToaster as of 489ba51, this branch conforms to the Adventure resource pack api.

@mworzala
Copy link
Author

mworzala commented Jan 6, 2024

The remaining tasks before merge that I know of:

  • Players are sometimes permanently sprinting (not able to reproduce reliably, havent looked too much into it)
  • Fix remaining tests + add some more for new behavior like chunk queue

@mworzala mworzala merged commit 5347c0b into main Jan 16, 2024
2 checks passed
@mworzala mworzala deleted the 1_20_4 branch January 16, 2024 15:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.20.4 update 🧐
8 participants