mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
make more entity packets not thread safe
This commit is contained in:
parent
ba0adce043
commit
eda8903022
@ -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()
|
||||
|
@ -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?>
|
||||
|
@ -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) {
|
||||
|
@ -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()
|
||||
|
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user