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

Positionless tiles #6147

Open
dktapps opened this issue Nov 9, 2023 · 0 comments
Open

Positionless tiles #6147

dktapps opened this issue Nov 9, 2023 · 0 comments
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Category: Core Related to internal functionality Status: Blocked Depends on other changes which are yet to be completed Type: Enhancement Contributes features or other improvements to PocketMine-MP

Comments

@dktapps
Copy link
Member

dktapps commented Nov 9, 2023

Description

Positionless blocks has already been planned since PM3, as they have various advantages over the current design.

Positionless tiles would be able to be created and used in AsyncTasks, as well as being able to be freely copied. However, there are some obstacles:

  • Block inventories require positions. So far as I can tell, there's no obvious reason for this other than giving plugins information in events such as InventoryOpenEvent, which can be achieved in other ways. Breaking cyclic reference between Inventory and its holder #5033
  • Some blocks, such as brewing stands, need to register InventoryListeners that know their current position in order to notify the World to schedule an update on the block.
    • This could be solved by requiring any updater of the inventory (e.g. an InventoryWrapper in Breaking cyclic reference between Inventory and its holder #5033, or a hopper setting items into another inventory) to schedule an update on the block in question instead of doing it automatically, but this feels clunky, is less nice than the way this currently works, and prone to bugs if someone forgets to schedule the update.
    • However, it would also allow a plugin to, for example, put items into a brewing stand without activating it, e.g. if someone wanted to make brewing stands redstone-activated or something similar.

Justification

Described above. Less dependencies = more usability + easier copying. Tile data should be copyable just as easily as block data.

Alternative methods

@dktapps dktapps added Category: API Related to the plugin API Category: Core Related to internal functionality BC break Breaks API compatibility Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Nov 9, 2023
@dktapps dktapps added the Status: Blocked Depends on other changes which are yet to be completed label Nov 12, 2024
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 Category: Core Related to internal functionality Status: Blocked Depends on other changes which are yet to be completed Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

No branches or pull requests

1 participant