<commit_before>package squeek.spiceoflife.foodtracker;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.Constants;

public class FixedFoodQueue extends FixedSizeQueue<FoodEaten>
{

	private static final long serialVersionUID = -1906960830995592577L;

	public FixedFoodQueue(int limit)
	{
		super(limit);
	}

	@Override
	public void writeToNBT(NBTTagCompound tag)
	{
		NBTTagList nbtHistory = new NBTTagList();
		for (FoodEaten foodEaten : this)
		{
			NBTTagCompound nbtFood = new NBTTagCompound();
			foodEaten.writeToNBTData(nbtFood);
			nbtHistory.appendTag(nbtFood);
		}
		tag.setTag("Foods", nbtHistory);
	}

	@Override
	public void readFromNBT(NBTTagCompound tag)
	{
		NBTTagList nbtHistory = tag.getTagList("Foods", Constants.NBT.TAG_LIST);
		for (int i = 0; i < nbtHistory.tagCount(); i++)
		{
			NBTTagCompound nbtFood = (NBTTagCompound) nbtHistory.getCompoundTagAt(i);
			add(FoodEaten.loadFromNBTData(nbtFood));
		}
	}

	@Override
	public void pack(DataOutputStream data) throws IOException
	{
		// TODO Auto-generated method stub
		
	}

	@Override
	public void unpack(DataInputStream data) throws IOException
	{
		// TODO Auto-generated method stub
		
	}
	
}<commit_msg>Fixed food history not getting loaded<commit_after>package squeek.spiceoflife.foodtracker;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.common.util.Constants;

public class FixedFoodQueue extends FixedSizeQueue<FoodEaten>
{

	private static final long serialVersionUID = -1906960830995592577L;

	public FixedFoodQueue(int limit)
	{
		super(limit);
	}

	@Override
	public void writeToNBT(NBTTagCompound tag)
	{
		NBTTagList nbtHistory = new NBTTagList();
		for (FoodEaten foodEaten : this)
		{
			NBTTagCompound nbtFood = new NBTTagCompound();
			foodEaten.writeToNBTData(nbtFood);
			nbtHistory.appendTag(nbtFood);
		}
		tag.setTag("Foods", nbtHistory);
	}

	@Override
	public void readFromNBT(NBTTagCompound tag)
	{
		NBTTagList nbtHistory = tag.getTagList("Foods", Constants.NBT.TAG_COMPOUND);
		for (int i = 0; i < nbtHistory.tagCount(); i++)
		{
			NBTTagCompound nbtFood = (NBTTagCompound) nbtHistory.getCompoundTagAt(i);
			add(FoodEaten.loadFromNBTData(nbtFood));
		}
	}

	@Override
	public void pack(DataOutputStream data) throws IOException
	{
		// TODO Auto-generated method stub
		
	}

	@Override
	public void unpack(DataInputStream data) throws IOException
	{
		// TODO Auto-generated method stub
		
	}
	
}
{'fraction_non_alphanumeric': 0.09727339719970524, 'fraction_numerical': 0.014738393515106854, 'mean_word_length': 4.9021739130434785, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5213443', 'n_tokens_mistral': 1070, 'n_tokens_neox': 949, 'n_words': 191}