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