make more entity packets not thread safe

This commit is contained in:
Bixilon 2023-03-20 09:24:25 +01:00
parent ba0adce043
commit eda8903022
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
5 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
@LoadPacket
@LoadPacket(threadSafe = false)
class EntityDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val entityId = buffer.readEntityId()
val data: Int2ObjectOpenHashMap<Any?> = buffer.readEntityData()

View File

@ -25,7 +25,7 @@ import de.bixilon.minosoft.util.logging.Log
import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
@LoadPacket
@LoadPacket(threadSafe = false)
class EntityEquipmentS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val entityId: Int = buffer.readEntityId()
val equipment: Map<EquipmentSlots, ItemStack?>

View File

@ -21,7 +21,7 @@ import de.bixilon.minosoft.util.logging.Log
import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
@LoadPacket
@LoadPacket(threadSafe = false)
class EntitySleepS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val entityId: Int = buffer.readInt()
val blockPosition: Vec3i = if (buffer.versionId < ProtocolVersions.V_14W04A) {

View File

@ -21,7 +21,7 @@ import de.bixilon.minosoft.util.logging.Log
import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
@LoadPacket
@LoadPacket(threadSafe = false)
class EntityAttachS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val entityId: Int = buffer.readInt()
val vehicle: Int = buffer.readInt()

View File

@ -22,7 +22,7 @@ import de.bixilon.minosoft.util.logging.LogLevels
import de.bixilon.minosoft.util.logging.LogMessageType
import it.unimi.dsi.fastutil.ints.IntOpenHashSet
@LoadPacket
@LoadPacket(threadSafe = false)
class EntityPassengerS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
val vehicle: Int = buffer.readVarInt()
val passengers: IntOpenHashSet = IntOpenHashSet(buffer.readVarIntArray())