Skip to content

Commit

Permalink
Forgot to call handleQueryResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Sep 15, 2023
1 parent 337cb78 commit 5baadac
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
import net.minecraft.network.packet.s2c.play.ExperienceOrbSpawnS2CPacket;
import net.minecraft.network.packet.s2c.play.NbtQueryResponseS2CPacket;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
Expand Down Expand Up @@ -92,6 +93,13 @@ public void onOnCustomPayload(CustomPayloadS2CPacket packet, CallbackInfo ci) {
}
}

@Inject(method = "onNbtQueryResponse", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/NetworkThreadUtils;forceMainThread(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/listener/PacketListener;Lnet/minecraft/util/thread/ThreadExecutor;)V", shift = At.Shift.AFTER), cancellable = true)
private void onOnNbtQueryResponse(NbtQueryResponseS2CPacket packet, CallbackInfo ci) {
if (ccDataQueryHandler.handleQueryResponse(packet.getTransactionId(), packet.getNbt())) {
ci.cancel();
}
}

@Override
public ClientcommandsDataQueryHandler clientcommands_getCCDataQueryHandler() {
return ccDataQueryHandler;
Expand Down

0 comments on commit 5baadac

Please sign in to comment.