mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +01:00
Optimize set air for 1.11
This commit is contained in:
parent
65c0a0e06d
commit
59c45f0fa7
@ -338,12 +338,16 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
|||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
int air = this.getAir(j);
|
||||||
final char[] array = this.getIdArray(j);
|
final char[] array = this.getIdArray(j);
|
||||||
if (array == null) {
|
if (array == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ChunkSection section = sections[j];
|
ChunkSection section = sections[j];
|
||||||
if (section == null) {
|
if (section == null) {
|
||||||
|
if (count == air) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (this.sectionPalettes != null && this.sectionPalettes[j] != null) {
|
if (this.sectionPalettes != null && this.sectionPalettes[j] != null) {
|
||||||
section = sections[j] = getParent().newChunkSection(j << 4, flag, null);
|
section = sections[j] = getParent().newChunkSection(j << 4, flag, null);
|
||||||
getParent().setPalette(section, this.sectionPalettes[j]);
|
getParent().setPalette(section, this.sectionPalettes[j]);
|
||||||
@ -354,6 +358,10 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} else if (count >= 4096) {
|
} else if (count >= 4096) {
|
||||||
|
if (air >= 4096) {
|
||||||
|
sections[j] = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (this.sectionPalettes != null && this.sectionPalettes[j] != null) {
|
if (this.sectionPalettes != null && this.sectionPalettes[j] != null) {
|
||||||
getParent().setPalette(section, this.sectionPalettes[j]);
|
getParent().setPalette(section, this.sectionPalettes[j]);
|
||||||
getParent().setCount(0, count - this.getAir(j), section);
|
getParent().setCount(0, count - this.getAir(j), section);
|
||||||
|
Loading…
Reference in New Issue
Block a user