geforkt von Mirrors/Paper
SPIGOT-6554: Worlds created with the bukkit ChunkGenerator cannot save
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
967b0303f3
Commit
733b118606
@ -30,7 +30,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
|||||||
/* pp for tests */ CraftChunkData(int minHeight, int maxHeight) {
|
/* pp for tests */ CraftChunkData(int minHeight, int maxHeight) {
|
||||||
this.minHeight = minHeight;
|
this.minHeight = minHeight;
|
||||||
this.maxHeight = maxHeight;
|
this.maxHeight = maxHeight;
|
||||||
sections = new ChunkSection[(maxHeight - minHeight) >> 4];
|
sections = new ChunkSection[(((maxHeight - 1) >> 4) + 1) - (minHeight >> 4)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -162,7 +162,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
|||||||
int offset = (y - minHeight) >> 4;
|
int offset = (y - minHeight) >> 4;
|
||||||
ChunkSection section = sections[offset];
|
ChunkSection section = sections[offset];
|
||||||
if (create && section == null) {
|
if (create && section == null) {
|
||||||
sections[offset] = section = new ChunkSection(offset << 4);
|
sections[offset] = section = new ChunkSection(offset + (minHeight >> 4));
|
||||||
}
|
}
|
||||||
return section;
|
return section;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren