File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
common/src/main/java/com/viaversion/viarewind/protocol/v1_9to1_8/rewriter Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -409,11 +409,7 @@ public void register() {
409409 final int vehicle = wrapper .read (Types .VAR_INT );
410410 final IntList oldPassengers = tracker .getPassengers (vehicle );
411411
412- final int count = wrapper .read (Types .VAR_INT );
413- final IntList passengers = new IntArrayList ();
414- for (int i = 0 ; i < count ; i ++) {
415- passengers .add (wrapper .read (Types .VAR_INT ));
416- }
412+ final IntList passengers = new IntArrayList (wrapper .read (Types .VAR_INT_ARRAY_PRIMITIVE ));
417413 tracker .setPassengers (vehicle , passengers );
418414
419415 if (!oldPassengers .isEmpty ()) {
@@ -425,7 +421,7 @@ public void register() {
425421 detach .scheduleSend (Protocol1_9To1_8 .class );
426422 }
427423 }
428- for (int i = 0 ; i < count ; i ++) {
424+ for (int i = 0 ; i < passengers . size () ; i ++) {
429425 final int attachedEntityId = passengers .getInt (i );
430426 final int holdingEntityId = i == 0 ? vehicle : passengers .getInt (i - 1 );
431427
You can’t perform that action at this time.
0 commit comments