本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
}