<commit_before>package com.lothrazar.enderbook;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;

import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;//http://www.minecraftforge.net/forum/index.php?topic=22378.0
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class GuiEnderBook  extends GuiScreen
{
	private final EntityPlayer entityPlayer;
	//public final ResourceLocation texture = new ResourceLocation(ModSamsContent.MODID, "textures/enderbook/textures/gui/book_ender.png" );
	final int maxNameLen = 10;
	public GuiEnderBook(EntityPlayer entityPlayer)
	{
		this.entityPlayer = entityPlayer;
	}
	int buttonCount = 10;
	public static int buttonIdNew;
	GuiButton buttonNew;
	GuiTextField txtNew;
	final int DELETE_OFFSET = 1000;
	@Override
	public void initGui()
	{
		//great tips here http://www.minecraftforge.net/forum/index.php?topic=29945.0

		ItemStack book = entityPlayer.getHeldItem();
		if(book.hasTagCompound() == false){book.setTagCompound(new NBTTagCompound());}

		int buttonID = 0, w = 70,h = 20 , ypad = 1, delete_w = 20, rowpad = 8;
		buttonIdNew = buttonID;
		buttonID++;
		ArrayList<BookLocation> list = ItemEnderBook.getLocations(book);
		
		buttonNew = new GuiButtonNew(buttonIdNew, 
				this.width/2 - w,//x
				20,//y
				w,h,buttonIdNew);

		buttonList.add(buttonNew);
 
		if(entityPlayer.getHeldItem() != null && 
				ItemEnderBook.getLocations(entityPlayer.getHeldItem()).size() >= ConfigSettings.maximumSaved)
		{
			buttonNew.enabled = false;//also a tooltip?
		}

		
		txtNew = new GuiTextField(buttonID++,this.fontRendererObj,
				buttonNew.xPosition + buttonNew.width + 8,
				buttonNew.yPosition, 
				w,h);
		
		txtNew.setMaxStringLength(maxNameLen);
		//default to the current biome
		txtNew.setText(entityPlayer.worldObj.getBiomeGenForCoords(entityPlayer.getPosition()).biomeName);
		txtNew.setFocused(true);
		
		GuiButtonTeleport btn;
		GuiButton del;
		BookLocation loc;<commit_msg>increase textbox and name len size<commit_after>package com.lothrazar.enderbook;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;

import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;//http://www.minecraftforge.net/forum/index.php?topic=22378.0
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class GuiEnderBook  extends GuiScreen
{
	private final EntityPlayer entityPlayer;
	//public final ResourceLocation texture = new ResourceLocation(ModSamsContent.MODID, "textures/enderbook/textures/gui/book_ender.png" );
	final int maxNameLen = 20;
	public GuiEnderBook(EntityPlayer entityPlayer)
	{
		this.entityPlayer = entityPlayer;
	}
	
	public static int buttonIdNew;
	GuiButton buttonNew;
	GuiTextField txtNew;
	final int DELETE_OFFSET = 1000;
	
	
	@Override
	public void initGui()
	{
		//great tips here http://www.minecraftforge.net/forum/index.php?topic=29945.0

		ItemStack book = entityPlayer.getHeldItem();
		if(book.hasTagCompound() == false){book.setTagCompound(new NBTTagCompound());}

		int buttonID = 0, w = 70,h = 20 , ypad = 1, delete_w = 20, rowpad = 8;
		buttonIdNew = buttonID;
		buttonID++;
		ArrayList<BookLocation> list = ItemEnderBook.getLocations(book);
		
		buttonNew = new GuiButtonNew(buttonIdNew, 
				this.width/2 - w,//x
				20,//y
				w,h,buttonIdNew);

		buttonList.add(buttonNew);
 
		if(entityPlayer.getHeldItem() != null && 
				ItemEnderBook.getLocations(entityPlayer.getHeldItem()).size() >= ConfigSettings.maximumSaved)
		{
			buttonNew.enabled = false;//also a tooltip?
		}

		
		txtNew = new GuiTextField(buttonID++,this.fontRendererObj,
				buttonNew.xPosition + buttonNew.width + 20,
				buttonNew.yPosition, 
				w,h);
		
		txtNew.setMaxStringLength(maxNameLen);
		//default to the current biome
		txtNew.setText(entityPlayer.worldObj.getBiomeGenForCoords(entityPlayer.getPosition()).biomeName);
		txtNew.setFocused(true);
		
		GuiButtonTeleport btn;
		GuiButton del;
		BookLocation loc;
{'fraction_non_alphanumeric': 0.11298445368951171, 'fraction_numerical': 0.014232537770965623, 'mean_word_length': 4.894193548387097, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2888066', 'n_tokens_mistral': 1702, 'n_tokens_neox': 1531, 'n_words': 275}