BlockAir .java

net.minecraft.block.BlockAir (class, 57 lines): members: canCollideCheck, isReplaceable, dropBlockAsItemWithChance, getRenderType, getCollisionBoundingBox.

net.minecraft.blockclass57 linescommonextends Block1.3 KB

API Surface (6)

int getRenderType()
AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
boolean isOpaqueCube()
boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
boolean isReplaceable(World worldIn, BlockPos pos)

Code Graph: Dependencies (6)

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

Full Source

BlockAir.java57 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.block;
2
3
import net.minecraft.block.material.Material;
4
import net.minecraft.block.state.IBlockState;
5
import net.minecraft.util.AxisAlignedBB;
6
import net.minecraft.util.BlockPos;
7
import net.minecraft.world.World;
8
9
public class BlockAir extends Block
10
{
11
    protected BlockAir()
12
    {
13
        super(Material.air);
14
    }
15
16
    /**
17
     * The type of render function called. 3 for standard block models, 2 for TESR's, 1 for liquids, -1 is no render
18
     */
19
    public int getRenderType()
20
    {
21
        return -1;
22
    }
23
24
    public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
25
    {
26
        return null;
27
    }
28
29
    /**
30
     * Used to determine ambient occlusion and culling when rebuilding chunks for render
31
     */
32
    public boolean isOpaqueCube()
33
    {
34
        return false;
35
    }
36
37
    public boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
38
    {
39
        return false;
40
    }
41
42
    /**
43
     * Spawns this Block's drops into the World as EntityItems.
44
     */
45
    public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
46
    {
47
    }
48
49
    /**
50
     * Whether this Block can be replaced directly by other blocks (true for e.g. tall grass)
51
     */
52
    public boolean isReplaceable(World worldIn, BlockPos pos)
53
    {
54
        return true;
55
    }
56
}
57

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