crucial performance optimization

This commit is contained in:
Leijurv 2018-11-23 11:22:49 -08:00
parent 84cd4b1acb
commit 5aa78cd478
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -92,7 +92,8 @@ public final class ChunkPacker {
for (int z = 0; z < 16; z++) { for (int z = 0; z < 16; z++) {
// @formatter:off // @formatter:off
https://www.ibm.com/developerworks/library/j-perry-writing-good-java-code/index.html https:
//www.ibm.com/developerworks/library/j-perry-writing-good-java-code/index.html
// @formatter:on // @formatter:on
for (int x = 0; x < 16; x++) { for (int x = 0; x < 16; x++) {
for (int y = 255; y >= 0; y--) { for (int y = 255; y >= 0; y--) {
@ -124,7 +125,7 @@ public final class ChunkPacker {
private static PathingBlockType getPathingBlockType(IBlockState state) { private static PathingBlockType getPathingBlockType(IBlockState state) {
Block block = state.getBlock(); Block block = state.getBlock();
if (block.equals(Blocks.WATER) && !MovementHelper.isFlowing(state)) { if (block == Blocks.WATER && !MovementHelper.isFlowing(state)) {
// only water source blocks are plausibly usable, flowing water should be avoid // only water source blocks are plausibly usable, flowing water should be avoid
return PathingBlockType.WATER; return PathingBlockType.WATER;
} }