These docs are for v4.3.22. Click to read the latest docs for v4.4.0.

Multiplayer Packet Structure

Individual packets used by the multiplayer protocol

Connect Request [1]

Client -> Server

SizeDescriptionTypeNotes
?VersionString"Terraria" + Main.curRelease

Disconnect [2]

Server -> Client

SizeDescriptionTypeNotes
?ReasonString-

Continue Connecting [3]

Server -> Client

SizeDescriptionTypeNotes
1Player IDByte-

Player Info [4]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1Skin VarientByte-
1HairByteIf >134 then Set To 0
?NameString-
1Hair DyeByte-
1Hide VisualsByte-
1Hide Visuals 2Byte-
1Hide MiscByte-
3Hair ColorColor-
3Skin ColorColor-
3Eye ColorColor-
3Shirt ColorColor-
3Under Shirt ColorColor-
3Pants ColorColor-
3Shoe ColorColor-
1DifficultyByte-

Player Inventory Slot [5]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1Slot IDByte0 - 58 = Inventory, 59 - 78 = Armor, 79 - 88 = Dye, 89 - 93 MiscEquips, 94 - 98 = MiscDyes, 99 - 138 = Piggy bank, 139-178 = Safe, 179 = Trash
2StackInt16-
1PrefixByte-
2Item NetIDInt16-

Continue Connecting2 [6]

Client -> Server

SizeDescriptionTypeNotes

World Info [7]

Server -> Client

SizeDescriptionTypeNotes
4TimeInt32-
1Day and Moon InfoByteBitFlags: 1 = Day Time, 2 = Blood Moon, 4 = Eclipse
1Moon PhaseByte-
2MaxTilesXInt16-
2MaxTilesYInt16-
2SpawnXInt16-
2SpawnYInt16-
2WorldSurfaceInt16-
2RockLayerInt16-
4WorldIDInt32-
?World NameString-
?World Unique ID16 Bytes-
?World Generation VersionUInt64-
1Moon TypeByte-
1Tree BackgroundByte-
1Corruption BackgroundByte-
1Jungle BackgroundByte-
1Snow BackgroundByte-
1Hallow BackgroundByte-
1Crimson BackgroundByte-
1Desert BackgroundByte-
1Ocean BackgroundByte-
1Ice Back StyleByte-
1Jungle Back StyleByte-
1Hell Back StyleByte-
4Wind Speed SetSingle-
1Cloud NumberByte-
4Tree 1Int32-
4Tree 2Int32-
4Tree 3Int32-
1Tree Style 1Byte-
1Tree Style 2Byte-
1Tree Style 3Byte-
1Tree Style 4Byte-
4Cave Back 1Int32-
4Cave Back 2Int32-
4Cave Back 3Int32-
1Cave Back Style 1Byte-
1Cave Back Style 2Byte-
1Cave Back Style 3Byte-
1Cave Back Style 4Byte-
4RainSingle-
1Event InfoByteBitFlags: 1 = Shadow Orb Smashed, 2 = Downed Boss 1, 4 = Downed Boss 2, 8 = Downed Boss 3, 16 = Hard Mode, 32 = Downed Clown, 64 = Server Side Character, 128 = Downed Plant Boss
1Event Info 2ByteBitFlags: 1 = Mech Boss Downed, 2 = Mech Boss Downed 2, 4 = Mech Boss Downed 3, 8 = Mech Boss Any Downed, 16 = Cloud BG, 32 = Crimson, 64 = Pumpkin Moon, 128 = Snow Moon
1Event Info 3ByteBitFlags: 1 = Expert Mode, 2 = FastForwardTime, 3 = Slime Rain, 4 = Downed Slime King, 5 = Downed Queen Bee, 6 = Downed Fishron, 7 = Downed Martians, 8 = Downed Ancient Cultist
1Event Info 4ByteBitFlags: 1 = Downed Moon Lord, 2 = Downed Pumking, 3 = Downed Mourning Wood, 4 = Downed Ice Queen, 5 = Downed Santank, 6 = Downed Everscream, 7 = Downed Golem, 8 = Birthday Party
1Event Info 5ByteBitFlags: 1 = Downed Pirates, 2 = Downed Frost Legion, 3 = Downed Goblins, 4 = Sandstorm, 5 = DD2 Event, 6 = Downed DD2 Tier 1, 7 = Downed DD2 Tier 2, 8 = Downed DD2 Tier 3
1Invasion TypeSByte-
8Lobby IDUInt64-

Get Section [8]

Client -> Server

SizeDescriptionTypeNotes
4XInt32If -1 Send spawn area tile sections
4YInt32If -1 Send spawn area tile sections

Status [9]

Server -> Client

SizeDescriptionTypeNotes
4StatusMaxInt32Status only increases
?StatusTextString-

Send Section [10]

Server -> Client

SizeDescriptionTypeNotes
1CompressedBoolean-
4X StartInt32-
4Y StartInt32-
2WidthInt16-
2HeightInt16-
?Tiles-
2Chest CountInt16-
?Chests-
2Sign CountInt16-
?Signs-
2TileEntity CountInt16-
?TileEntities--

Section Tile Frame [11]

Server -> Client

SizeDescriptionTypeNotes
2StartXInt16-
2StartYInt16-
2EndXInt16-
2EndYInt16-

Spawn Player [12]

Client -> Server

SizeDescriptionTypeNotes
1Player IDByte-
2SpawnXInt16-
2SpawnYInt16-

Update Player [13]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1ControlByteBitFlags: ControlUp = 1, ControlDown = 2, ControlLeft = 4, ControlRight = 8, ControlJump = 16, ControlUseItem = 32, Direction = 64
1PulleyByteBitFlags: 0 = None, 1 = Direction, 2 = Direction, 4 = Update Velocity, 8 = Vortex Stealth Active, 16 = Gravity Direction, 32 = Shield Raised
1SelectedItemByte-
4PositionXSingle-
4PositionYSingle-
4VelocityXSingleNot sent if Update Velocity is not set
4VelocityYSingleNot sent if Update Velocity is not set

Player Active [14]

Server -> Client

SizeDescriptionTypeNotes
1Player IDByte-
1ActiveBoolean-

Null [15]

Never sent

SizeDescriptionTypeNotes

Player HP [16]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
2HPInt16-
2Max HPInt16-

Modify Tile [17]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1ActionByteValues: 0 = KillTile, 1 = PlaceTile, 2 = KillWall, 3 = PlaceWall, 4 = KillTileNoItem, 5 = PlaceWire, 6 = KillWire, 7 = PoundTile, 8 = PlaceActuator, 9 = KillActuator, 10 = PlaceWire2, 11 = KillWire2, 12 = PlaceWire3, 13 = KillWire3, 14 = SlopeTile, 15 = FrameTrack, 16 = PlaceWire4, 17 = KillWire4, 18 = PokeLogicGate, 19 = Actuate
2TileXInt16-
2TileYInt16-
2Var1Int16KillTile (Fail: Bool), PlaceTile (Type: Byte), KillWall (Fail: Bool), PlaceWall (Type: Byte), KillTileNoItem (Fail: Bool), SlopeTile (Slope: Byte)
1Var2ByteVar2: PlaceTile (Style: Byte)

Time [18]

Server -> Client

SizeDescriptionTypeNotes
1DayTimeBoolean-
4TimeValueInt32-
2SunModYInt16-
2MoonModYInt16-

Door Toggle [19]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1ActionByte0 = Open Door, 1 = Close Door, 2 = Open Trapdoor, 3 = Close Trapdoor, 4 = Open Tall Gate, 5 = Close Tall Gate
2TileXInt16-
2TileYInt16-
1DirectionByteIf (Action == 0) then (if (Direction == -1) then OpenToLeft else OpenToRight) if (Action == 2) then (if (Direction == 1) then PlayerIsAboveTrapdoor) if (Action == 3) then (if (Direction == 1) then PlayerIsAboveTrapdoor)

Send Tile Square [20]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2Player IDUInt16-
1TileChangeTypeByteOnly if != 0
2SizeInt16-
2TileXInt16-
2TileYInt16-
?Tiles-

Update Item Drop [21]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2ItemIDInt16If below 400 and NetID 0 Then Set NullIf ItemID is 400 Then New Item
4PositionXSingle-
4PositionYSingle-
4VelocityXSingle-
4VelocityYSingle-
2Stack SizeInt16-
1PrefixByte-
1NoDelayByteIf 0 then ownIgnore = 0 and ownTime = 100
2Item NetIDInt16-

Update Item Owner [22]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2ItemIDInt16-
1Player IDByte-

NPC Update [23]

Server -> Client

SizeDescriptionTypeNotes
2NPC IDInt16-
4PositionXSingle-
4PositionYSingle-
4VelocityXSingle-
4VelocityYSingle-
2TargetUInt16Player ID
1FlagsByteBitFlags: 1 = Direction, 2 = DirectionY, 4 = AI[0], 8 = AI[1], 16 = AI[2], 32 = AI[3], 64 = SpriteDirection, 128 = LifeMax
?AI[?]Single[]Requires the AI flag to be set in order to be sent down the wire
2NPC NetIDInt16-
1LifeBytesByteThe size in bytes of Life, only present if !Flags[7] (LifeMax)
?LifeByte or Int16 or Int32Only present if !Flags[7] (LifeMax)
1ReleaseOwnerByteOnly present if NPC is catchable

Strike NPCwith Held Item [24]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2NPC IDInt16-
1Player IDByte-

Chat Message [25]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByteIf 255 Then No Name
3Message ColorColorClient cannot change colors
?MessageString-

Player Damage [26]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1Hit DirectionByte-
2DamageInt16-
?Death TextString-
1FlagsByteBitFlags: 1 = PVP, 2 = Crit, 4 = CooldownCountdown Is -1, 8 = CooldownCountdown is 1 (Overrides previous flag), 16 = CooldownCountdown is 2

Projectile Update [27]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2ProjectileIDInt16-
4PositionXSingle-
4PositionYSingle-
4VelocityXSingle-
4VelocityYSingle-
4KnockBackSingle-
2DamageInt16-
1OwnerBytePlayer ID
2TypeInt16-
1AIFlagsByteBitFlags: 0 = AI[0] is Present, 1 = AI[1] is Present, 2 = Needs UUID
4AI0SingleRequires the AI0 flag to be set in order to be sent down the wire
4AI1SingleRequires the AI1 flag to be set in order to be sent down the wire
2ProjUUIDInt16Requires the Needs UUID flag to be set in order to be sent down the wire

NPC Strike [28]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2NPC IDInt16-
2DamageInt16-1 = Kill
4KnockbackSingle-
1DirectionByte-
1CritBoolean-

Destroy Projectile [29]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2Projectile IDInt16-
1OwnerBytePlayer ID

Toggle P V P [30]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1PVP EnabledBoolean-

Get Chest Contents [31]

Client -> Server

SizeDescriptionTypeNotes
2TileXInt16-
2TileYInt16-

Chest Item [32]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2Chest IDInt16-
1ItemSlotByte-
2StackInt16-
1PrefixByte-
2Item Net IDInt16-

Set Chest Name [33]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2Chest IDInt16-
2ChestXInt16-
2ChestYInt16-
1Name LengthByte-
?Chest NameStringOnly if length > 0 && <= 20

PlaceChest [34]

Server <-> Client

SizeDescriptionTypeNotes
1IDByteBitFlags:0 = Place Chest, 1 = Kill Chest, 2 = Place Dresser, 3 = Kill Dresser
2TileXInt16-
2TileYInt16-
2StyleInt16FrameX(Chest type)
2Chest ID to destroyInt16Only if client is receiving packet

Heal Effect [35]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
2Heal AmountInt16-

Player Zone [36]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1Zone1Byte1 = Dungeon, 2 = Corruption, 4 =Holy, 8 = Meteor, 16 = Jungle, 32 = Snow, 64 = Crimson, 128 = Water Candle
1Zone2Byte1 = Peace Candle, 2 = Solar Tower, 4 = Vortex Tower, 8 = Nebula Tower, 16 = Stardust Tower, 32 = Desert, 64 = Glowshroom, 128 = Underground Desert
1Zone3Byte1 = Overworld, 2 = Dirt Layer, 4 = Rock Layer, 8 = Underworld, 16 = Beach, 32 = Rain, 64 = Sandstorm
1Zone4Byte1 = Old One's Army

Request Password [37]

Server -> Client

SizeDescriptionTypeNotes

Send Password [38]

Client -> Server

SizeDescriptionTypeNotes
?PasswordString-

Remove Item Owner [39]

Server -> Client

SizeDescriptionTypeNotes
2ItemIndexInt16-

Set Active NPC [40]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
2Npc Talk TargetInt16-

Player Item Animation [41]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
4Item RotationSingle-
2Item AnimationInt16-

Player Mana [42]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
2ManaInt16-
2Max ManaInt16-

Mana Effect [43]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
2Mana AmountInt16-

Player Death [44]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1HitDirectionByte-
2DamageInt16-
1PVPBoolean-
?DeathTextString-

Player Team [45]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1TeamByte-

Request Sign [46]

Client -> Server

SizeDescriptionTypeNotes
2XInt16-
2YInt16-

Update Sign [47]

Updates sign if sent from client otherwise displays sign to client.

SizeDescriptionTypeNotes
2Sign IDInt16-
2XInt16-
2YInt16-
?TextString-
1Player IDByte-

Set Liquid [48]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
1LiquidByteValues: 255 = Placed
1Liquid TypeByteValues: 0 = Water, 1 = Lava, 2 = Honey

Complete Connection and Spawn [49]

Server -> Client

SizeDescriptionTypeNotes
--

Update Player Buff [50]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1 * 22BuffTypeByte[22]

Special NPC Effect [51]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1TypeByteValues: 1 = Spawn Skeletron, 2 = Cause sound at player, 3 = Start Sundialing (Only works if server is receiving), 4 = BigMimcSpawnSmoke

Unlock [52]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1TypeByteValues: 1 = Chest Unlock, 2 = Door Unlock
2XInt16-
2YInt16-

Add NPC Buff [53]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2NPC IDInt16-
1BuffByte-
2TimeInt16-

Update NPC Buff [54]

Server -> Client

SizeDescriptionTypeNotes
2NPC IDInt16-
1Buff IDByte-
2TimeInt16-

Add Player Buff [55]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1BuffByte-
2TimeInt16-

Update NPC Name [56]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2NPC IDInt16-
?NameStringRead-only from the client

Update Good Evil [57]

Server -> Client

SizeDescriptionTypeNotes
1GoodByte-
1EvilByte-
1CrimsonByte-

Play Music Item [58]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
4NoteSingle-

Hit Switch [59]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2XInt16-
2YInt16-

NPC Home Update [60]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2NPC IDInt16-
2HomeTileXInt16-
2HomeTileYInt16-
1HomelessByte-

Spawn Boss Invasion [61]

Client -> Server

SizeDescriptionTypeNotes
2Player IDInt16-
2TypeInt16Negative Values: -1 = GoblinInvasion, -2 = FrostInvasion, -3 = PirateInvasion, -4 = PumpkinMoon, -5 = SnowMoon, -6 = Eclipse, -7 = Martian Moon Positive Values: Spawns any of these NPCs:4,13,50,126,125,134,127,128,131,129,130,222,245,266,370,75,398,439,493,507,422,517

Player Dodge [62]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1FlagByte1 = Ninja Dodge 2 = Shadow Dodge

Paint Tile [63]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
1ColorByte-

Paint Wall [64]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
1ColorByte-

Player NPC Teleport [65]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1FlagsByteBitFlags: 0 = Player Teleport (Neither 1 or 2), 1 = NPC Teleport, 2 = Player Teleport to Other Player, 4 = Style += 1, 8 = Style += 2
2Target IDInt16-
4XSingle-
4YSingle-

Heal Other Player [66]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
2Heal AmountInt16-

Placeholder [67]

Does not exist in the official client. Exists solely for the purpose of being used by custom clients and servers.

SizeDescriptionTypeNotes
--

Client UUID [68]

Client -> Server

SizeDescriptionTypeNotes
?UUIDString

Get Chest Name [69]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2Chest IDInt16-
2Chest XInt16-
2Chest YInt16-
?NameStringOnly when Server->Client

Catch NPC [70]

Client -> Server

SizeDescriptionTypeNotes
2NPC IDInt16-
1WhoByte-

Release NPC [71]

Client -> Server

SizeDescriptionTypeNotes
4XInt32-
4YInt32-
2NPC TypeInt16-
1StyleByteSent to NPC AI[2]

Travelling Merchant Inventory [72]

Server -> Client

SizeDescriptionTypeNotes
2*40ItemsInt16[40]Each int corresponds to an inventory slot and item type NetID.

Teleportation Potion [73]

Server <-> Client

SizeDescriptionTypeNotes

Angler Quest [74]

Server -> Client

SizeDescriptionTypeNotes
1QuestByte-
1CompletedBoolean-

Complete Angler Quest Today [75]

Client -> Server

SizeDescriptionTypeNotes

Number Of Angler Quests Completed [76]

Client -> Server

SizeDescriptionTypeNotes
1Player IDByte-
4Angler Quests CompletedInt32-

Create Temporary Animation [77]

Server -> Client

SizeDescriptionTypeNotes
2AnimationTypeInt16-
2TileTypeUInt16-
2XInt16-
2YInt16-

Report Invasion Progress [78]

Server -> Client

SizeDescriptionTypeNotes
4ProgressInt32-
4MaxProgressInt32-
1IconSByte-
1WaveSByte-

Place Object [79]

Server <-> Client

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
2TypeInt16-
2StyleInt16-
1AlternateByte-
1RandomSByte-
1DirectionBoolean-

Sync Player Chest Index [80]

Server -> Client

SizeDescriptionTypeNotes
1PlayerByte-
2ChestInt16-

Create Combat Text [81]

Server -> Client

SizeDescriptionTypeNotes
4XSingle-
4YSingle-
3ColorColor-
?TextString-

Load Net Module [82]

Not used

SizeDescriptionTypeNotes

Set NPC Kill Count [83]

Server -> Client

SizeDescriptionTypeNotes
2NPC TypeInt16-
4Kill CountInt32-

Set Player Stealth [84]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1PlayerByte-
4StealthSingle-

Force Item Into Nearest Chest [85]

Client -> Server

SizeDescriptionTypeNotes
1Inventory SlotByte-

Update Tile Entity [86]

Server -> Client

SizeDescriptionTypeNotes
4KeyInt32-
1Remove?Boolean-
1TileEntity TypeByteIf Remove? == false
4IDInt32If Remove? == false
2XInt16If Remove? == false
2YInt16If Remove? == false
2NPCInt16If Remove? == false && Type = 0
2ItemTypeInt16If Remove? == false
1PrefixByteIf Remove? == false
2StackInt16If Remove? == false

Place Tile Entity [87]

Client -> Server

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
1TypeByte2 = Logic Sensor 1 = Item Frame 0 = Training Dummy

Alter Item Drop [88]

Server -> Client

SizeDescriptionTypeNotes
2Item IndexInt16-
1Flags1ByteBitFlags: 1 = Color, 2 = Damage, 4 = Knockback, 8 = UseAnimation, 16 = UseTime, 32 = Shoot, 64 = ShootSpeed, 128 = NextFlags
4Packed Color ValueUInt32if Flags1.Color
2DamageUInt16if Flags1.Damage
4KnockbackSingleif Flags1.Knockback
2Use AnimationUInt16if Flags1.UseAnimation
2Use TimeUInt16if Flags1.UseTime
2ShootInt16if Flags1.Shoot
4Shoot SpeedFloatif Flags1.ShootSpeed
1Flags2Byteif Flags1.NextFlags BitFlags: 1 = Width, 2 = Height, 4 = Scale, 8 = Ammo, 16 = UseAmmo, 32 = NotAmmo
2WidthInt16if Flags2.Width
2HeightInt16if Flags2.Height
4ScaleFloatif Flags2.Scale
2AmmoInt16If Flags2.Ammo
2UseAmmoInt16If Flags2.UseAmmo
1NotAmmoBoolIf Flags2.NotAmmo

Place Item Frame [89]

Client -> Server

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
2Item IdInt16-
1PrefixByte-
2StackInt16-

Update Item Drop 2 [90]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2ItemIDInt16If below 400 and NetID 0 Then Set NullIf ItemID is 400 Then New Item
4PositionXSingle-
4PositionYSingle-
4VelocityXSingle-
4VelocityYSingle-
2Stack SizeInt16-
1PrefixByte-
1NoDelayByteIf 0 then ownIgnore = 0 and ownTime = 100
2Item NetIDInt16-

Sync Emote Bubble [91]

Server -> Client

SizeDescriptionTypeNotes
4Emote IDInt32-
1Anchor TypeByteIf AnchorType > 255 then the emote is removed
2MetaDataUInt16-
1LifetimeByte-
1EmoteByte-
2MetaDataInt16Only sent if Emote < 0

Sync Extra Value [92]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
2NPC IndexInt16-
4ExtraValueSingle-
4XSingle-
4YSingle-

Social Handshake [93]

Not used

SizeDescriptionTypeNotes

Deprecated [94]

Not used

SizeDescriptionTypeNotes

Kill Portal [95]

Client -> Server

SizeDescriptionTypeNotes
2Projectile IndexUInt16-

Player Teleport Through Portal [96]

Server <-> Client

SizeDescriptionTypeNotes
1Player IDByte-
2Portal Color IndexInt16-
4New Position XSingle-
4New Position YSingle-
4Velocity XSingle-
4Velocity YSingle-

Notify Player NPC Killed [97]

Server -> Client

SizeDescriptionTypeNotes
2NPC IDInt16-

Notify Player Of Event [98]

Server -> Client

SizeDescriptionTypeNotes
2Event IDInt16-

Update Minion Target [99]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
4Target XSingle-
4Target YSingle-

NPC Teleport Through Portal [100]

Server <-> Client

SizeDescriptionTypeNotes
2NPC IDUInt16-
2Portal Color IndexInt16-
4New Position XSingle-
4New Position YSingle-
4Velocity XSingle-
4Velocity YSingle-

Update Shield Strengths [101]

Server -> Client

SizeDescriptionTypeNotes
2Solar Tower ShieldUInt16-
2Vortex Tower ShieldUInt16-
2Nebula Tower ShieldUInt16-
2Stardust Tower ShieldUInt16-

Nebula Level Up Request [102]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1Player IDByte-
1Level Up TypeByte-
4Origin XSingleIn world coordinate pixels.
4Origin YSingleIn world coordinate pixels.

Update Moon Lord Countdown [103]

Server -> Client

SizeDescriptionTypeNotes
4Moon Lord CountdownInt32-

Set NPC Shop Item [104]

Server -> Client

SizeDescriptionTypeNotes
1SlotByte-
2Item TypeInt16-
2StackInt16-
1PrefixByte-
4ValueInt32-
1FlagsByteBitFlags: 1 = BuyOnce

Toggle Gem Lock [105]

Client -> Server

SizeDescriptionTypeNotes
2XInt16-
2YInt16-
1OnBoolean-

Poof of Smoke [106]

Server -> Client

SizeDescriptionTypeNotes
4PackedVectorInt32Two Int16's packed into 4 bytes.

Chat Message v2 [107]

Server -> Client

SizeDescriptionTypeNotes
1Player IDByteIf 255 Then No Name
3Message ColorColorClient cannot change colors
?MessageString-
2Message LengthInt16

Wired Cannon Shot [108]

Server -> Client

SizeDescriptionTypeNotes
2DamageInt16-
4KnockbackSingle-
2XInt16-
2YInt16-
2AngleInt16-
2AmmoInt16-
1Player IDByteShooter's Player ID

Mass Wire Operation [109]

Client -> Server

SizeDescriptionTypeNotes
2Start XInt16-
2Start YInt16-
2End XInt16-
2End YInt16-
1ToolModeByteBitFlags: 1 = Red, 2 = Green, 4 = Blue, 8 = Yellow, 16 = Actuator, 32 = Cutter

Mass Wire Operation Consume [110]

Server -> Client

SizeDescriptionTypeNotes
2Item TypeInt16-
2QuantityInt16-
1Player IDByte-

Toggle Birthday Party [111]

Client -> Server

SizeDescriptionTypeNotes

GrowFX [112]

Server <-> Client (Sync)

SizeDescriptionTypeNotes
1GrowEffectBoolean-
2XInt16-
2YInt16-
1HeightByte-

CrystalInvasionStart [113]

Client -> Server

SizeDescriptionTypeNotes
2XInt16-
2YInt16-

CrystalInvasionWipeAll [114]

Server -> Client

SizeDescriptionTypeNotes
----

MinionAttackTargetUpdate [115]

Client -> Server

SizeDescriptionTypeNotes
1Player IDByte-
2Minion Attack TargertInt16-

CrystalInvasionSendWaitTime [116]

Server -> Client

SizeDescriptionTypeNotes
4Time Until Next WaveInt1800 (30s) between waves, 30 (5s) when starting

PlayerHurtV2 [117]

Client -> Server

SizeDescriptionTypeNotes
1Player IDByte-
?Player Death ReasonPlayerDeathReason-
2DamageInt16-
1Hit DirectionByte-
1FlagsByteBitFlags: 1 = Crit, 2 = PvP
1Cooldown CounterByte-

PlayerDeathV2 [118]

Client -> Server

SizeDescriptionTypeNotes
1Player IDByte-
?Player Death ReasonPlayerDeathReason-
2DamageInt16-
1Hit DirectionByte-
1FlagsByteBitFlags: 1 = PvP

Appendix

Color Structure

SizeDescriptionTypeNotes
1RedByte-
1GreenByte-
1BlueByte-

Tile Structure

SizeDescriptionTypeNotes
1Flags1ByteBitFlags: 1= Active, 2= Lighted, 4 = HasWall, 8 = HasLiquid, 16 = Wire1, 32 = HalfBrick, 64 = Actuator, 128 = Inactive
1Flags2ByteBitFlags: 1 = Wire2, 2 = Wire3, 4 = HasColor, 8 = HasWallColor, 16 = Slope1, 32 = Slope2, 64 = Slope3, 128 = Wire4
1ColorByteOnly if HasColor
1Wall ColorByteOnly if HasWallColor
2TypeUInt16Only if Active
2FrameXInt16Only if Active && tileFrameImportant
2FrameYInt16Only if Active && tileFrameImportant
1WallByteOnly if HasWall
1LiquidByteOnly if HasLiquid
1LiquidTypeByteOnly if HasLiquid

Chest Structure

SizeDescriptionTypeNotes
2IndexInt16-
2XInt16-
2YInt16-
?Chest NameString-

Sign Structure

SizeDescriptionTypeNotes
2IndexInt16-
2XInt16-
2YInt16-
?Sign TextString-

TileEntity Structure

SizeDescriptionTypeNotes
1TypeByte0 = Training Dummy, 1 = Item Frame, 2 = Logic Sensor
4IDInt32-
2XInt16-
2YInt16-
2NPC IndexInt16Only if Type == TrainingDummy
2Item TypeInt16Only if Type == ItemFrame
1Item PrefixByteOnly if Type == ItemFrame
2Item StackInt16Only if Type == ItemFrame
1LogicCheckTypeByteOnly if Type == LogicSensor
1OnBoolOnly if Type == LogicSensor

PlayerDeathReason

SizeDescriptionTypeNotes
1Player Death ReasonByteBitFlags: 1 = Killed via PvP, 2 = Killed via NPC, 4 = Killed via Projectile, 8 = Killed via Other, 16 = Killed via Projectile, 32 = Killed via PvP, 64 = Killed via PvP, 128 = Killed via Custom Modification
2Killer's Player IDInt16Only if BitFlags[0] is true
2Killing NPC's IndexInt16Only if BitFlags[1] is true
2Projectile IndexInt16Only if BitFlags[2] is true
1Type of Death (Other)ByteOnly if BitFlags[3] is true: 0 = Fall Damage, 1 = Drowning, 2 = Lava Damage, 3 = Fall Damage, 4 = Demon Altar, 6 = Companion Cube, 7 = Suffocation, 8 = Burning, 9 = Poison/Venom, 10 = Electrified, 11 = WoF (Escape), 12 = WoF (Licked), 13 = Chaos State, 14 = Chaos State v2 (Male), 15 = Chaos State v2 (Female)
2Projectile TypeInt16Only if BitFlags[4] is true
2Item TypeInt16Only if BitFlags[5] is true
1Item PrefixByteOnly if BitFlags[6] is true
?Death ReasonStringOnly if BitFlags[7] is true