Skip to content

Commit

Permalink
Update src/mixins/java/org/spongepowered/common/mixin/core/network/pr…
Browse files Browse the repository at this point in the history
…otocol/login/ServerboundCustomQueryAnswerPacketMixin.java

Co-authored-by: Joni Aromaa <[email protected]>
  • Loading branch information
avaruus1 and aromaa authored Nov 24, 2023
1 parent ae0b826 commit a69e0c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public abstract class ServerboundCustomQueryAnswerPacketMixin {

@Inject(method = "readUnknownPayload", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/FriendlyByteBuf;skipBytes(I)Lnet/minecraft/network/FriendlyByteBuf;"), cancellable = true)
private static void readUnknownPayload(final FriendlyByteBuf $$0, final CallbackInfoReturnable<CustomQueryAnswerPayload> cir) {
private static void impl$onReadUnknownPayload(final FriendlyByteBuf $$0, final CallbackInfoReturnable<CustomQueryAnswerPayload> cir) {
final var payload = $$0.readNullable(buf -> new FriendlyByteBuf(buf.readBytes(buf.readableBytes())));

cir.setReturnValue(payload == null ? null : buf -> buf.writeBytes(payload.copy()));
Expand Down

0 comments on commit a69e0c7

Please sign in to comment.