src/main/java/arcaratus/bloodarsenal/common/util/helper/NBTHelper.java
public static boolean matchTag(@Nullable INBT template, @Nullable INBT target)
    {
        if (template instanceof CompoundNBT && target instanceof CompoundNBT)
        {
            return matchTagCompound((CompoundNBT) template, (CompoundNBT) target);
        }
        else if (template instanceof ListNBT && target instanceof ListNBT)
        {
            return matchTagList((ListNBT) template, (ListNBT) target);
        }
        else
        {
            return template == null || (target != null && target.equals(template));
        }
    }
/**
     * Returns true if the `target` tag contains all of the tags and values present in the `template` tag. Recurses into
     * compound tags and matches all template keys and values; recurses into list tags and matches the template against
     * the first elements of target. Empty lists and compounds in the template will match target lists and compounds of
     * any size.
     */
Returns true if the `target` tag contains all of the tags and values present in the `template` tag. Recurses into
compound tags and matches all template keys and values; recurses into list tags and matches the template against
the first elements of target. Empty lists and compounds in the template will match target lists and compounds of
any size.
Returns true if the ` target ` tag contains all of the tags and values present in the ` template ` tag . Recurses into compound tags and matches all template keys and values ; recurses into list tags and matches the template against the first elements of target . Empty lists and compounds in the template will match target lists and compounds of any size .
public static boolean matchTag(@Nullable INBT template, @Nullable INBT target)
    {
        if (template instanceof CompoundNBT && target instanceof CompoundNBT)
        {
            return matchTagCompound((CompoundNBT) template, (CompoundNBT) target);
        }
        else if (template instanceof ListNBT && target instanceof ListNBT)
        {
            return matchTagList((ListNBT) template, (ListNBT) target);
        }
        else
        {
            return template == null || (target != null && target.equals(template));
        }
    }
public static boolean matchTag ( @ Nullable INBT template , @ Nullable INBT target ) { if ( template instanceof CompoundNBT && target instanceof CompoundNBT ) { return matchTagCompound ( ( CompoundNBT ) template , ( CompoundNBT ) target ) ; } else if ( template instanceof ListNBT && target instanceof ListNBT ) { return matchTagList ( ( ListNBT ) template , ( ListNBT ) target ) ; } else { return template == null || ( target != null && target . equals ( template ) ) ; } }
Returns true if the `target` tag contains all of the tags and values present in the `template` tag.
Returns true if the ` target ` tag contains all of the tags and values present in the ` template ` tag .