BlockGravel .java

net.minecraft.block.BlockGravel (class, 32 lines): extends BlockFalling. members: getMapColor, getItemDropped. imports: MapColor, Items, Item.

net.minecraft.blockclass32 linescommonextends BlockFalling778 B

API Surface (2)

Item getItemDropped(IBlockState state, Random rand, int fortune)
MapColor getMapColor(IBlockState state)

Code Graph: Dependencies (5)

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

Full Source

BlockGravel.java32 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.block;
2
3
import java.util.Random;
4
import net.minecraft.block.material.MapColor;
5
import net.minecraft.block.state.IBlockState;
6
import net.minecraft.init.Items;
7
import net.minecraft.item.Item;
8
9
public class BlockGravel extends BlockFalling
10
{
11
    /**
12
     * Get the Item that this Block should drop when harvested.
13
     */
14
    public Item getItemDropped(IBlockState state, Random rand, int fortune)
15
    {
16
        if (fortune > 3)
17
        {
18
            fortune = 3;
19
        }
20
21
        return rand.nextInt(10 - fortune * 3) == 0 ? Items.flint : Item.getItemFromBlock(this);
22
    }
23
24
    /**
25
     * Get the MapColor for this Block and the given BlockState
26
     */
27
    public MapColor getMapColor(IBlockState state)
28
    {
29
        return MapColor.stoneColor;
30
    }
31
}
32

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