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

The following are Jave code examples for showing how to use displayGui() 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.
+ Save this method
Example 1
Project: DecompiledMinecraft   File: BlockEnchantmentTable.java   View Source Code Vote up 6 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
 
Example 2
Project: DecompiledMinecraft   File: BlockEnchantmentTable.java   View Source Code Vote up 6 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
 
Example 3
Project: BaseClient   File: BlockEnchantmentTable.java   View Source Code Vote up 6 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
 
Example 4
Project: BaseClient   File: BlockEnchantmentTable.java   View Source Code Vote up 6 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
 
Example 5
Project: Backmemed   File: BlockEnchantmentTable.java   View Source Code Vote up 6 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
 
Example 6
Project: CustomWorldGen   File: BlockEnchantmentTable.java   View Source Code Vote up 6 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityEnchantmentTable)
        {
            playerIn.displayGui((TileEntityEnchantmentTable)tileentity);
        }

        return true;
    }
}
 
Example 7
Project: DecompiledMinecraft   File: BlockWorkbench.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        playerIn.displayGui(new BlockWorkbench.InterfaceCraftingTable(worldIn, pos));
        playerIn.triggerAchievement(StatList.field_181742_Z);
        return true;
    }
}
 
Example 8
Project: DecompiledMinecraft   File: BlockAnvil.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (!worldIn.isRemote)
    {
        playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
    }

    return true;
}
 
Example 9
Project: DecompiledMinecraft   File: BlockWorkbench.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        playerIn.displayGui(new BlockWorkbench.InterfaceCraftingTable(worldIn, pos));
        playerIn.triggerAchievement(StatList.field_181742_Z);
        return true;
    }
}
 
Example 10
Project: DecompiledMinecraft   File: BlockAnvil.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (!worldIn.isRemote)
    {
        playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
    }

    return true;
}
 
Example 11
Project: BaseClient   File: BlockWorkbench.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        playerIn.displayGui(new BlockWorkbench.InterfaceCraftingTable(worldIn, pos));
        playerIn.triggerAchievement(StatList.field_181742_Z);
        return true;
    }
}
 
Example 12
Project: BaseClient   File: BlockAnvil.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (!worldIn.isRemote)
    {
        playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
    }

    return true;
}
 
Example 13
Project: BaseClient   File: BlockWorkbench.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        playerIn.displayGui(new BlockWorkbench.InterfaceCraftingTable(worldIn, pos));
        playerIn.triggerAchievement(StatList.field_181742_Z);
        return true;
    }
}
 
Example 14
Project: BaseClient   File: BlockAnvil.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (!worldIn.isRemote)
    {
        playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
    }

    return true;
}
 
Example 15
Project: Backmemed   File: BlockWorkbench.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        playerIn.displayGui(new BlockWorkbench.InterfaceCraftingTable(worldIn, pos));
        playerIn.addStat(StatList.CRAFTING_TABLE_INTERACTION);
        return true;
    }
}
 
Example 16
Project: Backmemed   File: BlockAnvil.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
    if (!worldIn.isRemote)
    {
        playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
    }

    return true;
}
 
Example 17
Project: CustomWorldGen   File: BlockWorkbench.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (worldIn.isRemote)
    {
        return true;
    }
    else
    {
        playerIn.displayGui(new BlockWorkbench.InterfaceCraftingTable(worldIn, pos));
        playerIn.addStat(StatList.CRAFTING_TABLE_INTERACTION);
        return true;
    }
}
 
Example 18
Project: CustomWorldGen   File: BlockAnvil.java   View Source Code Vote up 5 votes
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (!worldIn.isRemote)
    {
        playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
    }

    return true;
}