Implement new packets, extend API for logging, add config#3
Implement new packets, extend API for logging, add config#3ImBit merged 23 commits intoImBit:masterfrom
Conversation
…Cloth Config + Mod Menu - New packets: implement PlayerInfoUpdate, PlayerInfoRemove, SetCursorItem, CommandSuggestionsRequest/Response - Logging API: add PacketInfoList and PacketInfoValue to allow handles to log list-like values and pure values without a key-value pairing. - Config: implement Cloth Config and Mod Menu to control the packet delay setting which is now enabled. The config file is stored in config/packetninja.json. - Updated formatting: update the formatting of many packets which use list-like values (ContainerSetContent, RemoveEntities, SetPassengers, SetPlayerTeam) - Misc: added AGENTS.md for GitHub Copilot users
|
@ImBit I'm still debugging a disconnect error in PlayerInfoUpdate, but I thought you might be interested already, so I opened a draft PR lmk if you find anything |
|
I think this PR deserves a 0.1.0 version bump, but of course I'll let you decide that. |
|
Great, will have a look when i get the chance :) |
… when preferred, add clarifying comments, remove AGENTS.md (it was stupid)
# Conflicts: # build.gradle
|
@ImBit with the move towards build.gradle.kts, is there also a Kotlin-rewrite of the mod in mind? I've also readded the reflections library to the build script as the mod wasn't compiling without it, not sure why it was removed during the switch. Btw in my opinion the build workflow should be separated into a pure build and a publish workflow for automatic builds in PRs and commits, while keeping the publish as a manually activated workflow or for commits on master. |
|
@MesterMan03 my bad with removing reflections, I do not have intentions of a kotlin rewrite at the moment. I believe @BenTechDev was planning on migrating to Kotlin when they get the time, along with adding some SheepLib functionality. Not too sure what you mean with the second part of the build workflow, feel free to draft up something if you feel it would fit. |
# Conflicts: # build.gradle.kts
|
@ImBit right, so I basically renamed the old build.yml to publish.yml and created a new build.yml that only builds and uploads the artifacts to GitHub without publishing to Modrinth. It should already be working in this PR. Anyway, unless you find something problematic, the PR should be ready to be merged. |
…ster # Conflicts: # .github/workflows/publish.yml # build.gradle.kts # gradle.properties
ImBit
left a comment
There was a problem hiding this comment.
Mostly looks good, please work on the above changes, then I can make a release :)
src/client/java/xyz/bitsquidd/ninja/handler/impl/clientbound/SetCursorItemHandler.java
Show resolved
Hide resolved
src/client/java/xyz/bitsquidd/ninja/command/PacketInterceptionCommand.java
Outdated
Show resolved
Hide resolved
src/client/java/xyz/bitsquidd/ninja/handler/impl/clientbound/PlayerInfoUpdateHandler.java
Outdated
Show resolved
Hide resolved
src/client/java/xyz/bitsquidd/ninja/handler/impl/clientbound/SetPlayerTeamHandler.java
Outdated
Show resolved
Hide resolved
src/client/java/xyz/bitsquidd/ninja/format/PacketInfoBundle.java
Outdated
Show resolved
Hide resolved
src/client/java/xyz/bitsquidd/ninja/format/PacketInfoListElement.java
Outdated
Show resolved
Hide resolved
ImBit
left a comment
There was a problem hiding this comment.
Happy with this, will bump to 0.1.0 and release :)
This PR implements new packet handlers, massively overhauls the PacketInfoBundle API without breaking compatibility and adds configuration via Cloth Config and Mod Menu (also re-enables the previously disabled packet delay feature that triggered the config TODO).
Packets implemented:
Overhauled PacketInfoBundle:
PacketInfoBundle.ofRows(PacketType type, Component name, List<? extends PacketInfoRow> rows).PacketInfoBundle.of(PacketType type, Component name, List<PacketInfoSegment> segments)is kept as-is for backwards compatibility, but it internally uses the ofRows constructor.Some previous handlers were updated to reflect the changes in PacketInfoBundle:
Added configuration via Cloth Config + Mod Menu:
config/packetninja.json.Misc: