@@ -0,0 +1,2219 @@
+package net.silentchaos512.lib.util;%0A%0Aimport net.minecraft.tags.Tag;%0Aimport net.minecraft.world.entity.Entity;%0Aimport net.minecraft.world.entity.EntityType;%0Aimport net.minecraft.world.item.Item;%0Aimport net.minecraft.world.item.ItemStack;%0Aimport net.minecraft.world.level.block.Block;%0Aimport net.minecraft.world.level.block.state.BlockState;%0A%0Apublic final class TagUtils %7B%0A    private TagUtils() %7Bthrow new IllegalAccessError(%22Utility class%22);%7D%0A%0A    /**%0A     * Check if the item is in the given tag and also prevents and works around %22tag not bound%22%0A     * crashes. If the workaround hack fails, this will return false.%0A     *%0A     * @param stack The item%0A     * @param tag   The tag%0A     * @return True if the item is in the tag, false if it is not or the workaround hack fails.%0A     * @deprecated Use %7B@link #containsSafe(ITag, ItemStack)%7D instead (renamed for consistency)%0A     */%0A    @Deprecated%0A    public static boolean isInSafe(ItemStack stack, Tag%3CItem%3E tag) %7B%0A        return containsSafe(tag, stack.getItem(), true);%0A    %7D%0A%0A    public static boolean containsSafe(Tag%3CItem%3E tag, ItemStack stack) %7B%0A        return containsSafe(tag, stack.getItem());%0A    %7D%0A%0A    public static boolean containsSafe(Tag%3CBlock%3E tag, BlockState state) %7B%0A        return containsSafe(tag, state.getBlock());%0A    %7D%0A%0A    public static boolean containsSafe(Tag%3CEntityType%3C?%3E%3E tag, Entity entity) %7B%0A        return containsSafe(tag, entity.getType());%0A    %7D%0A%0A    /**%0A     * Checks if the given tag contains the given object and also works around the %22tag used before%0A     * bound%22 crash that some mod packs produce.%0A     * %3Cp%3E%0A     * Also see the other %7B@code containsSafe%7D methods, which may save you some keystrokes.%0A     *%0A     * @param tag The tag%0A     * @param obj The object (Item, Block, EntityType, etc.)%0A     * @param %3CT%3E The object type%0A     * @return True if the tag contains the object, false if it does not or the workaround hack%0A     * fails to fetch unbound tags%0A     */%0A    public static %3CT%3E boolean containsSafe(Tag%3CT%3E tag, T obj) %7B%0A        return containsSafe(tag, obj, true);%0A    %7D%0A%0A    private static %3CT%3E boolean containsSafe(Tag%3CT%3E tag, T obj, boolean firstAttempt) %7B%0A        return tag.getValues().contains(obj);%0A    %7D%0A%7D

add back tagutils