Skip to content

Fix prospection data task#5076

Merged
jurrejelle merged 1 commit into
1.20.1from
jj/fix-client-command-prospector-data
Jul 11, 2026
Merged

Fix prospection data task#5076
jurrejelle merged 1 commit into
1.20.1from
jj/fix-client-command-prospector-data

Conversation

@jurrejelle

Copy link
Copy Markdown
Contributor

What

#4919 made it so that the cache was called on the server. This doesn't work since the cache lives on the client. This adds a task to "Fetch" the data from the client and send it back to the server.

AI Usage

  • No AI driven tools were used for this pull request.
  • Yes AI driven tools were used for this pull request.

If you answered yes, please fill out the following information

Agent Used

Opus 4.8 high

Agent Usage Description

Asked it to fix the problem, I reviewed

Outcome

We can share the data

How Was This Tested

GTMCP dev run

Potential Compatibility Issues

This keeps the issue of "anyone can send any prospection data to anyone" but idt we have a way around that

@jurrejelle jurrejelle requested a review from a team as a code owner July 11, 2026 11:17
@jurrejelle jurrejelle added ignore changelog PR should not be added to the changelog. type: bugfix General bug fixes 1.20.1 Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Jul 11, 2026
@github-actions github-actions Bot added the Tests: Passed Game Tests have passed on this PR label Jul 11, 2026
@jurrejelle jurrejelle merged commit e436a7a into 1.20.1 Jul 11, 2026
5 of 7 checks passed
@jurrejelle jurrejelle deleted the jj/fix-client-command-prospector-data branch July 11, 2026 11:22

import com.mojang.brigadier.CommandDispatcher;

import static net.minecraft.commands.Commands.*;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dont remove this import, it's here for ease of use if/when client commands are added

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they can add it back when they do imo, rather that than danglign imports


@Override
public void execute(NetworkEvent.Context context) {
UUID sender = Minecraft.getInstance().player.getUUID();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this fine to do on a dedicated server? I'm not sure.
Also check https://docs.minecraftforge.net/en/latest/networking/simpleimpl/#handling-packets

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it works on a dedi server, we tested before merging

register(SPacketSendWorldID.class, SPacketSendWorldID::new, NetworkDirection.PLAY_TO_CLIENT);
register(SPacketNotifyCapeChange.class, SPacketNotifyCapeChange::new, NetworkDirection.PLAY_TO_CLIENT);
register(SCPacketShareProspection.class, SCPacketShareProspection::new, null);
register(SPacketStartProspectionShare.class, SPacketStartProspectionShare::new,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move this above SCPacketProspectionShare's registration pls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

:sadge: unlucky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 ignore changelog PR should not be added to the changelog. Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. Tests: Passed Game Tests have passed on this PR type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants