mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 21:02:15 +00:00
2.0.0 Alpha1 Fixes (#1240)
This commit is contained in:
1 parent
9a4f0f9b99
commit
42d7ed58aa
5 files changed
+38
-9
No files matched your search
@@ -258,13 +258,14 @@ public class WorldSlice implements IBlockAccessExtended, FLBlockAccess {
|
||||
|
||||
@Override
|
||||
public BiomeGenBase getBiomeGenForCoords(int x, int z) {
|
||||
if (!blockBoxContains(this.volume, x, volume.minY, z)) {
|
||||
return BiomeGenBase.plains;
|
||||
}
|
||||
|
||||
final int relX = x - this.baseX;
|
||||
final int relZ = z - this.baseZ;
|
||||
|
||||
final int sectionGridBlocks = SECTION_LENGTH << 4;
|
||||
if (relX < 0 || relX >= sectionGridBlocks || relZ < 0 || relZ >= sectionGridBlocks) {
|
||||
return BiomeGenBase.plains;
|
||||
}
|
||||
|
||||
final BiomeGenBase biome = this.biomeData[getLocalSectionIndex(relX >> 4, 0, relZ >> 4)]
|
||||
[(x & 15) | (z & 15) << 4];
|
||||
return biome == null ? BiomeGenBase.plains : biome;
|
||||
|
||||
Reference in new issue
Block a user