<commit_before>package com.insane.mattercrystals.tileentity;

import com.insane.mattercrystals.fundamentals.FundamentalList;
import com.insane.mattercrystals.items.ItemCapsule;
import com.insane.mattercrystals.util.StackUtil;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;

public class TileCapsuleCreator extends TileEntity implements ISidedInventory{
	
	private ItemStack[] inventory = new ItemStack[3];
	private int itemInputSlot = 0;
	private int capsuleInputSlot = 1;
	private int outputSlot = 2;
	private int[] accessibleSlots = {itemInputSlot, capsuleInputSlot, outputSlot};
	
	public TileCapsuleCreator() {}

	@Override
	public int getSizeInventory() 
	{
		return inventory.length;
	}

	@Override
	public ItemStack getStackInSlot(int slot) 
	{<commit_msg>NBT Saving on Capsule Creator<commit_after>package com.insane.mattercrystals.tileentity;

import com.insane.mattercrystals.fundamentals.FundamentalList;
import com.insane.mattercrystals.items.ItemCapsule;
import com.insane.mattercrystals.util.StackUtil;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileCapsuleCreator extends TileEntity implements ISidedInventory{
	
	private ItemStack[] inventory = new ItemStack[3];
	private int itemInputSlot = 0;
	private int capsuleInputSlot = 1;
	private int outputSlot = 2;
	private int[] accessibleSlots = {itemInputSlot, capsuleInputSlot, outputSlot};
	
	public TileCapsuleCreator() {}
	
	@Override
	public void writeToNBT(NBTTagCompound tag)
	{
		super.writeToNBT(tag);
		
		NBTTagList invList = new NBTTagList();
		for (ItemStack s : inventory)
		{
			NBTTagCompound stackTag = new NBTTagCompound();
			s.writeToNBT(stackTag);
			invList.appendTag(stackTag);
		}
		tag.setTag("inventory", invList);
			
	}
	
	@Override
	public void readFromNBT(NBTTagCompound tag)
	{
		super.readFromNBT(tag);
		
		NBTTagList invList = (NBTTagList) tag.getTag("inventory");
		for (int i = 0 ; i < inventory.length ; i++)
		{
			inventory[i] = ItemStack.loadItemStackFromNBT(invList.getCompoundTagAt(i));
		}
	}

	@Override
	public int getSizeInventory() 
	{
		return inventory.length;
	}

	@Override
	public ItemStack getStackInSlot(int slot) 
	{
{'fraction_non_alphanumeric': 0.09382518043303929, 'fraction_numerical': 0.0036086607858861267, 'mean_word_length': 5.531413612565445, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '1696564', 'n_tokens_mistral': 900, 'n_tokens_neox': 819, 'n_words': 167}