Skip to content

Commit

Permalink
resolve colors fix
Browse files Browse the repository at this point in the history
  • Loading branch information
olebeck committed Sep 5, 2024
1 parent 82a9162 commit edf53bd
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions utils/colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,14 @@ func ResolveColors(entries []protocol.BlockEntry, packs []resource.Pack) map[str
continue
}

var texturePath = texture_name

if flipbook_texture, ok := flipbooks[texturePath]; ok {
texturePath = flipbook_texture
}

if terrain_texture, ok := terrainTextures[texturePath]; ok {
var texturePath string
if terrain_texture, ok := terrainTextures[texture_name]; ok {
texturePath = terrain_texture
}

if tex, ok := texturesList[texturePath]; ok {
} else if flipbook_texture, ok := flipbooks[texture_name]; ok {
texturePath = flipbook_texture
} else if tex, ok := texturesList[texture_name]; ok {
texturePath = tex
}

if texturePath == texture_name {
} else {
continue
}

Expand Down Expand Up @@ -304,7 +297,9 @@ func ResolveColors(entries []protocol.BlockEntry, packs []resource.Pack) map[str
}

for block, name := range blocksJson {
textureNames[block] = name
if _, ok := textureNames[block]; !ok {
textureNames[block] = name
}
}

blockPacks = append(blockPacks, pack)
Expand Down

0 comments on commit edf53bd

Please sign in to comment.