Skip to content

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
@ALongStringOfNumbers ALongStringOfNumbers merged commit 2ec2180 into master Jan 22, 2025
3 checks passed
@ALongStringOfNumbers ALongStringOfNumbers deleted the gh/improve-sync-logging branch January 22, 2025 02:08
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.

4 participants