<commit_before>package com.creativemd.littletiles.common.gui.controls;

import java.util.ArrayList;

import com.creativemd.creativecore.common.gui.controls.container.SlotControl;
import com.creativemd.creativecore.common.gui.controls.container.client.GuiSlotControl;
import com.creativemd.littletiles.common.items.ItemBlockTiles;
import com.creativemd.littletiles.common.tiles.preview.LittleTilePreview;
import com.creativemd.littletiles.common.tiles.vec.LittleTileSize;
import com.creativemd.littletiles.common.utils.grid.LittleGridContext;
import com.creativemd.littletiles.common.utils.ingredients.BlockIngredient;

import net.minecraft.item.ItemStack;

public class GuiSlotControlBlockIngredient extends GuiSlotControl {
	
	public GuiSlotControlBlockIngredient(int x, int y, SlotControl slot, BlockIngredient ingredient) {
		super(x, y, slot);
	}
	
	@Override
	public ItemStack getStackToRender() {
		ItemStack stack = super.getStackToRender();
		if (stack.getItem() instanceof ItemBlockTiles) {
			if (stack.getCount() >= LittleGridContext.get().maxTilesPerBlock) {
				LittleTilePreview preview = LittleTilePreview.loadPreviewFromNBT(stack.getTagCompound());
				stack = new ItemStack(preview.getPreviewBlock(), stack.getCount() / LittleGridContext.get().maxTilesPerBlock, preview.getPreviewBlockMeta());
			} else {
				stack = stack.copy();
				stack.setCount(1);
				new LittleTileSize(LittleGridContext.get().size / 4 * 3, LittleGridContext.get().size / 4 * 3, LittleGridContext.get().size / 4 * 3).writeToNBT("size", stack.getTagCompound());
			}
		}
		return stack;
	}
	
	@Override
	public ArrayList<String> getTooltip() {<commit_msg>Enhanced slot in little bag if there is less than one block stored<commit_after>package com.creativemd.littletiles.common.gui.controls;

import java.util.ArrayList;

import com.creativemd.creativecore.common.gui.controls.container.SlotControl;
import com.creativemd.creativecore.common.gui.controls.container.client.GuiSlotControl;
import com.creativemd.littletiles.common.items.ItemBlockTiles;
import com.creativemd.littletiles.common.tiles.preview.LittleTilePreview;
import com.creativemd.littletiles.common.tiles.vec.LittleTileSize;
import com.creativemd.littletiles.common.utils.grid.LittleGridContext;
import com.creativemd.littletiles.common.utils.ingredients.BlockIngredient;

import net.minecraft.item.ItemStack;

public class GuiSlotControlBlockIngredient extends GuiSlotControl {
	
	public GuiSlotControlBlockIngredient(int x, int y, SlotControl slot, BlockIngredient ingredient) {
		super(x, y, slot);
	}
	
	@Override
	public ItemStack getStackToRender() {
		ItemStack stack = super.getStackToRender();
		if (stack.getItem() instanceof ItemBlockTiles) {
			if (stack.getCount() >= LittleGridContext.get().maxTilesPerBlock) {
				LittleTilePreview preview = LittleTilePreview.loadPreviewFromNBT(stack.getTagCompound());
				stack = new ItemStack(preview.getPreviewBlock(), stack.getCount() / LittleGridContext.get().maxTilesPerBlock, preview.getPreviewBlockMeta());
			} else {
				stack = stack.copy();
				stack.setCount(1);
				new LittleTileSize(LittleGridContext.get().size, LittleGridContext.get().size, LittleGridContext.get().size).writeToNBT("size", stack.getTagCompound());
			}
		}
		return stack;
	}
	
	@Override
	public ArrayList<String> getTooltip() {
{'fraction_non_alphanumeric': 0.11141222523336344, 'fraction_numerical': 0.002408912978018669, 'mean_word_length': 5.949790794979079, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1699961', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1042, 'n_words': 168}