Created
July 7, 2023 01:59
-
-
Save sylv256/710c5ec462c0eb6926c29782e311fb31 to your computer and use it in GitHub Desktop.
Quilt Kotlin Modding Idioms (1.20.1 Edition) WIP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Here's a basic idiom for writing packets. | |
* | |
* Notes: | |
* C2SPackets refers to the class in which the identifier for your packet is located. | |
*/ | |
fun writePacket() { | |
val buf = PacketByteBufs.create() | |
val packet = FooC2SPacket(this.foo) | |
packet.write(buf) | |
ClientPlayNetworking.send(C2SPackets.FOO, buf) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment