Skip to content

Commit

Permalink
Update to 1.21 (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: Spottedleaf <[email protected]>
  • Loading branch information
Spottedleaf and Spottedleaf authored Jul 19, 2024
1 parent 77c0c20 commit 6909307
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 25 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ version = "0.0.1"

repositories {
mavenCentral()
maven("https://jitpack.io/")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.opencollab.dev/maven-snapshots/")
}
Expand All @@ -17,7 +16,7 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-cli-jvm:0.3.5")
implementation("com.github.steveice10:mcprotocollib:1.20.4-2-SNAPSHOT")
implementation("org.geysermc.mcprotocollib:protocol:1.21-SNAPSHOT")
implementation("org.fusesource.jansi:jansi:2.4.0")
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.cubxity.tools.stresscraft

import com.github.steveice10.mc.protocol.data.game.ResourcePackStatus
import org.geysermc.mcprotocollib.protocol.data.game.ResourcePackStatus

data class StressCraftOptions(
val count: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package dev.cubxity.tools.stresscraft.cli

import com.github.steveice10.mc.protocol.data.game.ResourcePackStatus
import dev.cubxity.tools.stresscraft.StressCraft
import dev.cubxity.tools.stresscraft.StressCraftOptions
import dev.cubxity.tools.stresscraft.util.Terminal
Expand All @@ -9,6 +8,7 @@ import kotlinx.cli.ArgType
import kotlinx.cli.default
import kotlinx.cli.optional
import kotlinx.coroutines.delay
import org.geysermc.mcprotocollib.protocol.data.game.ResourcePackStatus

object StressCraftCLI {
private val terminal = Terminal()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
package dev.cubxity.tools.stresscraft.data

import com.github.steveice10.mc.protocol.MinecraftProtocol
import com.github.steveice10.mc.protocol.data.game.ClientCommand
import com.github.steveice10.mc.protocol.data.game.ResourcePackStatus
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket
import com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundResourcePackPushPacket
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundRespawnPacket
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundForgetLevelChunkPacket
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundLevelChunkWithLightPacket
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundSetTimePacket
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundResourcePackPacket
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket
import com.github.steveice10.packetlib.Session
import com.github.steveice10.packetlib.event.session.DisconnectedEvent
import com.github.steveice10.packetlib.event.session.SessionAdapter
import com.github.steveice10.packetlib.packet.Packet
import com.github.steveice10.packetlib.tcp.TcpClientSession
import org.geysermc.mcprotocollib.protocol.MinecraftProtocol
import org.geysermc.mcprotocollib.protocol.data.game.ClientCommand
import org.geysermc.mcprotocollib.protocol.data.game.ResourcePackStatus
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket
import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundResourcePackPushPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundRespawnPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundForgetLevelChunkPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundLevelChunkWithLightPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.ClientboundSetTimePacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket
import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.ServerboundResourcePackPacket
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket
import org.geysermc.mcprotocollib.network.Session
import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent
import org.geysermc.mcprotocollib.network.event.session.SessionAdapter
import org.geysermc.mcprotocollib.network.packet.Packet
import org.geysermc.mcprotocollib.network.tcp.TcpClientSession
import dev.cubxity.tools.stresscraft.StressCraft
import dev.cubxity.tools.stresscraft.util.ServerTimer

Expand Down Expand Up @@ -102,7 +102,7 @@ class StressCraftSession(private val app: StressCraft) : SessionAdapter() {
}

private fun computeKey(x: Int, z: Int): Long =
x.toLong().shl(32) or z.toLong()
x.toLong().shl(32) or (z.toLong().and(0xFFFFFFFFL))

private fun handleDisconnect() {
app.removeSession(this)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.cubxity.tools.stresscraft.module

import com.github.steveice10.packetlib.packet.Packet
import dev.cubxity.tools.stresscraft.StressCraft
import dev.cubxity.tools.stresscraft.data.StressCraftSession
import org.geysermc.mcprotocollib.network.packet.Packet

interface Module {
fun register(app: StressCraft) {}
Expand Down

0 comments on commit 6909307

Please sign in to comment.