File tree Expand file tree Collapse file tree
common/src/main/java/com/viaversion/viarewind/protocol/v1_9to1_8/rewriter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,6 +258,11 @@ public void register() {
258258 wrapper .cancel ();
259259 return ;
260260 }
261+ // 1.8 drops its own inventory on its player's death event; the death screen still shows from health
262+ if (status == 3 && wrapper .get (Types .INT , 0 ) == tracker (wrapper .user ()).clientEntityId ()) {
263+ wrapper .cancel ();
264+ return ;
265+ }
261266 wrapper .write (Types .BYTE , status );
262267 });
263268 }
@@ -409,7 +414,10 @@ public void register() {
409414 public void register () {
410415 map (Types .VAR_INT ); // Entity id
411416 handler (wrapper -> {
412- // todo check if this is correct for the own player
417+ // 1.8 never gets its own equipment (viewer-only); a modern self-send would clobber the render
418+ if (wrapper .get (Types .VAR_INT , 0 ) == tracker (wrapper .user ()).clientEntityId ()) {
419+ wrapper .cancel ();
420+ }
413421 int slot = wrapper .read (Types .VAR_INT );
414422 if (slot == 1 ) {
415423 wrapper .cancel ();
You can’t perform that action at this time.
0 commit comments