File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -189,18 +189,17 @@ export const packetHandler =
189
189
if ( action !== 2 ) return
190
190
data = data . slice ( actionLen )
191
191
}
192
- data = data . slice ( readVarInt ( data ) [ 1 ] + 4 ) // Remove Player/Entity ID
192
+ data = data . slice ( readVarInt ( data ) [ 1 ] ) // Remove Player ID
193
+ if ( version <= protocolMap [ '1.19.4' ] ) data = data . slice ( 4 ) // Remove Killer ID
193
194
const [ chatLen , chatViLength ] = readVarInt ( data )
194
195
const deathMessage = parseValidJson (
195
196
data . slice ( chatViLength , chatViLength + chatLen ) . toString ( 'utf8' )
196
197
)
197
198
if (
198
199
( typeof deathMessage === 'string' && deathMessage . trim ( ) ) ||
199
- deathMessage ?. text ||
200
- deathMessage ?. extra ?. length > 0
201
- ) {
200
+ Object . keys ( deathMessage ) . length !== 0
201
+ )
202
202
addMessage ( deathMessage )
203
- }
204
203
// Automatically respawn.
205
204
// LOW-TODO: Should this be manual, or a dialog, like MC?
206
205
addMessage ( deathRespawnMessage )
You can’t perform that action at this time.
0 commit comments