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() {
409
409
final int vehicle = wrapper .read (Types .VAR_INT );
410
410
final IntList oldPassengers = tracker .getPassengers (vehicle );
411
411
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 ));
417
413
tracker .setPassengers (vehicle , passengers );
418
414
419
415
if (!oldPassengers .isEmpty ()) {
@@ -425,7 +421,7 @@ public void register() {
425
421
detach .scheduleSend (Protocol1_9To1_8 .class );
426
422
}
427
423
}
428
- for (int i = 0 ; i < count ; i ++) {
424
+ for (int i = 0 ; i < passengers . size () ; i ++) {
429
425
final int attachedEntityId = passengers .getInt (i );
430
426
final int holdingEntityId = i == 0 ? vehicle : passengers .getInt (i - 1 );
431
427
You can’t perform that action at this time.
0 commit comments