diff options
Diffstat (limited to 'src/main/kotlin/features/texturepack/predicates/NotPredicate.kt')
-rw-r--r-- | src/main/kotlin/features/texturepack/predicates/NotPredicate.kt | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/main/kotlin/features/texturepack/predicates/NotPredicate.kt b/src/main/kotlin/features/texturepack/predicates/NotPredicate.kt deleted file mode 100644 index 4986ad9..0000000 --- a/src/main/kotlin/features/texturepack/predicates/NotPredicate.kt +++ /dev/null @@ -1,21 +0,0 @@ - -package moe.nea.firmament.features.texturepack.predicates - -import com.google.gson.JsonElement -import com.google.gson.JsonObject -import moe.nea.firmament.features.texturepack.CustomModelOverrideParser -import moe.nea.firmament.features.texturepack.FirmamentModelPredicate -import moe.nea.firmament.features.texturepack.FirmamentModelPredicateParser -import net.minecraft.item.ItemStack - -class NotPredicate(val children: Array<FirmamentModelPredicate>) : FirmamentModelPredicate { - override fun test(stack: ItemStack): Boolean { - return children.none { it.test(stack) } - } - - object Parser : FirmamentModelPredicateParser { - override fun parse(jsonElement: JsonElement): FirmamentModelPredicate { - return NotPredicate(CustomModelOverrideParser.parsePredicates(jsonElement as JsonObject).toTypedArray()) - } - } -} |