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


Java TileEntityBrewingStand类代码示例

本文整理汇总了Java中net.minecraft.tileentity.TileEntityBrewingStand的典型用法代码示例。如果您正苦于以下问题:Java TileEntityBrewingStand类的具体用法?Java TileEntityBrewingStand怎么用?Java TileEntityBrewingStand使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onBlockActivated

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的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 TileEntityBrewingStand)
        {
            playerIn.displayGUIChest((TileEntityBrewingStand)tileentity);
            playerIn.triggerAchievement(StatList.field_181729_M);
        }

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

示例2: onBlockActivated

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的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 TileEntityBrewingStand)
        {
            playerIn.displayGUIChest((TileEntityBrewingStand)tileentity);
            playerIn.addStat(StatList.BREWINGSTAND_INTERACTION);
        }

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

示例3: onBlockActivated

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的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

示例4: onBlockActivated

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
/**
 * Called upon block activation (right click on the block.)
 */
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
    if (p_149727_1_.isClient)
    {
        return true;
    }
    else
    {
        TileEntityBrewingStand var10 = (TileEntityBrewingStand)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);

        if (var10 != null)
        {
            p_149727_5_.func_146098_a(var10);
        }

        return true;
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:BlockBrewingStand.java

示例5: ContainerBrewingStand

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public ContainerBrewingStand(InventoryPlayer par1InventoryPlayer, TileEntityBrewingStand par2TileEntityBrewingStand)
{
    this.tileBrewingStand = par2TileEntityBrewingStand;
    this.addSlotToContainer(new ContainerBrewingStand.Potion(par1InventoryPlayer.player, par2TileEntityBrewingStand, 0, 56, 46));
    this.addSlotToContainer(new ContainerBrewingStand.Potion(par1InventoryPlayer.player, par2TileEntityBrewingStand, 1, 79, 53));
    this.addSlotToContainer(new ContainerBrewingStand.Potion(par1InventoryPlayer.player, par2TileEntityBrewingStand, 2, 102, 46));
    this.theSlot = this.addSlotToContainer(new ContainerBrewingStand.Ingredient(par2TileEntityBrewingStand, 3, 79, 17));
    int var3;

    for (var3 = 0; var3 < 3; ++var3)
    {
        for (int var4 = 0; var4 < 9; ++var4)
        {
            this.addSlotToContainer(new Slot(par1InventoryPlayer, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
        }
    }

    for (var3 = 0; var3 < 9; ++var3)
    {
        this.addSlotToContainer(new Slot(par1InventoryPlayer, var3, 8 + var3 * 18, 142));
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:23,代码来源:ContainerBrewingStand.java

示例6: func_146098_a

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public void func_146098_a(TileEntityBrewingStand p_146098_1_)
{
    // CraftBukkit start - Inventory open hook
    Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBrewingStand(this.inventory, p_146098_1_));

    if (container == null)
    {
        p_146098_1_.closeInventory(); // Cauldron - prevent chests from being stuck in open state on clients
        return;
    }

    // CraftBukkit end
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, 5, p_146098_1_.getInventoryName(), p_146098_1_.getSizeInventory(), p_146098_1_.hasCustomInventoryName()));
    this.openContainer = container; // CraftBukkit - Use container we passed to event
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.addCraftingToCrafters(this);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:EntityPlayerMP.java

示例7: onBlockActivated

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
    if (p_149727_1_.isRemote)
    {
        return true;
    }
    else
    {
        TileEntityBrewingStand tileentitybrewingstand = (TileEntityBrewingStand)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);

        if (tileentitybrewingstand != null)
        {
            p_149727_5_.func_146098_a(tileentitybrewingstand);
        }

        return true;
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:BlockBrewingStand.java

示例8: ContainerBrewingStand

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public ContainerBrewingStand(InventoryPlayer p_i1805_1_, TileEntityBrewingStand p_i1805_2_)
{
    this.player = p_i1805_1_; // CraftBukkit
    this.tileBrewingStand = p_i1805_2_;
    this.addSlotToContainer(new ContainerBrewingStand.Potion(p_i1805_1_.player, p_i1805_2_, 0, 56, 46));
    this.addSlotToContainer(new ContainerBrewingStand.Potion(p_i1805_1_.player, p_i1805_2_, 1, 79, 53));
    this.addSlotToContainer(new ContainerBrewingStand.Potion(p_i1805_1_.player, p_i1805_2_, 2, 102, 46));
    this.theSlot = this.addSlotToContainer(new ContainerBrewingStand.Ingredient(p_i1805_2_, 3, 79, 17));
    int i;

    for (i = 0; i < 3; ++i)
    {
        for (int j = 0; j < 9; ++j)
        {
            this.addSlotToContainer(new Slot(p_i1805_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
        }
    }

    for (i = 0; i < 9; ++i)
    {
        this.addSlotToContainer(new Slot(p_i1805_1_, i, 8 + i * 18, 142));
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:24,代码来源:ContainerBrewingStand.java

示例9: ContainerBrewingStand

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public ContainerBrewingStand(InventoryPlayer p_i1805_1_, TileEntityBrewingStand p_i1805_2_)
{
    this.tileBrewingStand = p_i1805_2_;
    this.addSlotToContainer(new ContainerBrewingStand.Potion(p_i1805_1_.player, p_i1805_2_, 0, 56, 46));
    this.addSlotToContainer(new ContainerBrewingStand.Potion(p_i1805_1_.player, p_i1805_2_, 1, 79, 53));
    this.addSlotToContainer(new ContainerBrewingStand.Potion(p_i1805_1_.player, p_i1805_2_, 2, 102, 46));
    this.theSlot = this.addSlotToContainer(new ContainerBrewingStand.Ingredient(p_i1805_2_, 3, 79, 17));
    int i;

    for (i = 0; i < 3; ++i)
    {
        for (int j = 0; j < 9; ++j)
        {
            this.addSlotToContainer(new Slot(p_i1805_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
        }
    }

    for (i = 0; i < 9; ++i)
    {
        this.addSlotToContainer(new Slot(p_i1805_1_, i, 8 + i * 18, 142));
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:23,代码来源:ContainerBrewingStand.java

示例10: ContainerBrewingStand

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public ContainerBrewingStand(InventoryPlayer p_i1805_1_, TileEntityBrewingStand p_i1805_2_) {
   this.field_75188_e = p_i1805_2_;
   this.func_75146_a(new SlotBrewingStandPotion(p_i1805_1_.field_70458_d, p_i1805_2_, 0, 56, 46));
   this.func_75146_a(new SlotBrewingStandPotion(p_i1805_1_.field_70458_d, p_i1805_2_, 1, 79, 53));
   this.func_75146_a(new SlotBrewingStandPotion(p_i1805_1_.field_70458_d, p_i1805_2_, 2, 102, 46));
   this.field_75186_f = this.func_75146_a(new SlotBrewingStandIngredient(this, p_i1805_2_, 3, 79, 17));

   int var3;
   for(var3 = 0; var3 < 3; ++var3) {
      for(int var4 = 0; var4 < 9; ++var4) {
         this.func_75146_a(new Slot(p_i1805_1_, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
      }
   }

   for(var3 = 0; var3 < 9; ++var3) {
      this.func_75146_a(new Slot(p_i1805_1_, var3, 8 + var3 * 18, 142));
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:ContainerBrewingStand.java

示例11: onBlockActivated

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
/**
 * Called upon block activation (right click on the block.)
 */
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
    if (par1World.isRemote)
    {
        return true;
    }
    else
    {
        TileEntityBrewingStand tileentitybrewingstand = (TileEntityBrewingStand)par1World.getBlockTileEntity(par2, par3, par4);

        if (tileentitybrewingstand != null)
        {
            par5EntityPlayer.displayGUIBrewingStand(tileentitybrewingstand);
        }

        return true;
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:22,代码来源:BlockBrewingStand.java

示例12: ContainerBrewingStand

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public ContainerBrewingStand(InventoryPlayer par1InventoryPlayer, TileEntityBrewingStand par2TileEntityBrewingStand)
{
    this.tileBrewingStand = par2TileEntityBrewingStand;
    this.addSlotToContainer(new SlotBrewingStandPotion(par1InventoryPlayer.player, par2TileEntityBrewingStand, 0, 56, 46));
    this.addSlotToContainer(new SlotBrewingStandPotion(par1InventoryPlayer.player, par2TileEntityBrewingStand, 1, 79, 53));
    this.addSlotToContainer(new SlotBrewingStandPotion(par1InventoryPlayer.player, par2TileEntityBrewingStand, 2, 102, 46));
    this.theSlot = this.addSlotToContainer(new SlotBrewingStandIngredient(this, par2TileEntityBrewingStand, 3, 79, 17));
    int i;

    for (i = 0; i < 3; ++i)
    {
        for (int j = 0; j < 9; ++j)
        {
            this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
        }
    }

    for (i = 0; i < 9; ++i)
    {
        this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142));
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:ContainerBrewingStand.java

示例13: getGrowthRate

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
/**
 * Significantly (twice as much per 3 brewing stands) increase the growth rate when there brewing stands that are currently brewing around the plant.
 */
@Override
protected float getGrowthRate(World world, int x, int y, int z){
    int brewingBrewingStands = 0;
    for(int i = x - SQUARE_RADIUS; i <= x + SQUARE_RADIUS; i++) {
        for(int j = y - MAX_HEIGHT_DIFF; j <= y + MAX_HEIGHT_DIFF; j++) {
            for(int k = z - SQUARE_RADIUS; k <= z + SQUARE_RADIUS; k++) {
                if(world.getBlock(i, j, k) == Blocks.brewing_stand && world.getTileEntity(i, j, k) instanceof TileEntityBrewingStand) {
                    TileEntityBrewingStand brewingStand = (TileEntityBrewingStand)world.getTileEntity(i, j, k);
                    if(brewingStand.getBrewTime() > 0) brewingBrewingStands++;
                }
            }
        }
    }
    return super.getGrowthRate(world, x, y, z) * (1 + brewingBrewingStands * 0.333F);
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:19,代码来源:BlockPotionPlant.java

示例14: onBlockPlacedBy

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
/**
 * Called by ItemBlocks after a block is set in the world, to allow post-place logic
 */
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
    if (stack.hasDisplayName())
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityBrewingStand)
        {
            ((TileEntityBrewingStand)tileentity).setName(stack.getDisplayName());
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:16,代码来源:BlockBrewingStand.java

示例15: breakBlock

import net.minecraft.tileentity.TileEntityBrewingStand; //导入依赖的package包/类
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityBrewingStand)
    {
        InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityBrewingStand)tileentity);
    }

    super.breakBlock(worldIn, pos, state);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:BlockBrewingStand.java


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