aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/apis/ingame/JoinedCustomPayload.kt
blob: c6732640a11deba8f226c387ef00168c15d8ed14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

package moe.nea.firmament.apis.ingame

import net.minecraft.network.packet.CustomPayload

/**
 * A class to smuggle two parsed instances of the same custom payload packet.
 */
class JoinedCustomPayload(
    val original: CustomPayload,
    val smuggled: FirmamentCustomPayload
) : CustomPayload {
    companion object {
        val joinedId = CustomPayload.id<JoinedCustomPayload>("firmament:joined")
    }

    override fun getId(): CustomPayload.Id<out JoinedCustomPayload> {
        return joinedId
    }
}