Skip to content
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

Position should not be allowed to have a null World (remove Position from Block) #6551

Open
dktapps opened this issue Dec 1, 2024 · 1 comment
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Performance Type: Cleanup Removes or deprecates API methods or behaviour

Comments

@dktapps
Copy link
Member

dktapps commented Dec 1, 2024

Problem description

This is bizarre and unexpected.

Proposed solution

It's only needed because Blocks contain Positions that need to initialize with something when they aren't in a world. Really, this is an issue about removing Position from Block and having it injected via function parameters where it's needed, because the current design has resulted in a multitude of issues.

However, removing Position from Block is a huge change that I've unsuccessfully tried to do several times before. It would involve:

  • Everything that uses Block as Position to be updated
  • All plugin APIs that expose a position via Block would have to be changed
  • New APIs on events to include positions separated from blocks
  • Many BC breaks within the Block package to pass World and Vector3 params
@dktapps dktapps added Category: API Related to the plugin API BC break Breaks API compatibility Type: Cleanup Removes or deprecates API methods or behaviour labels Dec 1, 2024
@dktapps
Copy link
Member Author

dktapps commented Dec 14, 2024

Turns out Position in Block is also a significant factor in the poor performance of GC. Since Position ref World ref Server, and Server is an expensive object to do GC on. These objects cause Server to get frequently scanned for GC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Performance Type: Cleanup Removes or deprecates API methods or behaviour
Projects
Status: No status
Development

No branches or pull requests

1 participant