當前位置: 首頁>>代碼示例>>Java>>正文


Java InventoryHelper.dropInventoryItems方法代碼示例

本文整理匯總了Java中net.minecraft.inventory.InventoryHelper.dropInventoryItems方法的典型用法代碼示例。如果您正苦於以下問題:Java InventoryHelper.dropInventoryItems方法的具體用法?Java InventoryHelper.dropInventoryItems怎麽用?Java InventoryHelper.dropInventoryItems使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.inventory.InventoryHelper的用法示例。


在下文中一共展示了InventoryHelper.dropInventoryItems方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(final World w, final BlockPos pos, final IBlockState state)
{
    final ITileMultiblock tile = (ITileMultiblock) w.getTileEntity(pos);
    if (tile != null)
    {
        if (tile.isCore())
        {
            if (tile instanceof IInventory)
            {
                InventoryHelper.dropInventoryItems(w, pos, (IInventory) tile);
                w.updateComparatorOutputLevel(pos, this);
            }
            this.dropBlockAsItem(w, pos, state, 0);
        }
        else
            tile.breakCore();
    }
    super.breakBlock(w, pos, state);
}
 
開發者ID:OPMCorp,項目名稱:Qbar,代碼行數:21,代碼來源:BlockMultiblockBase.java

示例2: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
	if (!keepInventory)
	{
		TileEntity tileentity = worldIn.getTileEntity(pos);

		if (tileentity instanceof TileEntitySplitter)
		{
			InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntitySplitter) tileentity);
			worldIn.updateComparatorOutputLevel(pos, this);
		}
	}

	super.breakBlock(worldIn, pos, state);
}
 
開發者ID:MinestrapTeam,項目名稱:Minestrappolation-4,代碼行數:17,代碼來源:BlockSplitter.java

示例3: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
	if (!keepInventory)
	{
		TileEntity tileentity = worldIn.getTileEntity(pos);

		if (tileentity instanceof TileEntityCrusher)
		{
			InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityCrusher) tileentity);
			worldIn.updateComparatorOutputLevel(pos, this);
		}
	}

	super.breakBlock(worldIn, pos, state);
}
 
開發者ID:MinestrapTeam,項目名稱:Minestrappolation-4,代碼行數:17,代碼來源:BlockCrusher.java

示例4: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state)
{
    if(!keepInventory)
    {
        TileEntity tileentity = world.getTileEntity(pos);

        if(tileentity instanceof TileEntityFurnace)
        {
            InventoryHelper.dropInventoryItems(world, pos, (TileEntityFurnace)tileentity);
            world.updateComparatorOutputLevel(pos, this);
        }
    }

    super.breakBlock(world, pos, state);
}
 
開發者ID:Superloup10,項目名稱:Wolf-s-addons,代碼行數:17,代碼來源:Furnace.java

示例5: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(World par1World, BlockPos pos, IBlockState state)
{
	if (!keepInventory)
	{
		TileEntityCrystallizer tileentitycrystallizer = (TileEntityCrystallizer)par1World.getTileEntity(pos);

		if (tileentitycrystallizer != null)
		{

			InventoryHelper.dropInventoryItems(par1World, pos, tileentitycrystallizer);

			par1World.updateComparatorOutputLevel(pos, this);;
		}
	}

	super.breakBlock(par1World, pos, state);
}
 
開發者ID:Shinoow,項目名稱:AbyssalCraft,代碼行數:19,代碼來源:BlockCrystallizer.java

示例6: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
  public void breakBlock(World world, BlockPos pos, IBlockState state) {

  	// Drop any items we have if necessary
TileEntity te = world.getTileEntity(pos);
if (te != null && te instanceof IInventory) {
	InventoryHelper.dropInventoryItems(world, pos, (IInventory)te);
}
   
      super.breakBlock(world, pos, state);
      world.removeTileEntity(pos);
  }
 
開發者ID:astronautlabs,項目名稱:rezolve,代碼行數:13,代碼來源:TileBlockBase.java

示例7: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
  notifyNeighbors(worldIn, pos, state);

  TileEntity tileentity = worldIn.getTileEntity(pos);
  if (tileentity instanceof TileEntityMinecoprocessor) {
    InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityMinecoprocessor) tileentity);
  }
  super.breakBlock(worldIn, pos, state);
}
 
開發者ID:ToroCraft,項目名稱:Minecoprocessors,代碼行數:11,代碼來源:BlockMinecoprocessor.java

示例8: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
/**
 * Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
 */
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof IInventory)
    {
        InventoryHelper.dropInventoryItems(worldIn, pos, (IInventory)tileentity);
        worldIn.updateComparatorOutputLevel(pos, this);
    }

    super.breakBlock(worldIn, pos, state);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:16,代碼來源:BlockChest.java

示例9: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state)
{
    TileEntity te = world.getTileEntity(pos);
    if (te instanceof IInventory)
    {
        InventoryHelper.dropInventoryItems(world, pos, (IInventory) te);
        world.updateComparatorOutputLevel(pos, this);
    }

    super.breakBlock(world, pos, state);
}
 
開發者ID:cubex2,項目名稱:morefurnaces,代碼行數:13,代碼來源:BlockMoreFurnaces.java

示例10: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
@Override
public void breakBlock (World world, BlockPos pos, IBlockState state) {
    TileEntity tile = world.getTileEntity(pos);
    if (tile instanceof TileBloomeryFurnace) {
        InventoryHelper.dropInventoryItems(world, pos, (TileBloomeryFurnace)tile);
        world.updateComparatorOutputLevel(pos, this);
    }

    super.breakBlock(world, pos, state);
}
 
開發者ID:jaquadro,項目名稱:GardenStuff,代碼行數:11,代碼來源:BlockBloomeryFurnace.java

示例11: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityDispenser)
    {
        InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityDispenser)tileentity);
        worldIn.updateComparatorOutputLevel(pos, this);
    }

    super.breakBlock(worldIn, pos, state);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:13,代碼來源:BlockDispenser.java

示例12: setDead

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
/**
 * Will get destroyed next tick.
 */
public void setDead()
{
    if (this.dropContentsWhenDead)
    {
        InventoryHelper.dropInventoryItems(this.world, this, this);
    }

    super.setDead();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:13,代碼來源:EntityMinecartContainer.java

示例13: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    if (!keepInventory)
    {
        TileEntity tileentity = worldIn.getTileEntity(pos);

        if (tileentity instanceof TileEntityFurnace)
        {
            InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityFurnace)tileentity);
            worldIn.updateComparatorOutputLevel(pos, this);
        }
    }

    super.breakBlock(worldIn, pos, state);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:16,代碼來源:BlockFurnace.java

示例14: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
/**
 * Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
 */
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityHopper)
    {
        InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityHopper)tileentity);
        worldIn.updateComparatorOutputLevel(pos, this);
    }

    super.breakBlock(worldIn, pos, state);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:16,代碼來源:BlockHopper.java

示例15: breakBlock

import net.minecraft.inventory.InventoryHelper; //導入方法依賴的package包/類
/**
 * Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
 */
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:sudofox,項目名稱:Backmemed,代碼行數:15,代碼來源:BlockBrewingStand.java


注:本文中的net.minecraft.inventory.InventoryHelper.dropInventoryItems方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。