Potentially fixes #348

This commit is contained in:
Jesse Boyd 2016-12-01 13:58:31 +11:00
parent 84fa07eec9
commit 4e1aacb566
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 4 additions and 16 deletions

View File

@ -308,20 +308,17 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
section.setIdArray(newIdArray); section.setIdArray(newIdArray);
continue; continue;
} }
boolean fill = true;
int solid = 0; int solid = 0;
char[] charArray = this.getIdArray(j); char[] charArray = this.getIdArray(j);
for (int k = 0; k < newIdArray.length; k++) { for (int k = 0; k < newIdArray.length; k++) {
char combined = charArray[k]; char combined = charArray[k];
switch (combined) { switch (combined) {
case 0: case 0:
fill = false;
continue;
case 1:
fill = false;
if (currentIdArray[k] != 0) { if (currentIdArray[k] != 0) {
solid++; solid++;
} }
continue;
case 1:
currentIdArray[k] = 0; currentIdArray[k] = 0;
continue; continue;
default: default:
@ -339,9 +336,6 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
} }
} }
getParent().setCount(0, solid, section); getParent().setCount(0, solid, section);
if (fill) {
this.setCount(j, Short.MAX_VALUE);
}
} }
// Set biomes // Set biomes

View File

@ -256,20 +256,17 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (!data) { if (!data) {
section.setBlockMetadataArray(newDataArray); section.setBlockMetadataArray(newDataArray);
} }
boolean fill = true;
int solid = 0; int solid = 0;
char[] charArray = this.getIdArray(j); char[] charArray = this.getIdArray(j);
for (int k = 0; k < newIdArray.length; k++) { for (int k = 0; k < newIdArray.length; k++) {
char combined = charArray[k]; char combined = charArray[k];
switch (combined) { switch (combined) {
case 0: case 0:
fill = false;
continue;
case 1:
fill = false;
if (currentIdArray[k] != 0) { if (currentIdArray[k] != 0) {
solid++; solid++;
} }
continue;
case 1:
currentIdArray[k] = 0; currentIdArray[k] = 0;
continue; continue;
default: default:
@ -287,9 +284,6 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
} }
} }
getParent().setCount(0, solid, section); getParent().setCount(0, solid, section);
if (fill) {
this.setCount(j, Short.MAX_VALUE);
}
} }
// Set biomes // Set biomes