Skip to content

Commit 499ffeb

Browse files
committed
Try fix incorrect stop data
1 parent 05e99f8 commit 499ffeb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fabric/src/main/java/com/lx862/jcm/mod/network/scripting/RequestStopsDataC2SPacket.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ public void runServer(MinecraftServer minecraftServer, ServerPlayerEntity server
105105
if(routeIdx >= depot.routes.size()) break;
106106
belongingRoute = depot.routes.get(routeIdx);
107107
routeStopsData = new VehicleDataCache.RouteStopsData(belongingRoute.getId());
108-
routeStopsData.addStop(stopObject);
108+
// Next route also has the same RoutePlatform assigned
109+
if(!belongingRoute.getRoutePlatforms().isEmpty() && belongingRoute.getRoutePlatforms().get(0).getPlatform().getId() == platformId) {
110+
routeStopsData.addStop(stopObject);
111+
}
109112
}
110113
}
111114
}

0 commit comments

Comments
 (0)