SPIGOT-7188: ChunkSnapshot biome y coordinate doesn't match chunk biome y coord
This commit is contained in:
parent
eff1743b9c
commit
e142fb9fd3
@ -150,7 +150,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
|
||||
Preconditions.checkState(biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true");
|
||||
validateChunkCoordinates(x, y, z);
|
||||
|
||||
PalettedContainerRO<Holder<BiomeBase>> biome = this.biome[getSectionIndex(y >> 2)];
|
||||
PalettedContainerRO<Holder<BiomeBase>> biome = this.biome[getSectionIndex(y)]; // SPIGOT-7188: Don't need to convert y to biome coordinate scale since it is bound to the block chunk section
|
||||
return CraftBlock.biomeBaseToBiome(biomeRegistry, biome.get(x >> 2, (y & 0xF) >> 2, z >> 2));
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
|
||||
Preconditions.checkState(biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true");
|
||||
validateChunkCoordinates(x, y, z);
|
||||
|
||||
PalettedContainerRO<Holder<BiomeBase>> biome = this.biome[getSectionIndex(y >> 2)];
|
||||
PalettedContainerRO<Holder<BiomeBase>> biome = this.biome[getSectionIndex(y)]; // SPIGOT-7188: Don't need to convert y to biome coordinate scale since it is bound to the block chunk section
|
||||
return biome.get(x >> 2, (y & 0xF) >> 2, z >> 2).value().getTemperature(new BlockPosition((this.x << 4) | x, y, (this.z << 4) | z));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user