-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
48 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains 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
26 changes: 0 additions & 26 deletions
26
versions/1.20.6-fabric/src/main/kotlin/su/plo/slib/mod/channel/ByteArrayCodec.kt
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
versions/1.20.6-fabric/src/main/kotlin/su/plo/slib/mod/channel/ByteArrayPayload.kt
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
essential.defaults.loom.forge=net.minecraftforge:forge:1.21-51.0.22 |
This file contains 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
28 changes: 28 additions & 0 deletions
28
versions/src/main/kotlin/su/plo/slib/mod/channel/ByteArrayCodec.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//#if MC>=12005 | ||
//$$ package su.plo.slib.mod.channel | ||
//$$ | ||
//$$ import net.minecraft.network.RegistryFriendlyByteBuf | ||
//$$ import net.minecraft.network.codec.StreamCodec | ||
//$$ import net.minecraft.network.protocol.common.custom.CustomPacketPayload | ||
//$$ import net.minecraft.resources.ResourceLocation | ||
//$$ | ||
//$$ class ByteArrayCodec( | ||
//$$ channelKey: ResourceLocation | ||
//$$ ) : StreamCodec<RegistryFriendlyByteBuf, ByteArrayPayload> { | ||
//$$ | ||
//$$ val type = CustomPacketPayload.Type<ByteArrayPayload>(channelKey) | ||
//$$ | ||
//$$ override fun decode(buf: RegistryFriendlyByteBuf): ByteArrayPayload { | ||
//$$ val length = buf.readableBytes() | ||
//$$ | ||
//$$ val data = ByteArray(length) | ||
//$$ buf.readBytes(data) | ||
//$$ | ||
//$$ return ByteArrayPayload(type, data) | ||
//$$ } | ||
//$$ | ||
//$$ override fun encode(buf: RegistryFriendlyByteBuf, payload: ByteArrayPayload) { | ||
//$$ buf.writeBytes(payload.data) | ||
//$$ } | ||
//$$ } | ||
//#endif |
13 changes: 13 additions & 0 deletions
13
versions/src/main/kotlin/su/plo/slib/mod/channel/ByteArrayPayload.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//#if MC>=12005 | ||
//$$ package su.plo.slib.mod.channel | ||
//$$ | ||
//$$ import net.minecraft.network.protocol.common.custom.CustomPacketPayload | ||
//$$ | ||
//$$ class ByteArrayPayload( | ||
//$$ private val type: CustomPacketPayload.Type<ByteArrayPayload>, | ||
//$$ val data: ByteArray | ||
//$$ ) : CustomPacketPayload { | ||
//$$ | ||
//$$ override fun type(): CustomPacketPayload.Type<ByteArrayPayload> = type | ||
//$$ } | ||
//#endif |
This file contains 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