Using Spark to profile a server, we found that RoughAIBreakBlocks was causing significant performance issues.
This is mainly due to its use of ArrayList.contains, and in part because of path recalculation every tick.
The use of a set instead of a list resolves the first issue, and recalculating the path only once every 40 ticks, as EntityAIMoveToBlock does, helps with the second issue.
Using Spark to profile a server, we found that
RoughAIBreakBlocks
was causing significant performance issues.This is mainly due to its use of
ArrayList.contains
, and in part because of path recalculation every tick.The use of a set instead of a list resolves the first issue, and recalculating the path only once every 40 ticks, as
EntityAIMoveToBlock
does, helps with the second issue.This PR implements both changes.