Java Code Examples for net.minecraft.entity.player.EntityPlayer.displayGUIBook()

The following are Jave code examples for showing how to use displayGUIBook() of the net.minecraft.entity.player.EntityPlayer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: ItemEditableBook.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    if (!worldIn.isRemote)
    {
        this.resolveContents(itemStackIn, playerIn);
    }

    playerIn.displayGUIBook(itemStackIn);
    playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
    return itemStackIn;
}
 
Example 2
Project: BaseClient   File: ItemWritableBook.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    playerIn.displayGUIBook(itemStackIn);
    playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
    return itemStackIn;
}
 
Example 3
Project: BaseClient   File: ItemEditableBook.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    if (!worldIn.isRemote)
    {
        this.resolveContents(itemStackIn, playerIn);
    }

    playerIn.displayGUIBook(itemStackIn);
    playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
    return itemStackIn;
}
 
Example 4
Project: BaseClient   File: ItemWritableBook.java   Source Code and License Vote up 5 votes
/**
 * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
 */
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
{
    playerIn.displayGUIBook(itemStackIn);
    playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]);
    return itemStackIn;
}