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

Name methods and locals in PacketCodecs.BYTE_ARRAY #3916

Closed
wants to merge 1 commit into from

Conversation

ZWORX52
Copy link

@ZWORX52 ZWORX52 commented Jul 31, 2024

Ensures consistency with the other members of PacketCodecs and, in the case of naming the functions, is actually out of a concern with code correctness (encode and decode need to be overridden).

@apple502j apple502j closed this Aug 1, 2024
@apple502j
Copy link
Contributor

Methods that override another methods should not be renamed.

@ZWORX52
Copy link
Author

ZWORX52 commented Aug 1, 2024

Sorry, I must have misworded it. The methods that are being overridden are called encode() and decode() and are overridden properly elsewhere in PacketCodecs, but in this instance, the code tries to override methods named method_xxxxx instead of encode() or decode(). This is the code error that I'm trying to fix.
image

Here's what another implementation of PacketCodec looks like:
image
The other PacketCodecs all have encode() and decode() named, so I thought I'd name this one too.

@Dev0Louis
Copy link
Contributor

This is due to a fault in the Decompiler as far as I can see. As it should use the boxed type.
I think that this will just need to be fixed by vineflower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants