Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Logging for Unread Packet Data #2698

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ghzdude
Copy link
Contributor

@ghzdude ghzdude commented Jan 14, 2025

What

Improves the logging for unread packet data

Implementation Details

Add a method to iterate through a classes fields to find valid data codes, then put the name of that field into a Int2String map.
the method also allows for addons to register their id classes as well
if the id is not registered, "Unknown_DataCode:#" is returned instead, with # being the id.
Adds a static method to ISyncedTileEntity to handle unread packet logging
log unread packet data at the MTE level for covers

Outcome

Logging now tells us exactly which ID was called instead of just its assigned int

@ghzdude ghzdude added the type: refactor Suggestion to refactor a section of code label Jan 14, 2025
@ghzdude ghzdude requested a review from a team as a code owner January 14, 2025 00:40
log initial data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant