Modifier and Type | Method and Description |
---|---|
boolean |
canPassThrough()
Checks whether the block type can be passed through.
|
static boolean |
canPassThrough(BaseBlock block)
Checks whether a block can be passed through.
|
static boolean |
canPassThrough(int id)
Checks whether a block can be passed through.
|
static boolean |
canPassThrough(int id,
int data)
Checks whether a block can be passed through.
|
boolean |
canTransferRedstone()
Returns true if a block can transfer Redstone.
|
static boolean |
canTransferRedstone(int id)
Returns true if a block can transfer Redstone.
|
double |
centralTopLimit()
Returns the y offset a player falls to when falling onto the top of a block at xp+0.5/zp+0.5.
|
static double |
centralTopLimit(BaseBlock block)
Returns the y offset a player falls to when falling onto the top of a block at xp+0.5/zp+0.5.
|
static double |
centralTopLimit(int id,
int data)
Returns the y offset a player falls to when falling onto the top of a block at xp+0.5/zp+0.5.
|
static boolean |
emitsLight(int id)
Checks if the block type emits light.
|
static BlockType |
fromID(int id)
Return type from ID.
|
static PlayerDirection |
getAttachment(int type,
int data)
Returns the direction to the block(B) this block(A) is attached to.
|
static BaseItem |
getBlockBagItem(int type,
int data)
Get the block or item that this block can be constructed from.
|
static BaseItemStack |
getBlockDrop(int id,
short data)
Get the block drop for a block.
|
BaseItemStack |
getBlockDrop(short data)
Get the block drop for this type given a data value.
|
static BaseBlock |
getBlockForItem(int typeId,
int data)
Get the equivalent block for an item.
|
static int |
getDroppedBlock(int id)
Deprecated.
This function ignores the data value.
|
int |
getID()
Get block numeric ID.
|
java.lang.String |
getName()
Get user-friendly block name.
|
boolean |
isContainerBlock()
Returns true if the block is a container block.
|
static boolean |
isContainerBlock(int id)
Returns true if the block is a container block.
|
boolean |
isNaturalTerrainBlock()
Checks if the block type is naturally occurring
|
static boolean |
isNaturalTerrainBlock(BaseBlock block)
Checks if the block type is naturally occurring
|
static boolean |
isNaturalTerrainBlock(int id)
Deprecated.
|
static boolean |
isNaturalTerrainBlock(int id,
int data)
Checks if the block type is naturally occurring
|
boolean |
isRailBlock()
Checks if the block is that of one of the rail types
|
static boolean |
isRailBlock(int id)
Checks if the block is that of one of the rail types.
|
boolean |
isRedstoneBlock()
Returns true if a block uses Redstone in some way.
|
static boolean |
isRedstoneBlock(int id)
Returns true if a block uses Redstone in some way.
|
boolean |
isRedstoneSource()
Returns whether the block is a Redstone source.
|
static boolean |
isRedstoneSource(int id)
Returns whether the block is a Redstone source.
|
static boolean |
isTranslucent(int id)
Checks if the block type lets light through.
|
static BlockType |
lookup(java.lang.String name)
Return type from name.
|
static BlockType |
lookup(java.lang.String name,
boolean fuzzy)
Return type from name.
|
static boolean |
shouldPlaceFinal(int id)
Checks to see whether a block should be placed in the final queue.
|
boolean |
shouldPlaceLast()
Checks to see whether this block should be placed last (when reordering
blocks that are placed)
|
static boolean |
shouldPlaceLast(int id)
Checks to see whether a block should be placed last (when reordering
blocks that are placed).
|
boolean |
usesData()
Returns true if the block uses its data value.
|
static boolean |
usesData(int id)
Returns true if the block uses its data value.
|
static BlockType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BlockType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BlockType AIR
public static final BlockType STONE
public static final BlockType GRASS
public static final BlockType DIRT
public static final BlockType COBBLESTONE
public static final BlockType WOOD
public static final BlockType SAPLING
public static final BlockType BEDROCK
public static final BlockType WATER
public static final BlockType STATIONARY_WATER
public static final BlockType LAVA
public static final BlockType STATIONARY_LAVA
public static final BlockType SAND
public static final BlockType GRAVEL
public static final BlockType GOLD_ORE
public static final BlockType IRON_ORE
public static final BlockType COAL_ORE
public static final BlockType LOG
public static final BlockType LEAVES
public static final BlockType SPONGE
public static final BlockType GLASS
public static final BlockType LAPIS_LAZULI_ORE
public static final BlockType LAPIS_LAZULI
public static final BlockType DISPENSER
public static final BlockType SANDSTONE
public static final BlockType NOTE_BLOCK
public static final BlockType BED
public static final BlockType POWERED_RAIL
public static final BlockType DETECTOR_RAIL
public static final BlockType PISTON_STICKY_BASE
public static final BlockType WEB
public static final BlockType LONG_GRASS
public static final BlockType DEAD_BUSH
public static final BlockType PISTON_BASE
public static final BlockType PISTON_EXTENSION
public static final BlockType CLOTH
public static final BlockType PISTON_MOVING_PIECE
public static final BlockType YELLOW_FLOWER
public static final BlockType RED_FLOWER
public static final BlockType BROWN_MUSHROOM
public static final BlockType RED_MUSHROOM
public static final BlockType GOLD_BLOCK
public static final BlockType IRON_BLOCK
public static final BlockType DOUBLE_STEP
public static final BlockType STEP
public static final BlockType BRICK
public static final BlockType TNT
public static final BlockType BOOKCASE
public static final BlockType MOSSY_COBBLESTONE
public static final BlockType OBSIDIAN
public static final BlockType TORCH
public static final BlockType FIRE
public static final BlockType MOB_SPAWNER
public static final BlockType WOODEN_STAIRS
public static final BlockType CHEST
public static final BlockType REDSTONE_WIRE
public static final BlockType DIAMOND_ORE
public static final BlockType DIAMOND_BLOCK
public static final BlockType WORKBENCH
public static final BlockType CROPS
public static final BlockType SOIL
public static final BlockType FURNACE
public static final BlockType BURNING_FURNACE
public static final BlockType SIGN_POST
public static final BlockType WOODEN_DOOR
public static final BlockType LADDER
public static final BlockType MINECART_TRACKS
public static final BlockType COBBLESTONE_STAIRS
public static final BlockType WALL_SIGN
public static final BlockType LEVER
public static final BlockType STONE_PRESSURE_PLATE
public static final BlockType IRON_DOOR
public static final BlockType WOODEN_PRESSURE_PLATE
public static final BlockType REDSTONE_ORE
public static final BlockType GLOWING_REDSTONE_ORE
public static final BlockType REDSTONE_TORCH_OFF
public static final BlockType REDSTONE_TORCH_ON
public static final BlockType STONE_BUTTON
public static final BlockType SNOW
public static final BlockType ICE
public static final BlockType SNOW_BLOCK
public static final BlockType CACTUS
public static final BlockType CLAY
public static final BlockType SUGAR_CANE
public static final BlockType JUKEBOX
public static final BlockType FENCE
public static final BlockType PUMPKIN
public static final BlockType NETHERRACK
public static final BlockType SOUL_SAND
public static final BlockType GLOWSTONE
public static final BlockType PORTAL
public static final BlockType JACK_O_LANTERN
public static final BlockType CAKE
public static final BlockType REDSTONE_REPEATER_OFF
public static final BlockType REDSTONE_REPEATER_ON
@Deprecated public static final BlockType LOCKED_CHEST
public static final BlockType STAINED_GLASS
public static final BlockType TRAP_DOOR
public static final BlockType SILVERFISH_BLOCK
public static final BlockType STONE_BRICK
public static final BlockType RED_MUSHROOM_CAP
public static final BlockType BROWN_MUSHROOM_CAP
public static final BlockType IRON_BARS
public static final BlockType GLASS_PANE
public static final BlockType MELON_BLOCK
public static final BlockType PUMPKIN_STEM
public static final BlockType MELON_STEM
public static final BlockType VINE
public static final BlockType FENCE_GATE
public static final BlockType BRICK_STAIRS
public static final BlockType STONE_BRICK_STAIRS
public static final BlockType MYCELIUM
public static final BlockType LILY_PAD
public static final BlockType NETHER_BRICK
public static final BlockType NETHER_BRICK_FENCE
public static final BlockType NETHER_BRICK_STAIRS
public static final BlockType NETHER_WART
public static final BlockType ENCHANTMENT_TABLE
public static final BlockType BREWING_STAND
public static final BlockType CAULDRON
public static final BlockType END_PORTAL
public static final BlockType END_PORTAL_FRAME
public static final BlockType END_STONE
public static final BlockType DRAGON_EGG
public static final BlockType REDSTONE_LAMP_OFF
public static final BlockType REDSTONE_LAMP_ON
public static final BlockType DOUBLE_WOODEN_STEP
public static final BlockType WOODEN_STEP
public static final BlockType COCOA_PLANT
public static final BlockType SANDSTONE_STAIRS
public static final BlockType EMERALD_ORE
public static final BlockType ENDER_CHEST
public static final BlockType TRIPWIRE_HOOK
public static final BlockType TRIPWIRE
public static final BlockType EMERALD_BLOCK
public static final BlockType SPRUCE_WOOD_STAIRS
public static final BlockType BIRCH_WOOD_STAIRS
public static final BlockType JUNGLE_WOOD_STAIRS
public static final BlockType COMMAND_BLOCK
public static final BlockType BEACON
public static final BlockType COBBLESTONE_WALL
public static final BlockType FLOWER_POT
public static final BlockType CARROTS
public static final BlockType POTATOES
public static final BlockType WOODEN_BUTTON
public static final BlockType HEAD
public static final BlockType ANVIL
public static final BlockType TRAPPED_CHEST
public static final BlockType PRESSURE_PLATE_LIGHT
public static final BlockType PRESSURE_PLATE_HEAVY
public static final BlockType COMPARATOR_OFF
public static final BlockType COMPARATOR_ON
public static final BlockType DAYLIGHT_SENSOR
public static final BlockType REDSTONE_BLOCK
public static final BlockType QUARTZ_ORE
public static final BlockType HOPPER
public static final BlockType QUARTZ_BLOCK
public static final BlockType QUARTZ_STAIRS
public static final BlockType ACTIVATOR_RAIL
public static final BlockType DROPPER
public static final BlockType STAINED_CLAY
public static final BlockType STAINED_GLASS_PANE
public static final BlockType LEAVES2
public static final BlockType LOG2
public static final BlockType ACACIA_STAIRS
public static final BlockType DARK_OAK_STAIRS
public static final BlockType SLIME
public static final BlockType BARRIER
public static final BlockType IRON_TRAP_DOOR
public static final BlockType PRISMARINE
public static final BlockType SEA_LANTERN
public static final BlockType HAY_BLOCK
public static final BlockType CARPET
public static final BlockType HARDENED_CLAY
public static final BlockType COAL_BLOCK
public static final BlockType PACKED_ICE
public static final BlockType DOUBLE_PLANT
public static final BlockType STANDING_BANNER
public static final BlockType WALL_BANNER
public static final BlockType DAYLIGHT_SENSOR_INVERTED
public static final BlockType RED_SANDSTONE
public static final BlockType RED_SANDSTONE_STAIRS
public static final BlockType DOUBLE_STEP2
public static final BlockType STEP2
public static final BlockType SPRUCE_FENCE_GATE
public static final BlockType BIRCH_FENCE_GATE
public static final BlockType JUNGLE_FENCE_GATE
public static final BlockType DARK_OAK_FENCE_GATE
public static final BlockType ACACIA_FENCE_GATE
public static final BlockType SPRUCE_FENCE
public static final BlockType BIRCH_FENCE
public static final BlockType JUNGLE_FENCE
public static final BlockType DARK_OAK_FENCE
public static final BlockType ACACIA_FENCE
public static final BlockType SPRUCE_DOOR
public static final BlockType BIRCH_DOOR
public static final BlockType JUNGLE_DOOR
public static final BlockType ACACIA_DOOR
public static final BlockType DARK_OAK_DOOR
public static BlockType[] values()
for (BlockType c : BlockType.values()) System.out.println(c);
public static BlockType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Nullable public static BlockType fromID(int id)
id
- the type ID@Nullable public static BlockType lookup(java.lang.String name)
name
- the name to search@Nullable public static BlockType lookup(java.lang.String name, boolean fuzzy)
name
- the name (or ID) of a blockfuzzy
- true to for a fuzzy search on the block name@Nullable public static BaseBlock getBlockForItem(int typeId, int data)
typeId
- the type ID of the blockdata
- the data valuie of the blockpublic int getID()
public java.lang.String getName()
public static boolean shouldPlaceLast(int id)
id
- the block IDpublic boolean shouldPlaceLast()
public static boolean shouldPlaceFinal(int id)
id
- the type ID of the blockpublic static boolean canPassThrough(int id)
id
- the ID of the blockpublic static boolean canPassThrough(int id, int data)
id
- the ID of the blockdata
- the data value of the blockpublic static boolean canPassThrough(BaseBlock block)
block
- the blockpublic boolean canPassThrough()
public static double centralTopLimit(int id, int data)
id
- the block IDdata
- the block data valuepublic static double centralTopLimit(BaseBlock block)
block
- the blockpublic double centralTopLimit()
public static boolean usesData(int id)
id
- the type IDpublic boolean usesData()
public static boolean isContainerBlock(int id)
id
- the block IDpublic boolean isContainerBlock()
public static boolean isRedstoneBlock(int id)
id
- the type ID of the blockpublic boolean isRedstoneBlock()
public static boolean canTransferRedstone(int id)
This was made since isRedstoneBlock
was getting big.
id
- the type ID of the blockpublic boolean canTransferRedstone()
This was made since isRedstoneBlock
was getting big.
public static boolean isRedstoneSource(int id)
id
- the type ID of the blockpublic boolean isRedstoneSource()
public static boolean isRailBlock(int id)
id
- the type ID of the blockpublic boolean isRailBlock()
@Deprecated public static boolean isNaturalTerrainBlock(int id)
isNaturalTerrainBlock(int, int)
id
- the type ID of the blockpublic static boolean isNaturalTerrainBlock(int id, int data)
id
- the type ID of the blockdata
- data value of the blockpublic static boolean isNaturalTerrainBlock(BaseBlock block)
block
- the blockpublic boolean isNaturalTerrainBlock()
public static boolean emitsLight(int id)
id
- the type ID of the blockpublic static boolean isTranslucent(int id)
id
- the type ID of the block@Nullable public static BaseItem getBlockBagItem(int type, int data)
type
- the type of of the blockdata
- the data value of the block@Deprecated public static int getDroppedBlock(int id)
id
- the type ID of the blockpublic BaseItemStack getBlockDrop(short data)
data
- the data value@Nullable public static BaseItemStack getBlockDrop(int id, short data)
id
- the type ID of the blockdata
- the data valuepublic static PlayerDirection getAttachment(int type, int data)
type
- the block id of block Adata
- the data value of block A