mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Get all logs in Tree Feller, and optimize performance
Tree Feller has been shown, both anecdotally and with timings, to put a strain on the server, and therefore is worthy of the effort of optimization. Prior to this change, on jungle trees, Tree Feller would take around 20-40 milliseconds to process a Jungle Tree after the JIT kicked in, and around 15-25 milliseconds for a normal tree. Additionally, logs would be left up in the air for jungle trees. After this change, Tree Feller takes 2-5 milliseconds on normal trees, and 10-15 milliseconds on jungle trees, and no logs are left up in the air.
This commit is contained in:
@ -199,16 +199,6 @@ public final class BlockUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a given block should be affected by Tree Feller
|
||||
*
|
||||
* @param blockState The {@link BlockState} of the block to check
|
||||
* @return true if the block should affected by Tree Feller, false otherwise
|
||||
*/
|
||||
public static boolean affectedByTreeFeller(BlockState blockState) {
|
||||
return isLog(blockState) || isLeaves(blockState);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given block is a log
|
||||
*
|
||||
|
Reference in New Issue
Block a user