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

Refactor ChangeBlockEvent with Operations #3216

Merged
merged 14 commits into from Nov 30, 2020
Merged

Conversation

gabizou
Copy link
Member

@gabizou gabizou commented Nov 29, 2020

SpongeAPI | SpongeCommon

Implementation is very straight forward.

Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Only the BlockEventBasedTransaction will perform a post currently, but
this allows for multiple transaction types to perform a "gather" based
on their type of transaction. In a situation that another transaction
needs to operate on a composite, this can potentially create such a
composite event of several transactions.

Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
This implementation pre-sorts the list of transactions into world keyed
lists. There is the possibility that if a world is no longer available,
the event and transactions are merely ignored.

Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Pistons would freely ignore tracking without us knowing leading to some
ghost TileEntities being left in the world, only to be removed on world
re-load. The interesting aspect of these changes is that without
changing much of the logging aspect, we're able to repeat most of the
same logic as before, where we allow the block event to be added, and
only after the transactions are event driven, do we "restore" the block
event and cancel later by list removal.

Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Entities that are spawned while ticking entities are added to a
separate list in the ServerWorld. To "roll back", we can
safely remove the entities from the added list and the
chunk. This will allow us to safely make the modifications
without triggering some other hacky workarounds.

Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
@gabizou gabizou force-pushed the api8/changeblock-event-update branch from 4f31fb5 to f8e7ab8 Compare November 30, 2020 01:23
@gabizou gabizou merged commit 5ec91dd into api-8 Nov 30, 2020
@gabizou gabizou deleted the api8/changeblock-event-update branch December 5, 2020 18:24
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.

None yet

1 participant