-
Notifications
You must be signed in to change notification settings - Fork 32
1.20.4 Support #92
1.20.4 Support #92
Conversation
I switched the base immediately because I wanted the ci to run and the PR has to target main for it to run :) |
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 |
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
} |
Yeah I agree there should be an api for this. |
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. |
* 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
… blockItemUse method does (#102)
…atch wiki.vg (#103) * packet fixes * explosion packet touchup
@MelonHell @MenschenToaster as of 489ba51, this branch conforms to the Adventure resource pack api. |
The remaining tasks before merge that I know of:
|
* upgrade: infinite potion duration * fix: no more aqgit --------- Co-authored-by: mworzala <[email protected]>
(cherry picked from commit ce9d254)
(cherry picked from commit 2b07376)
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