Skip to content

Comments

Rewrite the block entity system#2564

Draft
IntegratedQuantum wants to merge 17 commits intoPixelGuys:masterfrom
IntegratedQuantum:block_entity_rewrite
Draft

Rewrite the block entity system#2564
IntegratedQuantum wants to merge 17 commits intoPixelGuys:masterfrom
IntegratedQuantum:block_entity_rewrite

Conversation

@IntegratedQuantum
Copy link
Member

@IntegratedQuantum IntegratedQuantum commented Feb 16, 2026

The main goals here are to allow multiply block entities per block and improve behavior on addon and code changes.
Relevant changes are

  • changing how a component is stored in binary, to address this I plan to add a version number to the binary format.
  • changing composition of a block entity (e.g. removing the inventory), to fix this I plan to keep the component alive but inaccessible, so you cannot open the inventory, but it drops when broken.

Remaining work:

  • Use a global id for all block entities
  • Keep track of the components independently of the block type, a block entity without any components should be removed.
  • sign data doesn't appear to get stored on the server correctly
  • refactor all the naming from block entity type to block entity component type
  • remove the onInteract function from the VTable and use the per block onInteract callback instead
  • make a block entity palette for binary storage
  • Revise the storage format and migrate the old one
  • Rethink how data is shared between server and client (→ When placing a chest and instantly opening it (with 1 ms break/place delay), the server sometimes rejects the corresponding open inventory command #2561)
  • Assert that all client block entity updates happen on the render thread
  • Ensure that empty component and entities are properly removed
  • Remove blockEntityUpdate protocol, it only contains unrelated helper functions at this point

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.

1 participant