Fix vehicles properly this time hopefully - #57
Merged
Conversation
…hicle-passenger relationships
…hicle-passenger relationships
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts passenger/vehicle reconciliation so passenger relationships can be resolved when entities become known (to better handle out-of-order spawn vs. passenger packets), along with a few build/version and logging tweaks.
Changes:
- Refactors passenger tracking to store unresolved vehicle↔passenger relationships in
NettyDataand reconcile them on entity insertion/destruction. - Switches passenger list handling to
fastutilIntArrayListto avoid boxing and support the new reconciliation flow. - Minor updates: bump module versions, adjust deprecated debug logging verbosity, and ignore
.gradle-user/.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| platform-paper/src/main/java/games/cubi/raycastedantiesp/paper/PaperLoggerAdapter.java | Makes deprecated debug() logs least-important (level 10) to reduce default log noise. |
| platform-paper/build.gradle.kts | Bumps platformPaperVersion. |
| packetevents/src/main/java/games/cubi/raycastedantiesp/packetevents/viewcontrollers/PacketEventsEntityViewController.java | Updates passenger packet sending to use IntArrayList and triggers passenger reconciliation on insert. |
| packetevents/build.gradle.kts | Adds fastutil compileOnly dependency. |
| core/src/main/java/games/cubi/raycastedantiesp/core/view/controller/PassengerReconciliationTask.java | Removes old post-spawn retry task approach for passenger reconciliation. |
| core/src/main/java/games/cubi/raycastedantiesp/core/view/controller/PacketEntityViewController.java | Implements new passenger reconciliation flow, stale-reference cleanup, and destroy-time cleanup; updates passenger packet abstraction to IntArrayList. |
| core/src/main/java/games/cubi/raycastedantiesp/core/players/NettyData.java | Adds unresolved passenger state maps (vehicle→passengers, passenger→vehicle) and clears them on reset. |
| core/build.gradle.kts | Bumps coreVersion. |
| .gitignore | Ignores .gradle-user/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return; | ||
| } | ||
| WrapperPlayServerSetPassengers packet = new WrapperPlayServerSetPassengers(vehicle, passengers.stream().mapToInt(Integer::intValue).toArray()); | ||
| WrapperPlayServerSetPassengers packet = new WrapperPlayServerSetPassengers(vehicle, passengers.elements()); |
Comment on lines
+13
to
16
| import it.unimi.dsi.fastutil.ints.IntArrayList; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.UUID; |
Comment on lines
+13
to
16
| import it.unimi.dsi.fastutil.ints.IntArrayList; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.UUID; |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.