Don't synchronise across the entire edit for a single ChunkSection load (speed boost)

This commit is contained in:
dordsor21
2021-01-01 16:48:17 +00:00
parent 606cfa5cbc
commit 42346b429b
5 changed files with 32 additions and 10 deletions

View File

@ -825,7 +825,7 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks {
return super.trim(true);
} else {
for (int i = 0; i < 16; i++) {
if (!hasSection(i) || super.sections[i] == CharBlocks.EMPTY) {
if (!hasSection(i) || !super.sections[i].isFull()) {
continue;
}
ChunkSection existing = getSections(true)[i];

View File

@ -827,7 +827,7 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks {
return super.trim(true);
} else {
for (int i = 0; i < 16; i++) {
if (!hasSection(i) || super.sections[i] == CharBlocks.EMPTY) {
if (!hasSection(i) || !super.sections[i].isFull()) {
continue;
}
ChunkSection existing = getSections(true)[i];

View File

@ -830,7 +830,7 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks {
return super.trim(true);
} else {
for (int i = 0; i < 16; i++) {
if (!hasSection(i) || super.sections[i] == CharBlocks.EMPTY) {
if (!hasSection(i) || !super.sections[i].isFull()) {
continue;
}
ChunkSection existing = getSections(true)[i];

View File

@ -830,7 +830,7 @@ public class BukkitGetBlocks_1_16_4 extends CharGetBlocks {
return super.trim(true);
} else {
for (int i = 0; i < 16; i++) {
if (!hasSection(i) || super.sections[i] == CharBlocks.EMPTY) {
if (!hasSection(i) || !super.sections[i].isFull()) {
continue;
}
ChunkSection existing = getSections(true)[i];