mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 12:16:00 +01:00
Fixes #695
This commit is contained in:
parent
2f344e29ce
commit
81ffd52e9f
@ -306,13 +306,11 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sections[j] = section = new ChunkSection(j << 4, flag);
|
sections[j] = section = new ChunkSection(j << 4, flag);
|
||||||
section.setIdArray(null);
|
BukkitQueue17.fieldCompactId.set(section, 0);
|
||||||
section.setIdArray(newIdArray);
|
BukkitQueue17.fieldIds.set(section, newIdArray);
|
||||||
getParent().setCount(0, count - this.getAir(j), section);
|
getParent().setCount(0, count - this.getAir(j), section);
|
||||||
section.setDataArray(null);
|
BukkitQueue17.fieldCompactData.set(section, (byte) 0);
|
||||||
if (newDataArray != null) {
|
BukkitQueue17.fieldData.set(section, newDataArray);
|
||||||
section.setDataArray(newDataArray);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (count >= 4096) {
|
if (count >= 4096) {
|
||||||
@ -320,13 +318,11 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
|||||||
sections[j] = null;
|
sections[j] = null;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
section.setIdArray(null);
|
BukkitQueue17.fieldCompactId.set(section, 0);
|
||||||
section.setIdArray(newIdArray);
|
BukkitQueue17.fieldIds.set(section, newIdArray);
|
||||||
getParent().setCount(0, count - this.getAir(j), section);
|
getParent().setCount(0, count - this.getAir(j), section);
|
||||||
section.setDataArray(null);
|
BukkitQueue17.fieldCompactData.set(section, (byte) 0);
|
||||||
if (newDataArray != null) {
|
BukkitQueue17.fieldData.set(section, newDataArray);
|
||||||
section.setDataArray(newDataArray);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
char[] charArray = this.getIdArray(j);
|
char[] charArray = this.getIdArray(j);
|
||||||
@ -358,21 +354,21 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
|||||||
int i2 = i << 1;
|
int i2 = i << 1;
|
||||||
int i3 = i2 + 1;
|
int i3 = i2 + 1;
|
||||||
byte val = newDataArray.a[i];
|
byte val = newDataArray.a[i];
|
||||||
if (newIdArray[i3] != 0) {
|
if (charArray[i3] != 0) {
|
||||||
if (newIdArray[i2] != 0) continue;
|
if (charArray[i2] != 0) continue;
|
||||||
newDataArray.a[i] = (byte) (val & 240 | compactData);
|
newDataArray.a[i] = (byte) (val & 240 | compactData);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (newIdArray[i2] != 0) {
|
if (charArray[i2] != 0) {
|
||||||
if (newIdArray[i3] != 0) continue;
|
if (charArray[i3] != 0) continue;
|
||||||
newDataArray.a[i] = (byte) (val & 15 | (compactData) << 4);
|
newDataArray.a[i] = (byte) (val & 15 | (compactData) << 4);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
newDataArray.a[i] = full;
|
newDataArray.a[i] = full;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
section.setDataArray(null);
|
BukkitQueue17.fieldCompactData.set(section, (byte) 0);
|
||||||
section.setDataArray(newDataArray);
|
BukkitQueue17.fieldData.set(section, newDataArray);
|
||||||
}
|
}
|
||||||
} else if (newDataArray == null) {
|
} else if (newDataArray == null) {
|
||||||
for (int i = 0; i < currentDataArray.a.length; i++) {
|
for (int i = 0; i < currentDataArray.a.length; i++) {
|
||||||
@ -402,8 +398,8 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
|||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < 4096; i++) if (newIdArray[i] != 0) solid++;
|
for (int i = 0; i < 4096; i++) if (newIdArray[i] != 0) solid++;
|
||||||
}
|
}
|
||||||
section.setIdArray(null);
|
BukkitQueue17.fieldCompactId.set(section, 0);
|
||||||
section.setIdArray(newIdArray);
|
BukkitQueue17.fieldIds.set(section, newIdArray);
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < 4096; i++) {
|
for (int i = 0; i < 4096; i++) {
|
||||||
if (charArray[i] != 0) currentIdArray[i] = newIdArray[i];
|
if (charArray[i] != 0) currentIdArray[i] = newIdArray[i];
|
||||||
@ -412,7 +408,9 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
|||||||
}
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
for (int k = 0; k < 4096; k++) {
|
for (int k = 0; k < 4096; k++) {
|
||||||
int dataByte = FaweCache.getData(charArray[k]);
|
int value = charArray[k];
|
||||||
|
if (value != 0) {
|
||||||
|
int dataByte = FaweCache.getData(value);
|
||||||
int kShift = k >> 1;
|
int kShift = k >> 1;
|
||||||
if ((k & 1) == 0) {
|
if ((k & 1) == 0) {
|
||||||
currentDataArray.a[kShift] = (byte) (currentDataArray.a[kShift] & 240 | dataByte);
|
currentDataArray.a[kShift] = (byte) (currentDataArray.a[kShift] & 240 | dataByte);
|
||||||
@ -421,6 +419,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getParent().setCount(0, solid, section);
|
getParent().setCount(0, solid, section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user