-
Notifications
You must be signed in to change notification settings - Fork 143
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
Feature QueryBlockNbt #419
Comments
I have twice noticed that people have tried implementing this feature but hit the same issue. The client appears to never send the packet, even if pressing Shift+F3+I. The current theory is that it has something to do with opt levels. I don't understand what the issue is, but for anyone interested here is a link to the last time it was mentioned in the discord. |
The first problem is to even get the client to send the packet the client needs to be send a packet telling it that it's OP level >= 3, |
Feature Request
Implement rudimentary support for the QueryBlockNbt packet.
Description
Implement rudimentary support for the QueryBlockNbt request. When a player/client presses Shift+F3+I the overview specifies what block the players is looking at. This is done by sending this request to the server. The client specifies a xyz of a block it would like to query.
It is one of 33 packets in feather/server/src/packet_handlers.rs that are not handled.
Describe the solution you'd like
To implement this feature properly we would have to check for line of sight, else a hacked client could use this feature for x-ray and player radar. The minimal viable solution is to just check that the block in question is within a, lets say, 6 block radius of the caller.
Allowing a client to query any arbitrary position is probably a bad idea anyway, because timing of the response could tell if a chunk is loaded or not. Therefore we should never allow someone to call this on a position further away then max render distance.
The file feather/common/src/world.rs:122 has a function for querying the world about a block position. And it is accessible through the variable game.
The text was updated successfully, but these errors were encountered: