0

changed biome fix to be more consistent with the other region code

This commit is contained in:
Aaron Griffith
2011-03-03 20:48:32 -05:00
parent a6805c2e0c
commit 48642e0e5b
2 changed files with 3 additions and 6 deletions

View File

@@ -676,8 +676,8 @@ class ChunkRenderer(object):
biomeColorData = textures.getBiomeData(self.world.worlddir, biomeColorData = textures.getBiomeData(self.world.worlddir,
self.chunkX, self.chunkY) self.chunkX, self.chunkY)
# in the 32x32 block of biome data, what chunk is this?l # in the 32x32 block of biome data, what chunk is this?l
startX = (self.chunkX - int(math.floor(self.chunkX/32)*32)) startX = self.chunkX % 32
startY = (self.chunkY - int(math.floor(self.chunkY/32)*32)) startY = self.chunkY % 32
# Each block is 24x24 # Each block is 24x24
# The next block on the X axis adds 12px to x and subtracts 6px from y in the image # The next block on the X axis adds 12px to x and subtracts 6px from y in the image

View File

@@ -850,10 +850,7 @@ def getBiomeData(worlddir, chunkX, chunkY):
global currentBiomeFile, currentBiomeData global currentBiomeFile, currentBiomeData
biomeFile = "b.%d.%d.biome" % ( biomeFile = "b.%d.%d.biome" % (chunkX // 32, chunkY // 32)
int(math.floor(chunkX/32)),
int(math.floor(chunkY/32))
)
if biomeFile == currentBiomeFile: if biomeFile == currentBiomeFile:
return currentBiomeData return currentBiomeData