lihzahrd.tiles

class lihzahrd.tiles.Shape

The shape of a block, given to it with an hammer.

The directions refer to the missing slope corner.

BOTTOM_LEFT_SLOPE = 5
BOTTOM_RIGHT_SLOPE = 4
HALF_TILE = 1
NORMAL = 0
TOP_LEFT_SLOPE = 3
TOP_RIGHT_SLOPE = 2
classmethod from_flags(flags2)
class lihzahrd.tiles.Wiring(red: bool = False, green: bool = False, blue: bool = False, yellow: bool = False, actuator: bool = False)

Wiring data for a certain tile.

classmethod _from_flags(flags21, flags22, flags23, flags31, flags35)
actuator

If there’s an Actuator in the tile.

blue

If there’s a blue Wire in the tile.

classmethod from_flags(flags2=None, flags3=None)
green

If there’s a green Wire in the tile.

red

If there’s a red Wire in the tile.

yellow

If there’s a yellow Wire in the tile.

class lihzahrd.tiles.FrameImportantData(frame_x, frame_y)

Frame data of FrameImportant blocks.

Some blocks share the same type and texture of other blocks (ex: banners), so they store some texture data inside the save file.

frame_x
frame_y
class lihzahrd.tiles.Block

A block that has been placed in the world.

frame

The framedata of the block, if present.

is_active

If the block is solid or can be passed through because of an Actuator.

is_echo

If the block had Echo Coating applied, and is invisible.

is_illuminant

If the block had Illuminant Coating applied, and is unaffected by lighting.

paint

The paint color of a block.

shape

The shape of the block, is changed with an hammer.

type

The type of the block (dirt, stone, …).

class lihzahrd.tiles.Wall

A wall that has been placed in the world.

is_echo

If the wall had Echo Coating applied, and is invisible.

is_illuminant

If the wall had Illuminant Coating applied, and is unaffected by lighting.

paint
type
class lihzahrd.tiles.Liquid(type_: lihzahrd.enums.liquidtype.LiquidType, volume: int = 255)

A liquid present in a tile.

type

The type of liquid present in the tile.

volume

The volume of liquid present in the tile.

0 means the tile has no liquid, while 255 means the tile is full of liquid.

Values over 255 aren’t supported.

class lihzahrd.tiles.Tile

A tile, composed by a block, a wall, a liquid and wires.

block
extra

A reference to the extra data of this tile, such as Chest or Sign data.

liquid
wall
wiring
class lihzahrd.tiles.TileMatrix

A huge matrix containing the tiles of a whole world.

_
_tiles
add_column()

Add a new column to the matrix.

e
i
l
s
property size

Return the size of the matrix as a pair of coordinates.

t