[SPIGOT-2286] Spigot loads adjacent chunks when tile entities are queried on a loaded chunk Created: 15/May/16 Updated: 16/May/16 Resolved: 16/May/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | A P | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | 1.9, spigot | ||
Environment: |
Spigot/latest version |
Description |
If a user calls getTileEntities() on a loaded chunk, it is unreasonable to expect this will cause adjacent chunks to load, however this is exactly what happens. getTileEntities() creates a new CraftBlockState for each CraftBlock. In the CraftBlockState constructor, getLightLevel() is called. This is definitely undesirable and can result in hundreds of extra chunks being loaded when any plugin does a wider entity query. (Like the essentials command /gc for example) |