Java Code Examples for net.minecraft.init.Items.BED

The following are Jave code examples for showing how to use BED of the net.minecraft.init.Items class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Backmemed   File: BlockBed.java   View Source Code Vote up 4 votes
/**
 * Get the Item that this Block should drop when harvested.
 */
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
    return state.getValue(PART) == BlockBed.EnumPartType.HEAD ? Items.field_190931_a : Items.BED;
}
 
Example 2
Project: Backmemed   File: BlockBed.java   View Source Code Vote up 4 votes
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
{
    return new ItemStack(Items.BED);
}
 
Example 3
Project: CustomWorldGen   File: BlockBed.java   View Source Code Vote up 4 votes
/**
 * Get the Item that this Block should drop when harvested.
 */
@Nullable
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
    return state.getValue(PART) == BlockBed.EnumPartType.HEAD ? null : Items.BED;
}
 
Example 4
Project: CustomWorldGen   File: BlockBed.java   View Source Code Vote up 4 votes
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
{
    return new ItemStack(Items.BED);
}