/// Returns the texture ID for the given side of this block.
///
/// Texture IDs start at zero, in the upper left corner of
/// the texture atlas.
/// They increase from left to right across the atlas.
/// At the end of a row, they wrap onto the next "line".
Returns the texture ID for the given side of this block.
Texture IDs start at zero, in the upper left corner of
the texture atlas.
They increase from left to right across the atlas.
At the end of a row, they wrap onto the next "line".
Returns the texture ID for the given side of this block . Texture IDs start at zero in the upper left corner of the texture atlas . They increase from left to right across the atlas . At the end of a row they wrap onto the next " line " .
pub fn texture_id(self, side: Side) -> BlockTextureID {
        use Block::*;
        use Side::*;
        match (self, side) {
            // Air has no texture, and the renderer is broken if it's asking for one.
            (Air, _) => unreachable!(),
            (TestBlock, _) => 16,
            (Stone, _) => 0,
            (Soil, _) => 1,
            (Grass, Top) => 2,
            (Grass, Bottom) => 1,
            (Grass, _) => 3,
        }
    }
pub fn texture_id ( self , side : Side ) -> BlockTextureID { use Block :: * ; use Side :: * ; match ( self , side ) { // Air has no texture, and the renderer is broken if it's asking for one. ( Air , _ ) => unreachable ! ( ) , ( TestBlock , _ ) => 16 , ( Stone , _ ) => 0 , ( Soil , _ ) => 1 , ( Grass , Top ) => 2 , ( Grass , Bottom ) => 1 , ( Grass , _ ) => 3 , } }
Returns the texture ID for the given side of this block.
Returns the texture ID for the given side of this block .
self
side
Side