mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -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 de.bixilon.minosoft.util.logging.LogMessageType
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
|
||||||
|
|
||||||
@LoadPacket
|
@LoadPacket(threadSafe = false)
|
||||||
class EntityDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class EntityDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val entityId = buffer.readEntityId()
|
val entityId = buffer.readEntityId()
|
||||||
val data: Int2ObjectOpenHashMap<Any?> = buffer.readEntityData()
|
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.LogLevels
|
||||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||||
|
|
||||||
@LoadPacket
|
@LoadPacket(threadSafe = false)
|
||||||
class EntityEquipmentS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class EntityEquipmentS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val entityId: Int = buffer.readEntityId()
|
val entityId: Int = buffer.readEntityId()
|
||||||
val equipment: Map<EquipmentSlots, ItemStack?>
|
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.LogLevels
|
||||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||||
|
|
||||||
@LoadPacket
|
@LoadPacket(threadSafe = false)
|
||||||
class EntitySleepS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class EntitySleepS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val entityId: Int = buffer.readInt()
|
val entityId: Int = buffer.readInt()
|
||||||
val blockPosition: Vec3i = if (buffer.versionId < ProtocolVersions.V_14W04A) {
|
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.LogLevels
|
||||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||||
|
|
||||||
@LoadPacket
|
@LoadPacket(threadSafe = false)
|
||||||
class EntityAttachS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class EntityAttachS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val entityId: Int = buffer.readInt()
|
val entityId: Int = buffer.readInt()
|
||||||
val vehicle: 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 de.bixilon.minosoft.util.logging.LogMessageType
|
||||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet
|
import it.unimi.dsi.fastutil.ints.IntOpenHashSet
|
||||||
|
|
||||||
@LoadPacket
|
@LoadPacket(threadSafe = false)
|
||||||
class EntityPassengerS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class EntityPassengerS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val vehicle: Int = buffer.readVarInt()
|
val vehicle: Int = buffer.readVarInt()
|
||||||
val passengers: IntOpenHashSet = IntOpenHashSet(buffer.readVarIntArray())
|
val passengers: IntOpenHashSet = IntOpenHashSet(buffer.readVarIntArray())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user