public final class Block
extends java.lang.Object
implements java.io.Serializable
BLOCKS
array. Implements the Enumeration pattern, meaning there is only ever one instance of this class for
each block ID, allowing use of the equals operator (==) for comparing instances.
Created by pepijn on 17-3-15.
Superseded by Material
Modifier and Type | Field and Description |
---|---|
static int[] |
BLOCK_TRANSPARENCY |
static java.lang.String[] |
BLOCK_TYPE_NAMES |
int |
blockLight
The amount of blocklight emitted by this block.
|
static Block[] |
BLOCKS |
int |
category
Type of block encoded in a single category
|
static int |
CATEGORY_AIR |
static int |
CATEGORY_FLUID |
static int |
CATEGORY_INSUBSTANTIAL |
static int |
CATEGORY_MAN_MADE |
static int |
CATEGORY_NATURAL_SOLID |
static int |
CATEGORY_RESOURCE |
int |
id
The block ID.
|
boolean |
insubstantial
Whether the block is insubstantial, meaning that they are fully
transparent, not man-made, removing them would have no effect on the
surrounding blocks and be otherwise inconsequential.
|
static int[] |
LIGHT_SOURCES |
boolean |
lightSource
Whether the block is a source of blocklight (
blockLight > 0). |
java.lang.String |
name
The name of the block.
|
boolean |
natural
Whether the block can occur as part of a pristine Minecraft-generated
landscape, excluding artificial structures such as abandoned
mineshafts, villages, temples, strongholds, etc.
|
boolean |
opaque
Whether the block is fully opaque (
transparency == 15) |
boolean |
resource
Whether the block is a mineable ore or resource.
|
boolean |
solid
Whether the block is solid (meaning not
insubstantial or
veryInsubstantial ). |
boolean |
terrain
Whether the block is part of Minecraft-generated natural ground; more
specifically whether the block type should be assigned a terrain type
when importing a Minecraft map.
|
boolean |
tileEntity
Whether the block is a tile entity.
|
boolean |
translucent
Whether the block is translucent (
transparency < 15) |
int |
transparency
How much light the block blocks.
|
boolean |
transparent
Whether the block is fully transparent (
transparency == 0) |
boolean |
treeRelated
Whether the block is part of or attached to naturally occurring
trees or giant mushrooms.
|
boolean |
vegetation
Whether the block is a plant.
|
boolean |
veryInsubstantial
Whether the block is even more insubstantial.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
toString() |
public final int id
public final transient int transparency
public final transient java.lang.String name
public final transient boolean transparent
transparency
== 0)public final transient boolean translucent
transparency
< 15)public final transient boolean opaque
transparency
== 15)public final transient boolean terrain
public final transient boolean insubstantial
public final transient boolean veryInsubstantial
insubstantial
and adds air, water, lava and leaves.public final transient boolean solid
insubstantial
or
veryInsubstantial
).public final transient boolean resource
public final transient boolean tileEntity
public final transient boolean treeRelated
public final transient boolean vegetation
treeRelated
blocks.public final transient int blockLight
public final transient boolean lightSource
blockLight
> 0).public final transient boolean natural
public final transient int category
public static final Block[] BLOCKS
public static final java.lang.String[] BLOCK_TYPE_NAMES
public static final int[] BLOCK_TRANSPARENCY
public static final int[] LIGHT_SOURCES
public static final int CATEGORY_AIR
public static final int CATEGORY_FLUID
public static final int CATEGORY_INSUBSTANTIAL
public static final int CATEGORY_MAN_MADE
public static final int CATEGORY_RESOURCE
public static final int CATEGORY_NATURAL_SOLID