package hmggirlfront.gui;
 
import java.io.IOException;

import org.lwjgl.opengl.GL11;

import hmggirlfront.GFRecipe;
import hmggirlfront.mod_GirlFront;
import hmggirlfront.event.level.WorldDifficultyLevel_new;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiLabel;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextComponentTranslation;
 
public class GFGui_Pad extends GuiContainer
{
    //private static final ResourceLocation texture = new ResourceLocation("textures/gui/container/generic_54.png");
    private static final ResourceLocation texture = new ResourceLocation("hmggirlfront:textures/gui/pad.png");
    private static final ResourceLocation texture2 = new ResourceLocation("hmggirlfront:textures/gui/pad2.png");
    
    private static final ResourceLocation m1 = new ResourceLocation("hmggirlfront:textures/gui/m1.png");
    private static final ResourceLocation m2 = new ResourceLocation("hmggirlfront:textures/gui/m2.png");
    private static final ResourceLocation m3 = new ResourceLocation("hmggirlfront:textures/gui/m3.png");
    private static final ResourceLocation m4 = new ResourceLocation("hmggirlfront:textures/gui/m4.png");
    private static final ResourceLocation m5 = new ResourceLocation("hmggirlfront:textures/gui/m5.png");
    private static final ResourceLocation m6 = new ResourceLocation("hmggirlfront:textures/gui/m6.png");
    private static final ResourceLocation m7 = new ResourceLocation("hmggirlfront:textures/gui/m7.png");
    private static final ResourceLocation m8 = new ResourceLocation("hmggirlfront:textures/gui/m8.png");
    private static final ResourceLocation m9 = new ResourceLocation("hmggirlfront:textures/gui/m9.png");
    private static final ResourceLocation m10 = new ResourceLocation("hmggirlfront:textures/gui/m10.png");
    
    private static final ResourceLocation doll_0 = new ResourceLocation("hmggirlfront:textures/gui/doll_0.png");
    private static final ResourceLocation doll_01 = new ResourceLocation("hmggirlfront:textures/gui/doll_01.png");
    private static final ResourceLocation doll_1 = new ResourceLocation("hmggirlfront:textures/gui/doll_1.png");
    private static final ResourceLocation doll_2 = new ResourceLocation("hmggirlfront:textures/gui/doll_2.png");
    private static final ResourceLocation doll_3 = new ResourceLocation("hmggirlfront:textures/gui/doll_3.png");
    private static final ResourceLocation doll_31 = new ResourceLocation("hmggirlfront:textures/gui/doll_31.png");
    
    private static final ResourceLocation gun_0 = new ResourceLocation("hmggirlfront:textures/gui/gun_0.png");
    private static final ResourceLocation gun_1 = new ResourceLocation("hmggirlfront:textures/gui/gun_1.png");
    private static final ResourceLocation gun_2 = new ResourceLocation("hmggirlfront:textures/gui/gun_2.png");
    private static final ResourceLocation gun_3 = new ResourceLocation("hmggirlfront:textures/gui/gun_3.png");
    
    
    private static EntityPlayer player;
    /** The mouse x-position recorded during the last rendered frame. */
    private float mousePosx;
    /** The mouse y-position recorded during the last renderered frame. */
    private float mousePosY;
 
    
    
    private GFGuiButton button_home;
    private GFGuiButton button_back;
    
    private GFGuiButton button_0;
    private GFGuiButton button_1;
    private GFGuiButton button_2;
    private GFGuiButton button_3;
    private GFGuiButton button_4;
    private GFGuiButton button_5;
    private GFGuiButton button_6;
    private GFGuiButton button_7;
    private GFGuiButton button_8;
    
    private GFGuiButton button_mission;
    private GFGuiButton button_craft;
    
    
    private GFGuiButton button_m_0;//人形を呼び出せ0>>>1
    private GFGuiButton button_m_1;//部隊を編成せよ1>>>2
    private GFGuiButton button_m_2;//スケアクロウを倒せ2>>>3
    private GFGuiButton button_m_3;//エクスキューショナーを倒せ3>>>4
    private GFGuiButton button_m_4;//エクスキューショナーを倒せ4>>>5
    private GFGuiButton button_m_5;//エクスキューショナーを倒せ5>>>3
    private GFGuiButton button_m_6;//エクスキューショナーを倒せ5>>>3
    private GFGuiButton button_m_7;//エクスキューショナーを倒せ5>>>3
    private GFGuiButton button_m_8;//エクスキューショナーを倒せ5>>>3
    private GFGuiButton button_m_9;//エクスキューショナーを倒せ5>>>3
    
    //private GVCR2GuiButton button_m_6;//ゲリラ戦車を破壊せよ
    
    private GFGuiButton button_c_next;//
    private GFGuiButton button_c_back;//
    
    private GFGuiButton button_c_0;//ユーティリティ
    private GFGuiButton button_c_1;//弾薬
    private GFGuiButton button_c_2;//銃
    private GFGuiButton button_c_3;//乗り物
    private GFGuiButton button_c_4;//PMC
    
    private GFGuiButton button_doll_explanation;
    private GFGuiButton button_d_0;//製造方法
    private GFGuiButton button_d_1;//ステータス
    private GFGuiButton button_d_2;//指示
    private GFGuiButton button_d_3;//妖精
    
    private GFGuiButton button_hl_explanation;
    private GFGuiButton button_hl_0;//製造方法
    private GFGuiButton button_hl_1;//ステータス
    private GFGuiButton button_hl_2;//ステータス
    
    private GFGuiButton button_gun_explanation;
    
    
    public GFGui_Pad(InventoryPlayer inventoryPlayer, ItemStack itemstack)
    {
        super(new GFContainer_Pad(inventoryPlayer, itemstack));
        this.ySize = 222;
        player = inventoryPlayer.player;
    }
    
    
    public int page = 0;
    public int page_sub = 0;
    
    public void initGui()
    {
    	super.initGui();
    	int xpos = (this.width - this.xSize) / 2;
        int ypos = (this.height - this.ySize) / 2;
        
        this.button_home = this.addButton(new GFGuiButton(0, xpos + 78 ,  ypos + 202, 20, 20, I18n.format(""), 0));
        this.button_back = this.addButton(new GFGuiButton(1, xpos +45 ,  ypos + 202, 20, 20, I18n.format(""), 0));
        
        this.button_mission = this.addButton(new GFGuiButton(2, xpos + 35 ,  ypos + 45, 20, 20, I18n.format(""), 1));
        this.button_craft = this.addButton(new GFGuiButton(3, xpos + 75 ,  ypos + 45, 20, 20, I18n.format(""), 2));
        
        
        this.button_m_0 = this.addButton(new GFGuiButton(4, xpos + 15 ,  ypos + 30  , 60, 20, I18n.format("MISSION::1"), 10));
        this.button_m_1 = this.addButton(new GFGuiButton(5, xpos + 15 ,  ypos + 55  , 60, 20, I18n.format("MISSION::2"), 10));
        this.button_m_2 = this.addButton(new GFGuiButton(6, xpos + 15 ,  ypos + 80  , 60, 20, I18n.format("MISSION::3"), 10));
        this.button_m_3 = this.addButton(new GFGuiButton(7, xpos + 15 ,  ypos + 105, 60, 20, I18n.format("MISSION::4"), 10));
        this.button_m_4 = this.addButton(new GFGuiButton(8, xpos + 15 ,  ypos + 130, 60, 20, I18n.format("MISSION::5"), 10));
        this.button_m_5 = this.addButton(new GFGuiButton(9, xpos + 15 ,  ypos + 155, 60, 20, I18n.format("MISSION::6"), 10));
        
        
        this.button_c_next = this.addButton(new GFGuiButton(10, xpos + 115,  ypos + 180, 20, 20, I18n.format(""), 4));
        this.button_c_back = this.addButton(new GFGuiButton(11, xpos + 45  ,  ypos + 180, 20, 20, I18n.format(""), 3));
        
        this.button_c_0 = this.addButton(new GFGuiButton(12, xpos + 15 ,  ypos + 30  , 20, 20, I18n.format(""), 5));
        this.button_c_1 = this.addButton(new GFGuiButton(13, xpos + 15 ,  ypos + 55  , 20, 20, I18n.format(""), 5));
        this.button_c_2 = this.addButton(new GFGuiButton(14, xpos + 15 ,  ypos + 80  , 20, 20, I18n.format(""), 5));
        this.button_c_3 = this.addButton(new GFGuiButton(15, xpos + 15 ,  ypos + 105, 20, 20, I18n.format(""), 5));
        this.button_c_4 = this.addButton(new GFGuiButton(16, xpos + 15 ,  ypos + 130, 20, 20, I18n.format(""), 5));
        
        this.button_doll_explanation = this.addButton(new GFGuiButton(17, xpos + 115 ,  ypos + 45, 20, 20, I18n.format(""), 5));
        this.button_d_0 = this.addButton(new GFGuiButton(18, xpos + 15 ,  ypos + 30  , 60, 20, I18n.format("hmggirlfront.string.pad.doll_explanation0_1.name"), 10));
        this.button_d_1 = this.addButton(new GFGuiButton(19, xpos + 15 ,  ypos + 55  , 60, 20, I18n.format("hmggirlfront.string.pad.doll_explanation1_1.name"), 10));
        this.button_d_2 = this.addButton(new GFGuiButton(20, xpos + 15 ,  ypos + 80  , 60, 20, I18n.format("hmggirlfront.string.pad.doll_explanation2_1.name"), 10));
        this.button_d_3 = this.addButton(new GFGuiButton(21, xpos + 15 ,  ypos + 105, 60, 20, I18n.format("hmggirlfront.string.pad.doll_explanation3_1.name"), 10));
        
        this.button_gun_explanation = this.addButton(new GFGuiButton(22, xpos + 35 ,  ypos + 75, 20, 20, I18n.format(""), 5));
        
        this.button_hl_explanation = this.addButton(new GFGuiButton(23, xpos + 75 ,  ypos + 75, 20, 20, I18n.format(""), 5));
        this.button_hl_0 = this.addButton(new GFGuiButton(24, xpos + 15 ,  ypos + 30  , 60, 20, I18n.format("hmggirlfront.string.pad.hl_explanation0_0.name"), 10));
        this.button_hl_1 = this.addButton(new GFGuiButton(25, xpos + 15 ,  ypos + 55  , 60, 20, I18n.format("hmggirlfront.string.pad.hl_explanation1_0.name"), 10));
        this.button_hl_2 = this.addButton(new GFGuiButton(26, xpos + 15 ,  ypos + 80  , 60, 20, I18n.format("hmggirlfront.string.pad.hl_explanation2_0.name"), 10));
        
        this.button_m_6 = this.addButton(new GFGuiButton(27, xpos + 15 ,  ypos + 30  , 60, 20, I18n.format("MISSION::7"), 10));
        this.button_m_7 = this.addButton(new GFGuiButton(28, xpos + 15 ,  ypos + 55  , 60, 20, I18n.format("MISSION::8"), 10));
        this.button_m_8 = this.addButton(new GFGuiButton(29, xpos + 15 ,  ypos + 80  , 60, 20, I18n.format("MISSION::9"), 10));
        this.button_m_9 = this.addButton(new GFGuiButton(30, xpos + 15 ,  ypos + 105 , 60, 20, I18n.format("MISSION::10"), 10));
        
    	/*this.button_0 = this.addButton(new GVCR2GuiButton(1, xpos + 20 ,  ypos + 45, 20, 20, I18n.format("0"), 0));
    	this.button_1 = this.addButton(new GVCR2GuiButton(2, xpos + 60  , ypos + 45, 20, 20, I18n.format("1"), 0));
    	this.button_2 = this.addButton(new GVCR2GuiButton(3, xpos + 100, ypos + 45, 20, 20, I18n.format("2"), 0));*/
    	
    	//this.button_1.BUTTON_TEXTURES = new ResourceLocation("gvcr2:textures/gui/gvcr2_widgets2.png");
    }
    
    /*
    protected void actionPerformed(GuiButton button) throws IOException
    {
    	//home
    	if (button.id == 0)
        {
    		page = 0;
        }
    	
    	//back
    	else if (button.id == 1)
        {
    		if(page == 1) {
    			page = 0;
    		}
    		if(page == 2) {
    			page = 0;
    		}
    		if(page == 17) {
    			page = 0;
    		}
    		if(page == 3 
    				|| page == 4 
    				|| page == 5
    				|| page == 6
    				|| page == 7
    				|| page == 8) {
    			page = 1;
    		}
    		if(page == 12 
    				|| page == 13 
    				|| page == 14
    				|| page == 15
    				|| page == 16) {
    			page = 2;
    		}
    		if(page == 18 
    				|| page == 19 
    				|| page == 20
    				|| page == 21) {
    			page = 17;
    		}
    		if(page == 22) {
    			page = 0;
    		}
        }
    	
    	//mission
    	else if (button.id == 2)
        {
    		page = 1;
        }
    	//ccraft
    	else if (button.id == 3)
        {
    		page = 2;
        }
    	//doll_explanation
    	else if (button.id == 17)
        {
    		page = 17;
        }
    	//gun_explanation
    	else if (button.id == 22)
        {
    		page = 22;
    		page_sub = 0;
        }
    	
    	
    	else if (button.id == 4 &&page == 1)
        {
    		page = 3;
        }
    	else if (button.id == 5 &&page == 1)
        {
    		page = 4;
        }
    	else if (button.id == 6 &&page == 1)
        {
    		page = 5;
        }
    	else if (button.id == 7 &&page == 1)
        {
    		page = 6;
        }
    	else if (button.id == 8 &&page == 1)
        {
    		page = 7;
        }
    	else if (button.id == 9 &&page == 1)
        {
    		page = 8;
        }
    	
    	else if (button.id == 9 &&page == 1)
        {
    		page = 8;
        }
    	
    	
    	else if (button.id == 10)
        {
    		if(page == 12) {
    			if(page_sub < 8)++page_sub;
    		}
    		if(page == 13) {
    			if(page_sub < 1)++page_sub;
    		}
    		if(page == 14) {
    			if(page_sub < 12)++page_sub;
    		}
    		if(page == 15) {
    			if(page_sub < 11)++page_sub;
    		}
    		if(page == 16) {
    			if(page_sub < 4)++page_sub;
    		}
    		
    		if(page == 18) {
    			if(page_sub < 1)++page_sub;
    		}
    		if(page == 19) {
    			if(page_sub < 1)++page_sub;
    		}
    		if(page == 20) {
    			if(page_sub < 1)++page_sub;
    		}
    		if(page == 21) {
    			if(page_sub < 1)++page_sub;
    		}
    		
    		if(page == 22) {
    			if(page_sub < 3)++page_sub;
    		}
        }
    	else if (button.id == 11)
        {
    		{
    			if(page_sub > 0)--page_sub;
    		}
        }
    	
    	
    	else if (button.id == 12 &&page == 2)
        {
    		page = 12;
    		page_sub = 0;
        }
    	else if (button.id == 13 &&page == 2)
        {
    		page = 13;
    		page_sub = 0;
        }
    	else if (button.id == 14 &&page == 2)
        {
    		page = 14;
    		page_sub = 0;
        }
    	else if (button.id == 15 &&page == 2)
        {
    		page = 15;
    		page_sub = 0;
        }
    	else if (button.id == 16 &&page == 2)
        {
    		page = 16;
    		page_sub = 0;
        }
    	
    	
    	else if (button.id == 18 &&page == 17)
        {
    		page = 18;
    		page_sub = 0;
        }
    	else if (button.id == 19 &&page == 17)
        {
    		page = 19;
    		page_sub = 0;
        }
    	else if (button.id == 20 &&page == 17)
        {
    		page = 20;
    		page_sub = 0;
        }
    	else if (button.id == 21 &&page == 17)
        {
    		page = 21;
    		page_sub = 0;
        }
    }*/
    
    /**
     * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
     */
    /**そのページにおいて反応するボタンの制限*/
    /*protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
    {
        if (mouseButton == 0)
        {
        	if(page == 1) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  4) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  5) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  6) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  7) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  8) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  9) ;
        	}
        	else
        	if(page == 2) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  12) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  13) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  14) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  15) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  16) ;
        	}
        	else
            if(page == 17) {
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  18) ;
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  19) ;
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  20) ;
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  21) ;
            	}
            else
             if(page == 22) {
                		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
                		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
                		mouseClicked_do( mouseX,  mouseY,  mouseButton,  10) ;//next
                		mouseClicked_do( mouseX,  mouseY,  mouseButton,  11) ;//back
            }
        	else
        	if(page == 3
        			|| page == 4
        			|| page == 5
        			|| page == 6
        			|| page == 7
        			|| page == 8) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
        	}
        	else
        	if(page == 12
        			|| page == 13
        			|| page == 14
        			|| page == 15
        			|| page == 16) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  10) ;//next
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  11) ;//back
        	}
        	else
            	if(page == 18
            			|| page == 19
            			|| page == 20
            			|| page == 21) {
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  10) ;//next
            		mouseClicked_do( mouseX,  mouseY,  mouseButton,  11) ;//back
            	}
        	
        	
        	else if(page == 0) {//最初の画面     何故かpage1のものが反応するため後ろに
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  1) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  2) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  3) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  17) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  22) ;
        	}
        }
    }*/
    
    /*protected void mouseClicked_do(int mouseX, int mouseY, int mouseButton, int id) throws IOException
    {
    	//以下ボタンを押したときの処理
        GuiButton guibutton = this.buttonList.get(id);
        if (guibutton.mousePressed(this.mc, mouseX, mouseY))
        {
            net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre event = new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre(this, guibutton, this.buttonList);
            //if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) break;
            guibutton = event.getButton();
            this.selectedButton = guibutton;
            guibutton.playPressSound(this.mc.getSoundHandler());
            this.actionPerformed(guibutton);
            if (this.equals(this.mc.currentScreen))
                net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post(this, event.getButton(), this.buttonList));
        }
    }*/
    
    
    /**
     * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
     */
    protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
    {
        if (mouseButton == 0)
        {
        	
        	if(page == 1) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_0.id, 3, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_1.id, 4, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_2.id, 5, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_3.id, 6, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_4.id, 7, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_5.id, 8, 0, 0) ;
        		
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, 100, 0, 0) ;//sub_next
        	}
        	else if(page == 100) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_6.id, 103, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_7.id, 104, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_8.id, 105, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_m_9.id, 106, 0, 0) ;
        		
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_back.id, 1, 0, 0) ;//sub_back
        	}
        	else if(page == 2) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_0.id, 12, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_1.id, 13, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_2.id, 14, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_3.id, 15, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_4.id, 16, 0, 0) ;
        	}
        	else if(page == 3
        			|| page == 4
        			|| page == 5
        			|| page == 6
        			|| page == 7
        			|| page == 8) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 1, 0, 0) ;//back
        	}
        	else if(page == 103
        			|| page == 104
        			|| page == 105
        			|| page == 106) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 100, 0, 0) ;//back
        	}
        	else if(page == 12
        			|| page == 13
        			|| page == 14
        			|| page == 15
        			|| page == 16) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 2, 0, 0) ;//back
        		if(page == 12)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 9) ;//sub_next
        		if(page == 13)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 5) ;//sub_next
        		if(page == 14)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 22) ;//sub_next
        		if(page == 15)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 11) ;//sub_next
        		if(page == 16)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 5) ;//sub_next
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_back.id, -1, 2, 0) ;//sub_back
        	}
        	else if(page == 17) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_d_0.id, 18, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_d_1.id, 19, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_d_2.id, 20, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_d_3.id, 21, 0, 0) ;
        	}
        	else if(page == 18
        			|| page == 19
        			|| page == 20
        			|| page == 21) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 17, 0, 0) ;//back
        		if(page == 18)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		if(page == 19)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		if(page == 20)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		if(page == 21)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_back.id, -1, 2, 0) ;//sub_back
        	}
        	else if(page == 22) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 3) ;//sub_next
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_back.id, -1, 2, 0) ;//sub_back
        	}
        	else if(page == 23) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_hl_0.id, 24, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_hl_1.id, 25, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_hl_2.id, 26, 0, 0) ;
        	}
        	else if(page == 24
        			|| page == 25
        			|| page == 26) {
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 23, 0, 0) ;//back
        		if(page == 24)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		if(page == 25)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		if(page == 26)mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_next.id, -1, 1, 1) ;//sub_next
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_c_back.id, -1, 2, 0) ;//sub_back
        	}
        	
        	
        	else  
        	if(page == 0) {//最初の画面     何故かpage1のものが反応するため後ろに
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_home.id, 0, 0, 0) ;//home
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_back.id, 0, 0, 0) ;//back
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_mission.id, 1, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_craft.id, 2, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_doll_explanation.id, 17, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_gun_explanation.id, 22, 0, 0) ;
        		mouseClicked_do( mouseX,  mouseY,  mouseButton,  button_hl_explanation.id, 23, 0, 0) ;
        	}
        }
    }
    
    protected void mouseClicked_do(int mouseX, int mouseY, int mouseButton, int id, int move_page, int sub_pag, int sub_max) throws IOException
    {
    	//以下ボタンを押したときの処理
        GuiButton guibutton = this.buttonList.get(id);
        if (guibutton.mousePressed(this.mc, mouseX, mouseY))
        {
            net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre event = new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre(this, guibutton, this.buttonList);
            //if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) break;
            guibutton = event.getButton();
            this.selectedButton = guibutton;
            guibutton.playPressSound(this.mc.getSoundHandler());
            //this.actionPerformed(guibutton);
            {
            	if(move_page >= 0)page = move_page;
            	if(sub_pag == 1 && page_sub < sub_max) {
            		++page_sub;
            	}
            	else if(sub_pag == 2 && page_sub > 0) {
            		--page_sub;
            	}
            	else {
            		page_sub = 0;
            	}
            }
            if (this.equals(this.mc.currentScreen))
                net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post(this, event.getButton(), this.buttonList));
        }
    }
    
    /**
     * Draws the screen and all the components in it.
     * ボタン描画で使用
     */
    public void drawScreen(int mouseX, int mouseY, float partialTicks)
    {
        this.drawDefaultBackground();//　仮面を暗くする
        this.mousePosx = (float)mouseX;
        this.mousePosY = (float)mouseY;
        {
        	if(page == 0) {
           	 this.mc.getTextureManager().bindTexture(texture);
           }
           else {
           	 this.mc.getTextureManager().bindTexture(texture2);
           }
          
           int k = (this.width - this.xSize) / 2;
           int l = (this.height - this.ySize) / 2;
           this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
        }
  //      super.drawScreen(mouseX, mouseY, partialTicks);//ここからボタンを表示する
        
        ((GuiButton)button_home).drawButton(this.mc, mouseX, mouseY, partialTicks);
        ((GuiButton)button_back).drawButton(this.mc, mouseX, mouseY, partialTicks);
        if(page == 0) {
        	((GuiButton)button_mission).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_craft).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_doll_explanation).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_gun_explanation).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_hl_explanation).drawButton(this.mc, mouseX, mouseY, partialTicks);
        }
        else  if(page == 1) {
        	((GuiButton)button_m_0).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_1).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_2).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_3).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_4).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_5).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	
        	((GuiButton)button_c_next).drawButton(this.mc, mouseX, mouseY, partialTicks);
        }
        else  if(page == 100) {
        	((GuiButton)button_m_6).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_7).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_8).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_m_9).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	
        	((GuiButton)button_c_back).drawButton(this.mc, mouseX, mouseY, partialTicks);
        }
        else  if(page == 2) {
        	((GuiButton)button_c_0).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_c_1).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_c_2).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_c_3).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_c_4).drawButton(this.mc, mouseX, mouseY, partialTicks);
        }
        else  if(page == 17) {
        	((GuiButton)button_d_0).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_d_1).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_d_2).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_d_3).drawButton(this.mc, mouseX, mouseY, partialTicks);
        }
        else  if(page == 12
        		     || page == 13
        		     || page == 14
        		     || page == 15
        		     || page == 16) {
        	((GuiButton)button_c_next).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_c_back).drawButton(this.mc, mouseX, mouseY, partialTicks);
        }
		else if (page == 18 
				||page == 19 
				||page == 20
				|| page == 21) {
			((GuiButton) button_c_next).drawButton(this.mc, mouseX, mouseY, partialTicks);
			((GuiButton) button_c_back).drawButton(this.mc, mouseX, mouseY, partialTicks);
		}
		else if (page == 22) {
			((GuiButton) button_c_next).drawButton(this.mc, mouseX, mouseY, partialTicks);
			((GuiButton) button_c_back).drawButton(this.mc, mouseX, mouseY, partialTicks);
		}
		else if (page == 23) {
			((GuiButton)button_hl_0).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_hl_1).drawButton(this.mc, mouseX, mouseY, partialTicks);
        	((GuiButton)button_hl_2).drawButton(this.mc, mouseX, mouseY, partialTicks);
		}
		else  if(page == 24
   		     || page == 25
   		     || page == 26) {
   	((GuiButton)button_c_next).drawButton(this.mc, mouseX, mouseY, partialTicks);
   	((GuiButton)button_c_back).drawButton(this.mc, mouseX, mouseY, partialTicks);
   }
       
        for (int j = 0; j < this.labelList.size(); ++j)
        {
            ((GuiLabel)this.labelList.get(j)).drawLabel(this.mc, mouseX, mouseY);
        }
        
        this.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
        this.renderHoveredToolTip(mouseX, mouseY);
    }
    
    
	/*
        ChestとかInventoryとか文字を描画する
     */
    @Override
    protected void drawGuiContainerForegroundLayer(int x, int p_146979_2_)
    {
    	
    }
 
    /*
        背景の描画
     */
    @Override
    protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
    {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        int k = (this.width - this.xSize) / 2;
        int l = (this.height - this.ySize) / 2;
        FontRenderer fontReader = mc.fontRenderer;
        
        float mozi_bai = 0.8F;
        float mozi_x = 31F;
        float mozi_y = 0F;
        
        GL11.glPushMatrix();
        //時刻を表示
        {
        	long worldtime = mod_GirlFront.proxy.getCilentWorld().getWorldTime();
            int time = (int) (worldtime * 1);
            int h = time / 1000 + 6;
            int m = (time % 1000) / 17;
            //int s = (time % 3600) % 60;
            if(h >= 24)h = h - 24;
            String string_h = String.format("%1$3d", (int)h);
            String string_m = String.format("%1$3d", (int)m);
            //String string_s = String.format("%1$3d", (int)s);
    		fontReader.drawString(string_h + ":" + string_m,  k + 140, l + 5, 0xFFFFFF);
        }
        
        
        if(page == 0) {
        	String d2 = String.format("%1$3d", (int)WorldDifficultyLevel_new.getLevelClient() );
			fontReader.drawString("progress : "+ d2,  k + 5, l + 5, 0xFFFFFF);
			{
		        	RenderItem renderitem = mc.getRenderItem();
		        	{
		        		ItemStack item = new ItemStack(mod_GirlFront.idoll_core);
		    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_doll_explanation.x + 2, button_doll_explanation.y + 2);
		        	}
		        	{
		        		ItemStack item = new ItemStack(mod_GirlFront.dollgun_m4a1);
		    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_gun_explanation.x + 2, button_gun_explanation.y + 2);
		        	}
		        	{
		        		ItemStack item = new ItemStack(mod_GirlFront.dollgun_at4);
		    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_hl_explanation.x + 2, button_hl_explanation.y + 2);
		        	}
		        }
        }
        if(page == 1) {
        	if(WorldDifficultyLevel_new.getLevelClient() >= 1)fontReader.drawString("CLEAR!",  k + 80, l + 30, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 2)fontReader.drawString("CLEAR!",  k + 80, l + 55, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 3)fontReader.drawString("CLEAR!",  k + 80, l + 80, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 4)fontReader.drawString("CLEAR!",  k + 80, l + 105, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 5)fontReader.drawString("CLEAR!",  k + 80, l + 130, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 6)fontReader.drawString("CLEAR!",  k + 80, l + 155, 0X00D7FF);
        }
        if(page == 100) {
        	if(WorldDifficultyLevel_new.getLevelClient() >= 7)fontReader.drawString("CLEAR!",  k + 80, l + 30, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 8)fontReader.drawString("CLEAR!",  k + 80, l + 55, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 9)fontReader.drawString("CLEAR!",  k + 80, l + 80, 0X00D7FF);
        	if(WorldDifficultyLevel_new.getLevelClient() >= 10)fontReader.drawString("CLEAR!",  k + 80, l + 105, 0X00D7FF);
        }
        if(page == 3) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m1);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission1_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission1_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission1_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission1_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission1_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission1_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        if(page == 4) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m2);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission2_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission2_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission2_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission2_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission2_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission2_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        if(page == 5) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m3);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission3_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission3_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission3_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission3_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission3_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission3_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        if(page == 6) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m4);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission4_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission4_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission4_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission4_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission4_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission4_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        if(page == 7) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m5);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission5_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission5_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission5_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission5_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission5_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission5_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        if(page == 8) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m6);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission6_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission6_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission6_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission6_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission6_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission6_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        
        if(page == 103) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m7);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission7_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission7_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission7_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission7_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission7_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission7_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        
        if(page == 104) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m8);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission8_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission8_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission8_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission8_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission8_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission8_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        
        if(page == 105) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m9);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission9_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission9_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission9_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission9_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission9_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission9_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        if(page == 106) {
        	GL11.glPushMatrix();
        	float bairitu = 0.75F;
        	this.mc.getTextureManager().bindTexture(m10);
        	GL11.glScalef(bairitu, bairitu, bairitu);
        	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
        	GL11.glPopMatrix();
        	
        	GL11.glPushMatrix();
        	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
        	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission10_1.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission10_2.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission10_3.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission10_4.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission10_5.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
        	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.mission10_6.name", 
        			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
        	GL11.glScalef(1F, 1F, 1F);
        	GL11.glPopMatrix();
        }
        
        if(page == 2) {
        	RenderItem renderitem = mc.getRenderItem();
        	{
        		ItemStack item = new ItemStack(mod_GirlFront.idoll_doll_contract);
    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_c_0.x + 2, button_c_0.y + 2);
        	}
        	{
        		ItemStack item = new ItemStack(mod_GirlFront.bdoll_crafting);
    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_c_1.x + 2, button_c_1.y + 2);
        	}
        	{
        		ItemStack item = new ItemStack(mod_GirlFront.idoll_bullet_556);
    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_c_2.x + 2, button_c_2.y + 2);
        	}
        	{
        		ItemStack item = new ItemStack(mod_GirlFront.dollam_class_assalt);
    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_c_3.x + 2, button_c_3.y + 2);
        	}
        	{
        		ItemStack item = new ItemStack(mod_GirlFront.ve_bike);
    			if (!item.isEmpty())renderitem.renderItemIntoGUI(item, button_c_4.x + 2, button_c_4.y + 2);
        	}
        	
        }
        
        if(page == 12) {//　ユーティリティ
        	if(page_sub == 0)drow_page_recipe(99, 100, k, l, mouseX, mouseY);
        	if(page_sub == 1)drow_page_recipe(101, 102, k, l, mouseX, mouseY);
        	if(page_sub == 2)drow_page_recipe(103, 104, k, l, mouseX, mouseY);
        	if(page_sub == 3)drow_page_recipe(105, 106, k, l, mouseX, mouseY);
        	if(page_sub == 4)drow_page_recipe(107, 108, k, l, mouseX, mouseY);
        	if(page_sub == 5)drow_page_recipe(109, 110, k, l, mouseX, mouseY);
        	if(page_sub == 6)drow_page_recipe(111, 112, k, l, mouseX, mouseY);
        	if(page_sub == 7)drow_page_recipe(113, 114, k, l, mouseX, mouseY);
        	if(page_sub == 8)drow_page_recipe(115, 116, k, l, mouseX, mouseY);
        	if(page_sub == 9)drow_page_recipe(117, 118, k, l, mouseX, mouseY);
        }
       if(page == 13) {//　ブロック
        	if(page_sub == 0)drow_page_recipe(30, 31, k, l, mouseX, mouseY);
        	if(page_sub == 1)drow_page_recipe(32, 33, k, l, mouseX, mouseY);
        	if(page_sub == 2)drow_page_recipe(201, 202, k, l, mouseX, mouseY);
        	if(page_sub == 3)drow_page_recipe(203, 204, k, l, mouseX, mouseY);
        	if(page_sub == 4)drow_page_recipe(205, 206, k, l, mouseX, mouseY);
        	if(page_sub == 5)drow_page_recipe(207, 999, k, l, mouseX, mouseY);
        }
       if(page == 14) {//　弾薬
    	    if(page_sub == 0)drow_page_recipe(0, 1, k, l, mouseX, mouseY);
         	if(page_sub == 1)drow_page_recipe(2, 3, k, l, mouseX, mouseY);
         	if(page_sub == 2)drow_page_recipe(4, 5, k, l, mouseX, mouseY);
         	if(page_sub == 3)drow_page_recipe(6, 7, k, l, mouseX, mouseY);
         	if(page_sub == 4)drow_page_recipe(8, 999, k, l, mouseX, mouseY);
         	if(page_sub == 5)drow_page_recipe(10, 11, k, l, mouseX, mouseY);
         	if(page_sub == 6)drow_page_recipe(12, 13, k, l, mouseX, mouseY);
         	if(page_sub == 7)drow_page_recipe(15, 16, k, l, mouseX, mouseY);
         	if(page_sub == 8)drow_page_recipe(17, 18, k, l, mouseX, mouseY);
         	if(page_sub == 9)drow_page_recipe(300, 301, k, l, mouseX, mouseY);
         	if(page_sub == 10)drow_page_recipe(302, 303, k, l, mouseX, mouseY);
         	if(page_sub == 11)drow_page_recipe(304, 305, k, l, mouseX, mouseY);
         	if(page_sub == 12)drow_page_recipe(306, 307, k, l, mouseX, mouseY);
         	if(page_sub == 13)drow_page_recipe(308, 309, k, l, mouseX, mouseY);
         	if(page_sub == 14)drow_page_recipe(310, 311, k, l, mouseX, mouseY);
         	if(page_sub == 15)drow_page_recipe(312, 312, k, l, mouseX, mouseY);
         	if(page_sub == 16)drow_page_recipe(314, 313, k, l, mouseX, mouseY);
         	if(page_sub == 17)drow_page_recipe(19, 20, k, l, mouseX, mouseY);
         	if(page_sub == 18)drow_page_recipe(21, 22, k, l, mouseX, mouseY);
         	if(page_sub == 19)drow_page_recipe(23, 24, k, l, mouseX, mouseY);
         	if(page_sub == 20)drow_page_recipe(25, 26, k, l, mouseX, mouseY);
         	if(page_sub == 21)drow_page_recipe(27, 28, k, l, mouseX, mouseY);
         	if(page_sub == 22)drow_page_recipe(29, 291, k, l, mouseX, mouseY);
       }
        if(page == 15) {//　アタッチメント
        	if(page_sub == 0)drow_page_recipe(40, 41, k, l, mouseX, mouseY);
        	if(page_sub == 1)drow_page_recipe(42, 43, k, l, mouseX, mouseY);
        	if(page_sub == 2)drow_page_recipe(44, 45, k, l, mouseX, mouseY);
        	if(page_sub == 3)drow_page_recipe(46, 47, k, l, mouseX, mouseY);
        	if(page_sub == 4)drow_page_recipe(48, 49, k, l, mouseX, mouseY);
        	if(page_sub == 5)drow_page_recipe(50, 51, k, l, mouseX, mouseY);
        	if(page_sub == 6)drow_page_recipe(52, 53, k, l, mouseX, mouseY);
        	if(page_sub == 7)drow_page_recipe(54, 55, k, l, mouseX, mouseY);
        	if(page_sub == 8)drow_page_recipe(56, 57, k, l, mouseX, mouseY);
        	if(page_sub == 9)drow_page_recipe(58, 59, k, l, mouseX, mouseY);
        	if(page_sub == 10)drow_page_recipe(60, 61, k, l, mouseX, mouseY);
        	if(page_sub == 11)drow_page_recipe(62, 999, k, l, mouseX, mouseY);
        	
        }
        if(page == 16) {//　乗り物
        	if(page_sub == 0)drow_page_recipe(80, 81, k, l, mouseX, mouseY);
        	if(page_sub == 1)drow_page_recipe(82, 90, k, l, mouseX, mouseY);
        	if(page_sub == 2)drow_page_recipe(83, 84, k, l, mouseX, mouseY);
        	if(page_sub == 3)drow_page_recipe(85, 86, k, l, mouseX, mouseY);
        	if(page_sub == 4)drow_page_recipe(87, 88, k, l, mouseX, mouseY);
        	if(page_sub == 5)drow_page_recipe(89, 999, k, l, mouseX, mouseY);
        }
       
        
        if(page == 18) {
        	if(page_sub == 0) {
        		GL11.glPushMatrix();
            	float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(doll_0);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation0_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation0_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation0_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation0_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation0_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation0_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}else {
        		GL11.glPushMatrix();
            	float bairitu = 0.95F;
            	this.mc.getTextureManager().bindTexture(doll_01);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(94/ 1), (int)(70/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation01_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation01_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation01_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation01_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation01_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation01_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}
        }
        if(page == 19) {
        	if(page_sub == 0){
        		GL11.glPushMatrix();
            	float bairitu = 1.0F;
            	this.mc.getTextureManager().bindTexture(doll_1);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(80/ 1), (int)(73/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation1_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation1_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation1_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation1_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation1_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation1_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}else {
        		GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
        		fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation11_7.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 90, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}
        }
        if(page == 20) {
        	{
        		GL11.glPushMatrix();
            	float bairitu = 2.0F;
            	this.mc.getTextureManager().bindTexture(doll_2);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(63/ 1), (int)(42/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation2_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation2_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation2_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation2_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation2_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation2_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}
        }
        if(page == 21) {
        	if(page_sub == 0) {
        		GL11.glPushMatrix();
            	float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(doll_3);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation3_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation3_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation3_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation3_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation3_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation3_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}else {
        		GL11.glPushMatrix();
        		float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(doll_31);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation31_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation31_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation31_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation31_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation31_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.doll_explanation31_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}
        }
        
        
        if(page == 22) {
        	if(page_sub == 0) {
        		GL11.glPushMatrix();
            	float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(gun_0);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation0_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation0_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation0_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation0_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation0_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation0_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}else if(page_sub == 1){
        		GL11.glPushMatrix();
        		float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(gun_1);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation1_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation1_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation1_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation1_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation1_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation1_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}else if(page_sub == 2){
        		GL11.glPushMatrix();
        		float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(gun_2);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation2_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation2_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation2_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation2_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation2_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation2_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}else if(page_sub == 3){
        		GL11.glPushMatrix();
        		float bairitu = 0.75F;
            	this.mc.getTextureManager().bindTexture(gun_3);
            	GL11.glScalef(bairitu, bairitu, bairitu);
            	this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 0, 0, (int)(192/ 1), (int)(102/ 1));
            	GL11.glPopMatrix();
            	
            	GL11.glPushMatrix();
            	GL11.glScalef(mozi_bai, mozi_bai, 1.0F);
            	GL11.glTranslatef(mozi_x, mozi_y, 0);//41/0
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation3_1.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 30, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation3_2.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 40, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation3_3.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 50, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation3_4.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 60, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation3_5.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 70, 0x000000);
            	fontReader.drawString(new TextComponentTranslation("hmggirlfront.string.pad.gun_explanation3_6.name", 
            			new Object[0]).getFormattedText(),  k + 20, l + 80, 0x000000);
            	GL11.glScalef(1F, 1F, 1F);
            	GL11.glPopMatrix();
        	}
        }
        
        
        
        
        
        
		GL11.glPopMatrix();
    }
    
    /**
     * 前が上にくるレシピ
     * 後ろが下にくるレシピ、999のとき反映されない
     * */
    private void drow_page_recipe(int id1, int id2, int k, int l, int mouseX, int mouseY) {
    	GL11.glPushMatrix();
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	float bairitu = 1F;
    	this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/crafting_table.png"));
    	GL11.glScalef(bairitu, bairitu, bairitu);
    	this.drawTexturedModalRect((k + 20) / bairitu, (l + 20) / bairitu, 26, 13, (int)(122), (int)(60));
    	this.drowRecipe(id1, (k + 20)  + 0, (l + 20)  + 0, mouseX, mouseY);
    	this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/crafting_table.png"));
    	if(id2 != 999) {
    		this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 26, 13, (int)(122), (int)(60));
    		this.drowRecipe(id2, (k + 20)  + 0, (l + 100)  + 0, mouseX, mouseY);
    	}
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	GL11.glPopMatrix();
    }
    
    /**
     * 前が上にくるレシピ
     * 後ろが下にくるレシピ、999のとき反映されない
     * */
    private void drow_page_smelting(int id1, int id2, int k, int l, int mouseX, int mouseY) {
    	GL11.glPushMatrix();
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	float bairitu = 1F;
    	this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/furnace.png"));
    	GL11.glScalef(bairitu, bairitu, bairitu);
    	this.drawTexturedModalRect((k + 20) / bairitu, (l + 20) / bairitu, 46, 13, (int)(100), (int)(60));
    	this.drowSmelting(id1, (k + 20)  + 0, (l + 20)  + 0, mouseX, mouseY);
    	this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/furnace.png"));
    	if(id2 != 999) {
    		this.drawTexturedModalRect((k + 20) / bairitu, (l + 100) / bairitu, 46, 13, (int)(100), (int)(60));
    		this.drowSmelting(id2, (k + 20)  + 0, (l + 100)  + 0, mouseX, mouseY);
    	}
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	GL11.glPopMatrix();
    }
    
    
    private void drowRecipe(int id, int x, int y, int mouseX, int mouseY) {
    	RenderItem renderitem = mc.getRenderItem();
    	FontRenderer fontReader = mc.fontRenderer;
    	GFRecipe recipe = new GFRecipe();
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item0[id]);
			if (!item.isEmpty()) 
			{
				int posx =   x + 98;
				int posy =   y + 22;
				renderitem.renderItemAndEffectIntoGUI(item, posx, posy);
				renderitem.renderItemOverlayIntoGUI(fontReader, item, posx, posy, null);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
				String d2 = String.format("%1$3d", recipe.item0_kazu[id]);
				fontReader.drawString(d2,  posx + 8, posy + 8, 0xFFFFFF);
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item1[id]);
			if (!item.isEmpty()) {
				int posx =   x + 4;
				int posy =   y + 4;
				drawItemStack(item, posx, posy, null);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item2[id]);
			if (!item.isEmpty()) {
				int posx =   x + 22;
				int posy =   y + 4;
				drawItemStack(item, posx, posy, null);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item3[id]);
			if (!item.isEmpty()) {
				int posx =   x + 40;
				int posy =   y + 4;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item4[id]);
			if (!item.isEmpty()) {
				int posx =   x + 4;
				int posy =   y + 22;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item5[id]);
			if (!item.isEmpty()) {
				int posx =   x + 22;
				int posy =   y + 22;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item6[id]);
			if (!item.isEmpty()) {
				int posx =   x + 40;
				int posy =   y + 22;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item7[id]);
			if (!item.isEmpty()) {
				int posx =   x + 4;
				int posy =   y + 40;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item8[id]);
			if (!item.isEmpty()) {
				int posx =   x + 22;
				int posy =   y + 40;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item9[id]);
			if (!item.isEmpty()) {
				int posx =   x + 40;
				int posy =   y + 40;
				renderitem.renderItemIntoGUI(item, posx, posy);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    }
    
    private void drowSmelting(int id, int x, int y, int mouseX, int mouseY) {
    	RenderItem renderitem = mc.getRenderItem();
    	FontRenderer fontReader = mc.fontRenderer;
    	GFRecipe recipe = new GFRecipe();
    	{
    		GL11.glPushMatrix();
    		ItemStack item = new ItemStack(recipe.item_input[id]);
			if (!item.isEmpty()) 
			{
				int posx =   x + 70;
				int posy =   y + 22;
				renderitem.renderItemAndEffectIntoGUI(item, posx, posy);
				renderitem.renderItemOverlayIntoGUI(fontReader, item, posx, posy, null);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    	{
    		GL11.glPushMatrix();
    		ItemStack item = recipe.item_output[id];
			if (!item.isEmpty()) {
				int posx =   x + 10;
				int posy =   y + 4;
				drawItemStack(item, posx, posy, null);
				boolean onitem = mouseX >= posx && mouseY >= posy && mouseX < posx + 16 && mouseY < posy + 16;
				if(onitem)
				{
					this.renderToolTip(item, mouseX, mouseY);
				}
			}
			GL11.glPopMatrix();
    	}
    }
    
    /**
     * Draws an ItemStack.
     *  
     * The z index is increased by 32 (and not decreased afterwards), and the item is then rendered at z=200.
     */
    private void drawItemStack(ItemStack stack, int x, int y, String altText)
    {
        GlStateManager.translate(0.0F, 0.0F, 32.0F);
        this.zLevel = 200.0F;
        this.itemRender.zLevel = 200.0F;
        net.minecraft.client.gui.FontRenderer font = stack.getItem().getFontRenderer(stack);
        if (font == null) font = fontRenderer;
        this.itemRender.renderItemAndEffectIntoGUI(stack, x, y);
        this.itemRender.renderItemOverlayIntoGUI(font, stack, x, y, altText);
        this.zLevel = 0.0F;
        this.itemRender.zLevel = 0.0F;
    }
    
    /*GUIが開いている時にゲームの処理を止めるかどうか。*/
    @Override
    public boolean doesGuiPauseGame() {
        return false;
    }
}