Block cache corruption when modifying results of getBlock()
#2770
Labels
Category: API
Related to the plugin API
Category: Core
Related to internal functionality
Status: Debugged
Cause of the bug has been found, but not fixed
Issue description
Blocks are cached at the world level to improve performance of accesses. This is problematic because
getBlock()
does not clone or remove blocks from the cache, so if they are modified without setting them back into the world, the block cache becomes corrupted.This has been seen in the past when plugin devs modify the meta values of things like wool expecting to see a different colour - it sort-of works if you click on it totrigger block updates, but the changes don't save.
getBlock()
should have no effect on the world or its block cacheSteps to reproduce the issue
OS and versions
The text was updated successfully, but these errors were encountered: