mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-12 02:40:56 +01:00
Handle negative Y chunks from 1.17 in 1.18 code
This commit is contained in:
parent
06885c0353
commit
2ef6bf35a5
@ -223,7 +223,7 @@ public class MapChunkCache118 extends GenericMapChunkCache {
|
||||
}
|
||||
else { // Else, apply legacy biomes
|
||||
if (old3d != null) {
|
||||
BiomeMap m[] = old3d.get(secnum);
|
||||
BiomeMap m[] = old3d.get((secnum > 0) ? ((secnum < old3d.size()) ? secnum : old3d.size()-1) : 0);
|
||||
if (m != null) {
|
||||
for (int j = 0; j < 64; j++) {
|
||||
sbld.xyzBiome(j & 0x3, (j & 0x30) >> 4, (j & 0xC) >> 2, m[j]);
|
||||
|
@ -265,7 +265,7 @@ public class FabricMapChunkCache extends GenericMapChunkCache {
|
||||
}
|
||||
else { // Else, apply legacy biomes
|
||||
if (old3d != null) {
|
||||
BiomeMap m[] = old3d.get(secnum);
|
||||
BiomeMap m[] = old3d.get((secnum > 0) ? ((secnum < old3d.size()) ? secnum : old3d.size()-1) : 0);
|
||||
if (m != null) {
|
||||
for (int j = 0; j < 64; j++) {
|
||||
sbld.xyzBiome(j & 0x3, (j & 0x30) >> 4, (j & 0xC) >> 2, m[j]);
|
||||
|
@ -230,7 +230,7 @@ public class ForgeMapChunkCache extends GenericMapChunkCache {
|
||||
}
|
||||
else { // Else, apply legacy biomes
|
||||
if (old3d != null) {
|
||||
BiomeMap m[] = old3d.get(secnum);
|
||||
BiomeMap m[] = old3d.get((secnum > 0) ? ((secnum < old3d.size()) ? secnum : old3d.size()-1) : 0);
|
||||
if (m != null) {
|
||||
for (int j = 0; j < 64; j++) {
|
||||
sbld.xyzBiome(j & 0x3, (j & 0x30) >> 4, (j & 0xC) >> 2, m[j]);
|
||||
|
Loading…
Reference in New Issue
Block a user