Block

Enum Block 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum Block {
Show 34 variants Air = 0, Grass = 1, Dirt = 2, Stone = 3, Wood = 4, Leaf = 5, Lava = 6, IronOre = 7, DeadlyOre = 8, Chest = 9, MidnightGrass = 10, MidnightSoil = 11, MidnightStone = 12, MidnightWood = 13, MidnightLeaf = 14, Bush = 15, MidnightBush = 16, RedFlower = 17, WhiteFlower = 18, BlueFlower = 19, TallGrass = 20, Sand = 21, Sandstone = 22, Cactus = 23, Snow = 24, Ice = 25, SnowyBush = 26, Glass = 27, SolenoidOre = 28, SnowyLeaf = 29, Pumpkin = 30, JackOLantern = 31, Barrier = 32, ChunkBorder = 33,
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Air = 0

Air.

§

Grass = 1

Grass – a generic block of soil with green grass on top, used as the floor for most of the world.

§

Dirt = 2

Dirt – a generic block of soil which can be found under Grass.

§

Stone = 3

Stone – a generic block of (cobbled) stone which can be found under Dirt.

§

Wood = 4

Wood – a generic block to be used as a tree-trunk in non-Midnight biomes.

§

Leaf = 5

§

Lava = 6

Lava – a (purely decorative) placeholder block found at the bottom of the world.

§

IronOre = 7

§

DeadlyOre = 8

Deadly Ore – a glowing ore which produces the most valuable resource, Deadly Bars.

§

Chest = 9

Chest – a block that can store items.

§

MidnightGrass = 10

Midnight Grass – the Midnight biome’s variant of Block::Grass.

§

MidnightSoil = 11

§

MidnightStone = 12

§

MidnightWood = 13

§

MidnightLeaf = 14

§

Bush = 15

§

MidnightBush = 16

§

RedFlower = 17

A generic red flower.

§

WhiteFlower = 18

A generic white flower.

§

BlueFlower = 19

A generic blue flower.

§

TallGrass = 20

§

Sand = 21

Sand – a generic block of sand, used as the floor for the Desert biome.

§

Sandstone = 22

Sandstone – a generic block of (cobbled) sandstone which can be found under Sand.

§

Cactus = 23

§

Snow = 24

§

Ice = 25

§

SnowyBush = 26

Snowy Bush – the Snow biome’s variant of Block::Bush.

§

Glass = 27

Glass – a generic, see-through, block of glass crafted from Sand and Wood.

§

SolenoidOre = 28

§

SnowyLeaf = 29

§

Pumpkin = 30

Pumpkin – a naturally, but infrequently, occurring block in grasslands.

§

JackOLantern = 31

§

Barrier = 32

Barrier – a special block which, presumably, represents an impassible block

§

ChunkBorder = 33

A special block which represents the border of a chunk.

Implementations§

Source§

impl Block

Source

pub const fn as_str(&self) -> &'static str

Trait Implementations§

Source§

impl Clone for Block

Source§

fn clone(&self) -> Block

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Collectable for Block

Source§

fn name(&self) -> &str

Source§

fn typ(&self) -> CollectableType

Source§

impl Debug for Block

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Block

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Block

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Block

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
Source§

impl Hash for Block

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Into<u8> for Block

Source§

fn into(self) -> u8

Converts this type into the (usually inferred) input type.
Source§

impl PartialEq<Block> for u8

Source§

fn eq(&self, other: &Block) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u8> for Block

Source§

fn eq(&self, other: &u8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Block

Source§

fn eq(&self, other: &Block) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Block

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for Block

Source§

impl Eq for Block

Source§

impl StructuralPartialEq for Block

Auto Trait Implementations§

§

impl Freeze for Block

§

impl RefUnwindSafe for Block

§

impl Send for Block

§

impl Sync for Block

§

impl Unpin for Block

§

impl UnwindSafe for Block

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,