<commit_before>package com.elytradev.teckle.common.item;

import com.elytradev.teckle.common.TeckleObjects;
import com.elytradev.teckle.common.util.BlueprintUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;
import java.util.List;

public class ItemBlueprint extends Item {
    public ItemBlueprint() {
        setMaxStackSize(1);
        setCreativeTab(TeckleObjects.creativeTab);
    }

    @Override
    @SideOnly(Side.CLIENT)
    public String getItemStackDisplayName(ItemStack stack) {
        ItemStack out = BlueprintUtil.getRecipeFromBlueprint(stack, Minecraft.getMinecraft().world)
                .map(IRecipe::getRecipeOutput).orElse(ItemStack.EMPTY);
        if (out.isEmpty())
            return super.getItemStackDisplayName(stack);
        if (out.getItem() == TeckleObjects.itemBlueprint)
            return super.getItemStackDisplayName(stack) + "(" + super.getItemStackDisplayName(stack) + ")";
        return super.getItemStackDisplayName(stack) + "(" + out.getDisplayName() + ")";
    }

    @Override
    public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
        super.addInformation(stack, worldIn, tooltip, flagIn);
    }

}<commit_msg>Fix blueprint name<commit_after>package com.elytradev.teckle.common.item;

import com.elytradev.teckle.common.TeckleObjects;
import com.elytradev.teckle.common.util.BlueprintUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;
import java.util.List;

public class ItemBlueprint extends Item {
    public ItemBlueprint() {
        setMaxStackSize(1);
        setCreativeTab(TeckleObjects.creativeTab);
    }

    @Override
    @SideOnly(Side.CLIENT)
    public String getItemStackDisplayName(ItemStack stack) {
        ItemStack out = BlueprintUtil.getRecipeFromBlueprint(stack, Minecraft.getMinecraft().world)
                .map(IRecipe::getRecipeOutput).orElse(ItemStack.EMPTY);
        if (out.isEmpty())
            return super.getItemStackDisplayName(stack);
        if (out.getItem() == TeckleObjects.itemBlueprint)
            return super.getItemStackDisplayName(stack) + "(" + super.getItemStackDisplayName(out) + ")";
        return super.getItemStackDisplayName(stack) + "(" + out.getDisplayName() + ")";
    }

    @Override
    public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
        super.addInformation(stack, worldIn, tooltip, flagIn);
    }

}
{'fraction_non_alphanumeric': 0.109349725008088, 'fraction_numerical': 0.0006470397929472663, 'mean_word_length': 4.231810490693739, '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': '4153798', 'n_tokens_mistral': 956, 'n_tokens_neox': 964, 'n_words': 152}