Skip to content

Add permission node to allow f3+I#22

Merged
Remynfv merged 2 commits intoRemynfv:masterfrom
hhhzzzsss:nbt-query-permission
Jul 2, 2025
Merged

Add permission node to allow f3+I#22
Remynfv merged 2 commits intoRemynfv:masterfrom
hhhzzzsss:nbt-query-permission

Conversation

@hhhzzzsss
Copy link
Contributor

Players in legitimoose worlds that are on the admin list cannot use f3+I.

If you use f3+I on entities or tile-entities, the vanilla Minecraft client does the following:

  • If the client thinks it has op permission level >= 2, it will send a tag query packet to the server and wait for a response
  • If the client thinks it has op permission level < 2, it will return client-side data

On legitimoose, the server tells "admin" clients that they are opped, but does not actually op them. Thus, when someone who is an admin in a world uses f3+I, the client will send an nbt query packet but the server does not respond, so the client just waits forever.

This PR adds a minecraft.nbt.query permission node that, when given, makes the server to respond to a player's nbt queries as if they were opped. That way, if you give admin players this permission, f3+I will behave like normal.

I also updated the gradle wrapper since it wouldn't build for me otherwise.

@SB2DD
Copy link
Collaborator

SB2DD commented Jul 1, 2025

Very cool! (didn't even know f3+I existed 😭) I will test very soon™

@SB2DD SB2DD self-requested a review July 1, 2025 02:58
@SB2DD SB2DD added bug Something isn't working enhancement New feature or request labels Jul 1, 2025
Copy link
Collaborator

@SB2DD SB2DD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Now that I think about it, you could maybe even suggest these changes to the real Paper repo! 🫨

(The reason you had issues building is because I just specified SNAPSHOT for paperweight, which at the time fixed a bug we had, but it didn't have a release for it. Although in more recent versions, paperweight updated their wrapper requirement, which caused your issues. A fix that should've been done would maybe to have downgraded paperweight from snapshot to like beta.16 (version that has the bugfix I was talking about), but this won't be necessary, as a wrapper and paperweight update will be done anyways for 1.21.7)

@SB2DD SB2DD requested a review from Remynfv July 2, 2025 02:48
@Remynfv
Copy link
Owner

Remynfv commented Jul 2, 2025

This is awesome, I had tried to fix this issue a while back and didn't get around to it. So glad you submitted this, great enhancement!

@Remynfv Remynfv merged commit 9db5595 into Remynfv:master Jul 2, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants