<commit_before>package pixlepix.auracascade.item.books;

import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraft.item.ItemStack;
import pixlepix.auracascade.block.tile.TileStorageBookshelf;
import pixlepix.auracascade.data.EnumAura;
import pixlepix.auracascade.item.ItemAuraCrystal;
import pixlepix.auracascade.item.ItemStorageBook;
import pixlepix.auracascade.registry.BlockRegistry;
import pixlepix.auracascade.registry.CraftingBenchRecipe;
import pixlepix.auracascade.registry.ThaumicTinkererRecipe;

import java.util.ArrayList;

/**
 * Created by localmacaccount on 1/27/15.
 */
public class ModStorageBook extends ItemStorageBook {
    @Override
    public int getMaxStackSize() {
        return 100;
    }

    @Override
    public int getHeldStacks() {
        return 64;
    }

    @Override
    public boolean isItemValid(ItemStack stack, TileStorageBookshelf tileStorageBookshelf) {
        ArrayList<ItemStack> inv = tileStorageBookshelf.inv;
        GameRegistry.UniqueIdentifier uid = GameRegistry.findUniqueIdentifierFor(stack.getItem());
        if (uid == null || uid.modId == null) {
            return false;
        }
        for (ItemStack stackInInv : inv) {
            if (stackInInv != null && !uid.modId.equals(GameRegistry.findUniqueIdentifierFor(stackInInv.getItem()).modId)) {
                return false;
            }
        }
        return !uid.modId.equals("minecraft");
    }

    @Override
    public String getItemName() {
        return "modBook";
    }

    @Override<commit_msg>Minor tweak to trigger CI build<commit_after>package pixlepix.auracascade.item.books;

import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameData;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraft.item.ItemStack;
import pixlepix.auracascade.block.tile.TileStorageBookshelf;
import pixlepix.auracascade.data.EnumAura;
import pixlepix.auracascade.item.ItemAuraCrystal;
import pixlepix.auracascade.item.ItemStorageBook;
import pixlepix.auracascade.registry.BlockRegistry;
import pixlepix.auracascade.registry.CraftingBenchRecipe;
import pixlepix.auracascade.registry.ThaumicTinkererRecipe;

import java.util.ArrayList;

/**
 * Created by localmacaccount on 1/27/15.
 */
public class ModStorageBook extends ItemStorageBook {
    @Override
    public int getMaxStackSize() {
        return 100;
    }

    @Override
    public int getHeldStacks() {
        return 64;
    }

    @Override
    public boolean isItemValid(ItemStack stack, TileStorageBookshelf tileStorageBookshelf) {
        ArrayList<ItemStack> inv = tileStorageBookshelf.inv;
        ResourceLocation uid = GameData.getItemRegistry().getNameForObject(stack.getItem());
        if (uid == null || uid.getResourceDomain() == null) {
            return false;
        }
        for (ItemStack stackInInv : inv) {
            if (stackInInv != null && !uid.getResourceDomain().equals(GameData.getItemRegistry().getNameForObject(stackInInv.getItem()).getResourceDomain())) {
                return false;
            }
        }
        return !uid.getResourceDomain().equals("minecraft");
    }

    @Override
    public String getItemName() {
        return "modBook";
    }

    @Override
{'fraction_non_alphanumeric': 0.09653692920625191, 'fraction_numerical': 0.006129328838492185, 'mean_word_length': 3.5020689655172412, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2560994', 'n_tokens_mistral': 1010, 'n_tokens_neox': 958, 'n_words': 174}