pub struct Block(/* private fields */);Expand description
A 1.8 block type (registry id 0..=197).
Implementations§
Source§impl Block
Block constants.
impl Block
Block constants.
Sourcepub const COBBLESTONE: Self
pub const COBBLESTONE: Self
cobblestone (Cobblestone).
Sourcepub const FLOWING_WATER: Self
pub const FLOWING_WATER: Self
flowing_water (Water).
Sourcepub const FLOWING_LAVA: Self
pub const FLOWING_LAVA: Self
flowing_lava (Lava).
Sourcepub const LAPIS_BLOCK: Self
pub const LAPIS_BLOCK: Self
lapis_block (Lapis Lazuli Block).
Sourcepub const GOLDEN_RAIL: Self
pub const GOLDEN_RAIL: Self
golden_rail (Powered Rail).
Sourcepub const DETECTOR_RAIL: Self
pub const DETECTOR_RAIL: Self
detector_rail (Detector Rail).
Sourcepub const STICKY_PISTON: Self
pub const STICKY_PISTON: Self
sticky_piston (Sticky Piston).
Sourcepub const PISTON_HEAD: Self
pub const PISTON_HEAD: Self
piston_head (Piston Head).
Sourcepub const PISTON_EXTENSION: Self
pub const PISTON_EXTENSION: Self
piston_extension (Block moved by Piston).
Sourcepub const YELLOW_FLOWER: Self
pub const YELLOW_FLOWER: Self
yellow_flower (Dandelion).
Sourcepub const RED_FLOWER: Self
pub const RED_FLOWER: Self
red_flower (Poppy).
Sourcepub const BROWN_MUSHROOM: Self
pub const BROWN_MUSHROOM: Self
brown_mushroom (Brown Mushroom).
Sourcepub const RED_MUSHROOM: Self
pub const RED_MUSHROOM: Self
red_mushroom (Red Mushroom).
Sourcepub const GOLD_BLOCK: Self
pub const GOLD_BLOCK: Self
gold_block (Block of Gold).
Sourcepub const IRON_BLOCK: Self
pub const IRON_BLOCK: Self
iron_block (Block of Iron).
Sourcepub const DOUBLE_STONE_SLAB: Self
pub const DOUBLE_STONE_SLAB: Self
double_stone_slab (Double Stone Slab).
Sourcepub const STONE_SLAB: Self
pub const STONE_SLAB: Self
stone_slab (Stone Slab).
Sourcepub const BRICK_BLOCK: Self
pub const BRICK_BLOCK: Self
brick_block (Bricks).
Sourcepub const MOSSY_COBBLESTONE: Self
pub const MOSSY_COBBLESTONE: Self
mossy_cobblestone (Moss Stone).
Sourcepub const MOB_SPAWNER: Self
pub const MOB_SPAWNER: Self
mob_spawner (Monster Spawner).
Sourcepub const OAK_STAIRS: Self
pub const OAK_STAIRS: Self
oak_stairs (Oak Wood Stairs).
Sourcepub const REDSTONE_WIRE: Self
pub const REDSTONE_WIRE: Self
redstone_wire (Redstone Wire).
Sourcepub const DIAMOND_ORE: Self
pub const DIAMOND_ORE: Self
diamond_ore (Diamond Ore).
Sourcepub const DIAMOND_BLOCK: Self
pub const DIAMOND_BLOCK: Self
diamond_block (Block of Diamond).
Sourcepub const CRAFTING_TABLE: Self
pub const CRAFTING_TABLE: Self
crafting_table (Crafting Table).
Sourcepub const LIT_FURNACE: Self
pub const LIT_FURNACE: Self
lit_furnace (Burning Furnace).
Sourcepub const STANDING_SIGN: Self
pub const STANDING_SIGN: Self
standing_sign (Standing Sign).
Sourcepub const WOODEN_DOOR: Self
pub const WOODEN_DOOR: Self
wooden_door (Oak Door).
Sourcepub const STONE_STAIRS: Self
pub const STONE_STAIRS: Self
stone_stairs (Cobblestone Stairs).
Sourcepub const STONE_PRESSURE_PLATE: Self
pub const STONE_PRESSURE_PLATE: Self
stone_pressure_plate (Stone Pressure Plate).
Sourcepub const WOODEN_PRESSURE_PLATE: Self
pub const WOODEN_PRESSURE_PLATE: Self
wooden_pressure_plate (Wooden Pressure Plate).
Sourcepub const REDSTONE_ORE: Self
pub const REDSTONE_ORE: Self
redstone_ore (Redstone Ore).
Sourcepub const LIT_REDSTONE_ORE: Self
pub const LIT_REDSTONE_ORE: Self
lit_redstone_ore (Glowing Redstone Ore).
Sourcepub const UNLIT_REDSTONE_TORCH: Self
pub const UNLIT_REDSTONE_TORCH: Self
unlit_redstone_torch (Redstone Torch (inactive)).
Sourcepub const REDSTONE_TORCH: Self
pub const REDSTONE_TORCH: Self
redstone_torch (Redstone Torch (active)).
Sourcepub const STONE_BUTTON: Self
pub const STONE_BUTTON: Self
stone_button (Stone Button).
Sourcepub const SNOW_LAYER: Self
pub const SNOW_LAYER: Self
snow_layer (Snow (layer)).
Sourcepub const NETHERRACK: Self
pub const NETHERRACK: Self
netherrack (Netherrack).
Sourcepub const LIT_PUMPKIN: Self
pub const LIT_PUMPKIN: Self
lit_pumpkin (Jack o’Lantern).
Sourcepub const UNPOWERED_REPEATER: Self
pub const UNPOWERED_REPEATER: Self
unpowered_repeater (Redstone Repeater (inactive)).
Sourcepub const POWERED_REPEATER: Self
pub const POWERED_REPEATER: Self
powered_repeater (Redstone Repeater (active)).
Sourcepub const STAINED_GLASS: Self
pub const STAINED_GLASS: Self
stained_glass (Stained Glass).
Sourcepub const MONSTER_EGG: Self
pub const MONSTER_EGG: Self
monster_egg (Monster Egg).
Sourcepub const STONEBRICK: Self
pub const STONEBRICK: Self
stonebrick (Stone Bricks).
Sourcepub const BROWN_MUSHROOM_BLOCK: Self
pub const BROWN_MUSHROOM_BLOCK: Self
brown_mushroom_block (Brown Mushroom (block)).
Sourcepub const RED_MUSHROOM_BLOCK: Self
pub const RED_MUSHROOM_BLOCK: Self
red_mushroom_block (Red Mushroom (block)).
Sourcepub const GLASS_PANE: Self
pub const GLASS_PANE: Self
glass_pane (Glass Pane).
Sourcepub const MELON_BLOCK: Self
pub const MELON_BLOCK: Self
melon_block (Melon).
Sourcepub const PUMPKIN_STEM: Self
pub const PUMPKIN_STEM: Self
pumpkin_stem (Pumpkin Stem).
Sourcepub const MELON_STEM: Self
pub const MELON_STEM: Self
melon_stem (Melon Stem).
Sourcepub const FENCE_GATE: Self
pub const FENCE_GATE: Self
fence_gate (Fence Gate).
Sourcepub const BRICK_STAIRS: Self
pub const BRICK_STAIRS: Self
brick_stairs (Brick Stairs).
Sourcepub const STONE_BRICK_STAIRS: Self
pub const STONE_BRICK_STAIRS: Self
stone_brick_stairs (Stone Brick Stairs).
Sourcepub const NETHER_BRICK: Self
pub const NETHER_BRICK: Self
nether_brick (Nether Brick).
Sourcepub const NETHER_BRICK_FENCE: Self
pub const NETHER_BRICK_FENCE: Self
nether_brick_fence (Nether Brick Fence).
Sourcepub const NETHER_BRICK_STAIRS: Self
pub const NETHER_BRICK_STAIRS: Self
nether_brick_stairs (Nether Brick Stairs).
Sourcepub const NETHER_WART: Self
pub const NETHER_WART: Self
nether_wart (Nether Wart).
Sourcepub const ENCHANTING_TABLE: Self
pub const ENCHANTING_TABLE: Self
enchanting_table (Enchantment Table).
Sourcepub const BREWING_STAND: Self
pub const BREWING_STAND: Self
brewing_stand (Brewing Stand).
Sourcepub const END_PORTAL: Self
pub const END_PORTAL: Self
end_portal (End Portal).
Sourcepub const END_PORTAL_FRAME: Self
pub const END_PORTAL_FRAME: Self
end_portal_frame (End Portal Block).
Sourcepub const DRAGON_EGG: Self
pub const DRAGON_EGG: Self
dragon_egg (Dragon Egg).
Sourcepub const REDSTONE_LAMP: Self
pub const REDSTONE_LAMP: Self
redstone_lamp (Redstone Lamp (inactive)).
Sourcepub const LIT_REDSTONE_LAMP: Self
pub const LIT_REDSTONE_LAMP: Self
lit_redstone_lamp (Redstone Lamp (active)).
Sourcepub const DOUBLE_WOODEN_SLAB: Self
pub const DOUBLE_WOODEN_SLAB: Self
double_wooden_slab (Double Wooden Slab).
Sourcepub const WOODEN_SLAB: Self
pub const WOODEN_SLAB: Self
wooden_slab (Wooden Slab).
Sourcepub const SANDSTONE_STAIRS: Self
pub const SANDSTONE_STAIRS: Self
sandstone_stairs (Sandstone Stairs).
Sourcepub const EMERALD_ORE: Self
pub const EMERALD_ORE: Self
emerald_ore (Emerald Ore).
Sourcepub const ENDER_CHEST: Self
pub const ENDER_CHEST: Self
ender_chest (Ender Chest).
Sourcepub const TRIPWIRE_HOOK: Self
pub const TRIPWIRE_HOOK: Self
tripwire_hook (Tripwire Hook).
Sourcepub const EMERALD_BLOCK: Self
pub const EMERALD_BLOCK: Self
emerald_block (Block of Emerald).
Sourcepub const SPRUCE_STAIRS: Self
pub const SPRUCE_STAIRS: Self
spruce_stairs (Spruce Wood Stairs).
Sourcepub const BIRCH_STAIRS: Self
pub const BIRCH_STAIRS: Self
birch_stairs (Birch Wood Stairs).
Sourcepub const JUNGLE_STAIRS: Self
pub const JUNGLE_STAIRS: Self
jungle_stairs (Jungle Wood Stairs).
Sourcepub const COMMAND_BLOCK: Self
pub const COMMAND_BLOCK: Self
command_block (Command Block).
Sourcepub const COBBLESTONE_WALL: Self
pub const COBBLESTONE_WALL: Self
cobblestone_wall (Cobblestone Wall).
Sourcepub const FLOWER_POT: Self
pub const FLOWER_POT: Self
flower_pot (Flower Pot).
Sourcepub const WOODEN_BUTTON: Self
pub const WOODEN_BUTTON: Self
wooden_button (Wooden Button).
Sourcepub const TRAPPED_CHEST: Self
pub const TRAPPED_CHEST: Self
trapped_chest (Trapped Chest).
Sourcepub const LIGHT_WEIGHTED_PRESSURE_PLATE: Self
pub const LIGHT_WEIGHTED_PRESSURE_PLATE: Self
light_weighted_pressure_plate (Weighted Pressure Plate (Light)).
Sourcepub const HEAVY_WEIGHTED_PRESSURE_PLATE: Self
pub const HEAVY_WEIGHTED_PRESSURE_PLATE: Self
heavy_weighted_pressure_plate (Weighted Pressure Plate (Heavy)).
Sourcepub const UNPOWERED_COMPARATOR: Self
pub const UNPOWERED_COMPARATOR: Self
unpowered_comparator (Redstone Comparator).
Sourcepub const POWERED_COMPARATOR: Self
pub const POWERED_COMPARATOR: Self
powered_comparator (Redstone Comparator (deprecated)).
Sourcepub const DAYLIGHT_DETECTOR: Self
pub const DAYLIGHT_DETECTOR: Self
daylight_detector (Daylight Sensor).
Sourcepub const REDSTONE_BLOCK: Self
pub const REDSTONE_BLOCK: Self
redstone_block (Block of Redstone).
Sourcepub const QUARTZ_ORE: Self
pub const QUARTZ_ORE: Self
quartz_ore (Nether Quartz Ore).
Sourcepub const QUARTZ_BLOCK: Self
pub const QUARTZ_BLOCK: Self
quartz_block (Block of Quartz).
Sourcepub const QUARTZ_STAIRS: Self
pub const QUARTZ_STAIRS: Self
quartz_stairs (Quartz Stairs).
Sourcepub const ACTIVATOR_RAIL: Self
pub const ACTIVATOR_RAIL: Self
activator_rail (Activator Rail).
Sourcepub const STAINED_HARDENED_CLAY: Self
pub const STAINED_HARDENED_CLAY: Self
stained_hardened_clay (Stained Clay).
Sourcepub const STAINED_GLASS_PANE: Self
pub const STAINED_GLASS_PANE: Self
stained_glass_pane (Stained Glass Pane).
Sourcepub const ACACIA_STAIRS: Self
pub const ACACIA_STAIRS: Self
acacia_stairs (Acacia Wood Stairs).
Sourcepub const DARK_OAK_STAIRS: Self
pub const DARK_OAK_STAIRS: Self
dark_oak_stairs (Dark Oak Wood Stairs).
Sourcepub const IRON_TRAPDOOR: Self
pub const IRON_TRAPDOOR: Self
iron_trapdoor (Iron Trapdoor).
Sourcepub const PRISMARINE: Self
pub const PRISMARINE: Self
prismarine (Prismarine).
Sourcepub const SEA_LANTERN: Self
pub const SEA_LANTERN: Self
sea_lantern (Sea Lantern).
Sourcepub const HARDENED_CLAY: Self
pub const HARDENED_CLAY: Self
hardened_clay (Hardened Clay).
Sourcepub const COAL_BLOCK: Self
pub const COAL_BLOCK: Self
coal_block (Block of Coal).
Sourcepub const PACKED_ICE: Self
pub const PACKED_ICE: Self
packed_ice (Packed Ice).
Sourcepub const DOUBLE_PLANT: Self
pub const DOUBLE_PLANT: Self
double_plant (Large Flowers).
Sourcepub const STANDING_BANNER: Self
pub const STANDING_BANNER: Self
standing_banner (Standing Banner).
Sourcepub const WALL_BANNER: Self
pub const WALL_BANNER: Self
wall_banner (Wall Banner).
Sourcepub const DAYLIGHT_DETECTOR_INVERTED: Self
pub const DAYLIGHT_DETECTOR_INVERTED: Self
daylight_detector_inverted (Inverted Daylight Sensor).
Sourcepub const RED_SANDSTONE: Self
pub const RED_SANDSTONE: Self
red_sandstone (Red Sandstone).
Sourcepub const RED_SANDSTONE_STAIRS: Self
pub const RED_SANDSTONE_STAIRS: Self
red_sandstone_stairs (Red Sandstone Stairs).
Sourcepub const DOUBLE_STONE_SLAB2: Self
pub const DOUBLE_STONE_SLAB2: Self
double_stone_slab2 (Double Red Sandstone Slab).
Sourcepub const STONE_SLAB2: Self
pub const STONE_SLAB2: Self
stone_slab2 (Red Sandstone Slab).
Sourcepub const SPRUCE_FENCE_GATE: Self
pub const SPRUCE_FENCE_GATE: Self
spruce_fence_gate (Spruce Fence Gate).
Sourcepub const BIRCH_FENCE_GATE: Self
pub const BIRCH_FENCE_GATE: Self
birch_fence_gate (Birch Fence Gate).
Sourcepub const JUNGLE_FENCE_GATE: Self
pub const JUNGLE_FENCE_GATE: Self
jungle_fence_gate (Jungle Fence Gate).
Sourcepub const DARK_OAK_FENCE_GATE: Self
pub const DARK_OAK_FENCE_GATE: Self
dark_oak_fence_gate (Dark Oak Fence Gate).
Sourcepub const ACACIA_FENCE_GATE: Self
pub const ACACIA_FENCE_GATE: Self
acacia_fence_gate (Acacia Fence Gate).
Sourcepub const SPRUCE_FENCE: Self
pub const SPRUCE_FENCE: Self
spruce_fence (Spruce Fence).
Sourcepub const BIRCH_FENCE: Self
pub const BIRCH_FENCE: Self
birch_fence (Birch Fence).
Sourcepub const JUNGLE_FENCE: Self
pub const JUNGLE_FENCE: Self
jungle_fence (Jungle Fence).
Sourcepub const DARK_OAK_FENCE: Self
pub const DARK_OAK_FENCE: Self
dark_oak_fence (Dark Oak Fence).
Sourcepub const ACACIA_FENCE: Self
pub const ACACIA_FENCE: Self
acacia_fence (Acacia Fence).
Sourcepub const SPRUCE_DOOR: Self
pub const SPRUCE_DOOR: Self
spruce_door (Spruce Door).
Sourcepub const BIRCH_DOOR: Self
pub const BIRCH_DOOR: Self
birch_door (Birch Door).
Sourcepub const JUNGLE_DOOR: Self
pub const JUNGLE_DOOR: Self
jungle_door (Jungle Door).
Sourcepub const ACACIA_DOOR: Self
pub const ACACIA_DOOR: Self
acacia_door (Acacia Door).
Sourcepub const DARK_OAK_DOOR: Self
pub const DARK_OAK_DOOR: Self
dark_oak_door (Dark Oak Door).
Source§impl Block
impl Block
Sourcepub const fn from_id(id: u8) -> Option<Block>
pub const fn from_id(id: u8) -> Option<Block>
The block with this registry id, if it exists in 1.8.
Sourcepub fn from_name(name: &str) -> Option<Block>
pub fn from_name(name: &str) -> Option<Block>
Looks a block up by registry name ("stone", no namespace).
Sourcepub fn physics(self) -> &'static BlockPhysics
pub fn physics(self) -> &'static BlockPhysics
Physics properties (slipperiness, climbable, …).
Sourcepub fn vanilla(self) -> &'static VanillaProps
pub fn vanilla(self) -> &'static VanillaProps
Vanilla 1.8.9 shape and material flags.
Sourcepub fn shape_dependency(self) -> ShapeDependency
pub fn shape_dependency(self) -> ShapeDependency
What the collision shape depends on besides (id, meta).
Sourcepub const fn with_meta(self, meta: u8) -> BlockState
pub const fn with_meta(self, meta: u8) -> BlockState
The state with this metadata (meta & 15).
Sourcepub const fn default_state(self) -> BlockState
pub const fn default_state(self) -> BlockState
The state with metadata 0.
Sourcepub fn all() -> impl ExactSizeIterator<Item = Block>
pub fn all() -> impl ExactSizeIterator<Item = Block>
All blocks in id order.