Skip to content

Commit d3bdf16

Browse files
committed
Used typealias for packet delay
1 parent ddde257 commit d3bdf16

File tree

1 file changed

+4
-2
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/network

1 file changed

+4
-2
lines changed

common/src/main/kotlin/com/lambda/module/modules/network/PacketDelay.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ import com.lambda.module.Module
2525
import com.lambda.module.tag.ModuleTag
2626
import com.lambda.threading.runConcurrent
2727
import com.lambda.threading.runGameScheduled
28+
import com.lambda.util.ClientPacket
2829
import com.lambda.util.PacketUtils.handlePacketSilently
2930
import com.lambda.util.PacketUtils.sendPacketSilently
31+
import com.lambda.util.ServerPacket
3032
import kotlinx.coroutines.delay
3133
import net.minecraft.network.listener.ClientPacketListener
3234
import net.minecraft.network.listener.ServerPacketListener
@@ -45,8 +47,8 @@ object PacketDelay : Module(
4547
private val inboundDelay by setting("Inbound Delay", 250L, 0L..5000L, 10L, unit = "ms") { networkScope != Direction.OUTBOUND }
4648
private val outboundDelay by setting("Outbound Delay", 250L, 0L..5000L, 10L, unit = "ms") { networkScope != Direction.INBOUND }
4749

48-
private var outboundPool = ConcurrentLinkedDeque<Packet<out ServerPacketListener>>()
49-
private var inboundPool = ConcurrentLinkedDeque<Packet<out ClientPacketListener>>()
50+
private var outboundPool = ConcurrentLinkedDeque<ClientPacket>()
51+
private var inboundPool = ConcurrentLinkedDeque<ServerPacket>()
5052
private var outboundLastUpdate = 0L
5153
private var inboundLastUpdate = 0L
5254

0 commit comments

Comments
 (0)