当前位置: 首页>>代码示例>>Java>>正文


Java EntityPlayer.displayGUIChest方法代码示例

本文整理汇总了Java中net.minecraft.entity.player.EntityPlayer.displayGUIChest方法的典型用法代码示例。如果您正苦于以下问题:Java EntityPlayer.displayGUIChest方法的具体用法?Java EntityPlayer.displayGUIChest怎么用?Java EntityPlayer.displayGUIChest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.entity.player.EntityPlayer的用法示例。


在下文中一共展示了EntityPlayer.displayGUIChest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityHopper)
        {
            playerIn.displayGUIChest((TileEntityHopper)tileentity);
            playerIn.addStat(StatList.HOPPER_INSPECTED);
        }

        return true;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:BlockHopper.java

示例2: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityBrewingStand)
        {
            playerIn.displayGUIChest((TileEntityBrewingStand)tileentity);
            playerIn.addStat(StatList.BREWINGSTAND_INTERACTION);
        }

        return true;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:BlockBrewingStand.java

示例3: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityBeacon)
        {
            playerIn.displayGUIChest((TileEntityBeacon)tileentity);
            playerIn.addStat(StatList.BEACON_INTERACTION);
        }

        return true;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:BlockBeacon.java

示例4: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 {
		ILockableContainer ilockablecontainer = this.getLockableContainer(worldIn, pos);

		if (ilockablecontainer != null) {
			playerIn.displayGUIChest(ilockablecontainer);

			if (this.chestType == 0) {
				playerIn.triggerAchievement(StatList.field_181723_aa);
			} else if (this.chestType == 1) {
				playerIn.triggerAchievement(StatList.field_181737_U);
			}
		}

		return true;
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:BlockChest.java

示例5: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityBeacon)
        {
            playerIn.displayGUIChest((TileEntityBeacon)tileentity);
            playerIn.triggerAchievement(StatList.field_181730_N);
        }

        return true;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:BlockBeacon.java

示例6: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityHopper)
        {
            playerIn.displayGUIChest((TileEntityHopper)tileentity);
            playerIn.triggerAchievement(StatList.field_181732_P);
        }

        return true;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:BlockHopper.java

示例7: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityFurnace)
        {
            playerIn.displayGUIChest((TileEntityFurnace)tileentity);
            playerIn.addStat(StatList.FURNACE_INTERACTION);
        }

        return true;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:BlockFurnace.java

示例8: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityHopper)
        {
            playerIn.displayGUIChest((TileEntityHopper)tileentity);
            playerIn.addStat(StatList.HOPPER_INSPECTED);
        }

        return true;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:BlockHopper.java

示例9: interactFirst

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
/**
 * First layer of player interaction
 */
public boolean interactFirst(EntityPlayer playerIn)
{
    if (!this.worldObj.isRemote)
    {
        playerIn.displayGUIChest(this);
    }

    return true;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:EntityMinecartContainer.java

示例10: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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 TileEntityDispenser)
        {
            playerIn.displayGUIChest((TileEntityDispenser)tileentity);

            if (tileentity instanceof TileEntityDropper)
            {
                playerIn.triggerAchievement(StatList.field_181731_O);
            }
            else
            {
                playerIn.triggerAchievement(StatList.field_181733_Q);
            }
        }

        return true;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:BlockDispenser.java

示例11: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.addStat(StatList.ENDERCHEST_OPENED);
            return true;
        }
    }
    else
    {
        return true;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:29,代码来源:BlockEnderChest.java

示例12: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
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
    {
        ILockableContainer ilockablecontainer = this.getLockableContainer(worldIn, pos);

        if (ilockablecontainer != null)
        {
            playerIn.displayGUIChest(ilockablecontainer);

            if (this.chestType == 0)
            {
                playerIn.triggerAchievement(StatList.field_181723_aa);
            }
            else if (this.chestType == 1)
            {
                playerIn.triggerAchievement(StatList.field_181737_U);
            }
        }

        return true;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:BlockChest.java

示例13: processInitialInteract

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public boolean processInitialInteract(EntityPlayer player, EnumHand stack)
{
    if (!this.world.isRemote)
    {
        player.displayGUIChest(this);
    }

    return true;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:EntityMinecartHopper.java

示例14: processInitialInteract

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public boolean processInitialInteract(EntityPlayer player, @Nullable ItemStack stack, EnumHand hand)
{
    if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.minecart.MinecartInteractEvent(this, player, stack, hand))) return true;
    if (!this.worldObj.isRemote)
    {
        player.displayGUIChest(this);
    }

    return true;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:11,代码来源:EntityMinecartHopper.java

示例15: onBlockActivated

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    InventoryEnderChest inventoryenderchest = playerIn.getInventoryEnderChest();
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (inventoryenderchest != null && tileentity instanceof TileEntityEnderChest)
    {
        if (worldIn.getBlockState(pos.up()).getBlock().isNormalCube())
        {
            return true;
        }
        else if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            inventoryenderchest.setChestTileEntity((TileEntityEnderChest)tileentity);
            playerIn.displayGUIChest(inventoryenderchest);
            playerIn.triggerAchievement(StatList.field_181738_V);
            return true;
        }
    }
    else
    {
        return true;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:29,代码来源:BlockEnderChest.java


注:本文中的net.minecraft.entity.player.EntityPlayer.displayGUIChest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。