Argument order

This commit is contained in:
DBotThePony 2024-08-12 20:22:03 +07:00
parent 5b4fa2e9ed
commit 6356afe295
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ class AndroidFeatureSyncPacket(val type: AndroidFeatureType<*>, val data: ByteAr
fun play(context: IPayloadContext) {
val android = minecraft.player?.matteryPlayer ?: return
android.computeIfAbsent(type).syncher.read(data, context.player().registryAccess())
android.computeIfAbsent(type).syncher.read(context.player().registryAccess(), data)
}
override fun type(): CustomPacketPayload.Type<out CustomPacketPayload> {
@ -77,7 +77,7 @@ class AndroidResearchSyncPacket(val type: AndroidResearchType, val dataList: Byt
fun play(context: IPayloadContext) {
val android = minecraft.player?.matteryPlayer ?: return
android.getResearch(type).syncher.read(dataList, context.player().registryAccess())
android.getResearch(type).syncher.read(context.player().registryAccess(), dataList)
}
override fun type(): CustomPacketPayload.Type<out CustomPacketPayload> {

View File

@ -51,9 +51,9 @@ class MatteryPlayerDataPacket(val bytes: ByteArrayList, val isPublic: Boolean, v
}
if (isPublic) {
player.publicSyncher.read(bytes, context.player().registryAccess())
player.publicSyncher.read(context.player().registryAccess(), bytes)
} else {
player.syncher.read(bytes, context.player().registryAccess())
player.syncher.read(context.player().registryAccess(), bytes)
}
}