If the event is async and the handler return Promise, it will be handle as an async event.
However, if the event is async and the handler return smth different than Promise, it will be handle synchronously.
An async handler can specify if it wishes to be called with no concurrent handlers with the tag @noConcurrentCall
An asynchronous event is one that allows the addition of promises to be resolved before being completed.
This implementation integrates priority levels, allowing you to wait for all promises added to one level before moving on to the next.
This is made possible by separating the event call logic into several functions, which can then be integrated into AsyncEventTrait::callAsync()
This reverts commit 128eb500ebee5163583b84640a9c4f28c0218d42.
This breaks when entities in neighbouring chunks overlap into the
current chunk without actually being tracked by it.
Perhaps it might be worth having entities tracked by all chunks their
AABB touches in the future, so that we don't have to check padding
chunks and waste CPU time.
this slashes the cost of checking this with no entities by 50%, which should be the common case for farms and such.
once factoring in other things, this translates into a real-world performance gain of about 15% for block updates.
Track which direction the current node's light came from, and don't
check it again when we check the current node's adjacent blocks.
e.g. if this node was the eastern neighbour of a light source, we don't
need to check this node's western neighbour, as we already know it has
a higher light level than our own.
This improves performance of basic light spread in a void by about 6%,
which isn't a huge amount, but it's something.
I've yet to explore whether light removal could also benefit from this
change.
Added StaticSupportTrait for blocks which require unconditional support
dynamic support requirements, such as those presented by item frames and torches, are not included.
in addition, double blocks, such as tallgrass, small dripleaf and doors, do not cooperate well with this, so they are also not included.
some blocks which could be migrated (such as chorus plant) were skipped due to unresolved problems.