BlockBookshelf .java

net.minecraft.block.BlockBookshelf (class, 34 lines): extends Block. members: quantityDropped, getItemDropped. imports: CreativeTabs.

net.minecraft.blockclass34 linescommonextends Block784 B

API Surface (2)

int quantityDropped(Random random)
Item getItemDropped(IBlockState state, Random rand, int fortune)

Code Graph: Dependencies (6)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

BlockBookshelf.java34 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.block;
2
3
import java.util.Random;
4
import net.minecraft.block.material.Material;
5
import net.minecraft.block.state.IBlockState;
6
import net.minecraft.creativetab.CreativeTabs;
7
import net.minecraft.init.Items;
8
import net.minecraft.item.Item;
9
10
public class BlockBookshelf extends Block
11
{
12
    public BlockBookshelf()
13
    {
14
        super(Material.wood);
15
        this.setCreativeTab(CreativeTabs.tabBlock);
16
    }
17
18
    /**
19
     * Returns the quantity of items to drop on block destruction.
20
     */
21
    public int quantityDropped(Random random)
22
    {
23
        return 3;
24
    }
25
26
    /**
27
     * Get the Item that this Block should drop when harvested.
28
     */
29
    public Item getItemDropped(IBlockState state, Random rand, int fortune)
30
    {
31
        return Items.book;
32
    }
33
}
34

Deobfuscated MCP 1.8.9 source of BlockBookshelf from Marcelektro/MavenMCP-1.8.9 (net/minecraft/block/BlockBookshelf.java), stored verbatim.