Skip to content

Commit

Permalink
fix: parent-models not being properly obfuscated
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Aug 9, 2024
1 parent fe5fd5d commit 7bc18b6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/kotlin/com/mineinabyss/packy/PackObfuscator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,8 @@ class PackObfuscator(private val resourcePack: ResourcePack) {
?: toBuilder().overrides(overrides().filterNotNull().map { override ->
val overrideKey = override.model()
val modelKey = obfuscatedModels.findObf(overrideKey)?.key()
?: resourcePack.takeUnless {
overrideKey == this.key() || ResourcePacks.defaultVanillaResourcePack?.model(
overrideKey
) != null
}
?.model(overrideKey)?.let(::obfuscateModel)?.key()
?: ResourcePacks.defaultVanillaResourcePack?.model(overrideKey)?.let { overrideKey }
?: resourcePack.takeUnless { overrideKey == this.key() }?.model(overrideKey)?.let(::obfuscateModel)?.key()
?: overrideKey

return@map ItemOverride.of(modelKey, override.predicate())
Expand Down

0 comments on commit 7bc18b6

Please sign in to comment.