@@ -0,0 +1,1138 @@
+package com.infinityraider.agricraft.util;%0A%0Aimport com.google.gson.JsonElement;%0Aimport com.google.gson.JsonObject;%0Aimport net.minecraft.nbt.CompoundNBT;%0Aimport net.minecraft.nbt.INBT;%0A%0Aimport java.util.function.Predicate;%0A%0Apublic class NBTFilter implements Predicate%3CCompoundNBT%3E %7B%0A    private final String key;%0A    private final Predicate%3CINBT%3E test;%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    public NBTFilter(String key, Predicate%3C? extends INBT%3E test) %7B%0A        this.key = key;%0A        this.test = (Predicate%3CINBT%3E) test;%0A    %7D%0A%0A    public NBTFilter(String key, String value) %7B%0A        this(key, tag -%3E tag.getString().equals(value));%0A    %7D%0A%0A    @Override%0A    public boolean test(CompoundNBT tag) %7B%0A        return tag.contains(this.key)  && this.test.test(tag.get(this.key));%0A    %7D%0A%0A    public static NBTFilter fromJson(JsonObject json) %7B%0A        String key = json.get(%22key%22).getAsString();%0A        JsonElement test = json.get(%22test%22);%0A        if(test.isJsonObject()) %7B%0A            return new NBTFilter(key, fromJson(test.getAsJsonObject()));%0A        %7D else %7B%0A            return new NBTFilter(key, test.getAsString());%0A        %7D%0A    %7D%0A%7D%0A

Add NBT Filter util class