Skip to content

Comments

[Feature] Make Blocks Preview Stick Job Do Server Side & Add Container Signature and Container Trace to Mark Unique Containers#36

Open
GLDYM wants to merge 5 commits intoMrbysco:mainfrom
GLDYM:feat/container_trace
Open

[Feature] Make Blocks Preview Stick Job Do Server Side & Add Container Signature and Container Trace to Mark Unique Containers#36
GLDYM wants to merge 5 commits intoMrbysco:mainfrom
GLDYM:feat/container_trace

Conversation

@GLDYM
Copy link

@GLDYM GLDYM commented Feb 17, 2026

What does this PR do?

  • Make blocks preview stickjob do server-side.
  • Add ContainerSignature and ContainerTrace to mark unique containers.

How does this PR change?

Make blocks preview stickjob do server-side

  • Add two new CustomPacketPayload: PacketRequestPreview & PacketPreviewResult.
  • Change logic in RenderBlockPreview, replace stickJob with lastRayTraceResult and lastStick to cache and send them to the server side.
  • The server constructs stickJob and uses PacketPreviewResult to send the blocks to the client side.

Add ContainerSignature and ContainerTrace to mark unique containers

  • Add ContainerTrace to trace containers that have been used.
  • Change interface IContainerHandler, force ContainerHandlers to implement getSignature method.
  • Change logic in ContainerManager.

Why?

Now, ContainerManager could deal with local storage like Shulker Boxes and Sophisticated Backpacks.

But there are also remote storage in many other mods like AE2, RS2, Lightland backpacks, and Beyond Dimension, which could only be read on the server side and don't bind with a specific item.

These two changes will make ContainerManager support remote storage, and slightly improve the search performance.

@Mrbysco
Copy link
Owner

Mrbysco commented Feb 17, 2026

I don't really see much reason to make the previews server-side handled, there's support for AE2 and RS2 when you use Benbenlaw's addon mods.
Also any reason why you re-formatted from tabs to spaces?

@GLDYM
Copy link
Author

GLDYM commented Feb 17, 2026

Actually, Benbenlaw's addon mods implement server-side reviews because of the lack of the original mod. (And some players said they want support of PortableCell :( . ) If trying to make more addons, server-side reviews must be implemented in every addon.

Space…… Maybe caused by VSCode, I will recheck it.

@Mrbysco
Copy link
Owner

Mrbysco commented Feb 17, 2026

I did forget to include my .editorconfig in the main branch, it exists on newer branches

@benbenlaw
Copy link

in terms of addons it would probably be better to have the preview stuff avaible server side and would remove the need for addons to implement networking and probably does open up a lot of options for other additional mod support

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants