dump renderType as int, not string, handle maxLOD=0 in textureAtlas
This commit is contained in:
parent
bcf904c548
commit
cac8d300f5
@ -58,7 +58,7 @@ class BlockModels(object):
|
|||||||
# another optional key is 'uvlock', which needs investigating
|
# another optional key is 'uvlock', which needs investigating
|
||||||
|
|
||||||
variantBlockState = block.resourceVariant
|
variantBlockState = block.resourceVariant
|
||||||
|
log.debug("Loading %s#%s for %s", block.resourcePath, block.resourceVariant, block)
|
||||||
variantDict = variants[variantBlockState]
|
variantDict = variants[variantBlockState]
|
||||||
if isinstance(variantDict, list):
|
if isinstance(variantDict, list):
|
||||||
variantDict = variantDict[0] # do the random pick thing later, if at all
|
variantDict = variantDict[0] # do the random pick thing later, if at all
|
||||||
|
@ -160,15 +160,17 @@ class TextureAtlas(object):
|
|||||||
for name, left, top, width, height, data in slot.textures:
|
for name, left, top, width, height, data in slot.textures:
|
||||||
log.debug("Texture %s at (%d,%d,%d,%d)", name, left, top, width, height)
|
log.debug("Texture %s at (%d,%d,%d,%d)", name, left, top, width, height)
|
||||||
texDataView = texData[top:top + height, left:left + width]
|
texDataView = texData[top:top + height, left:left + width]
|
||||||
texDataView[b:-b, b:-b] = data
|
if b:
|
||||||
|
texDataView[b:-b, b:-b] = data
|
||||||
|
|
||||||
# Wrap texture edges to avoid antialiasing bugs at edges of blocks
|
# Wrap texture edges to avoid antialiasing bugs at edges of blocks
|
||||||
texDataView[-b:, b:-b] = data[:b]
|
texDataView[-b:, b:-b] = data[:b]
|
||||||
texDataView[:b, b:-b] = data[-b:]
|
texDataView[:b, b:-b] = data[-b:]
|
||||||
|
|
||||||
texDataView[:, -b:] = texDataView[:, b:2 * b]
|
|
||||||
texDataView[:, :b] = texDataView[:, -b * 2:-b]
|
|
||||||
|
|
||||||
|
texDataView[:, -b:] = texDataView[:, b:2 * b]
|
||||||
|
texDataView[:, :b] = texDataView[:, -b * 2:-b]
|
||||||
|
else:
|
||||||
|
texDataView[:] = data
|
||||||
self.texCoordsByName[name] = left + b, top + b, width - 2 * b, height - 2 * b
|
self.texCoordsByName[name] = left + b, top + b, width - 2 * b, height - 2 * b
|
||||||
|
|
||||||
def _load():
|
def _load():
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user