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(type_: lihzahrd.enums.blocktype.BlockType, shape: lihzahrd.tiles.shape.Shape = <Shape.NORMAL: 0>, frame: Optional[lihzahrd.tiles.frameimportantdata.FrameImportantData] = None, paint: Optional[int] = None, is_active: bool = True)

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.

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(type_: lihzahrd.enums.walltype.WallType, paint: Optional[int] = None)

A wall that has been placed in the world.

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(block: Optional[lihzahrd.tiles.block.Block] = None, wall: Optional[lihzahrd.tiles.wall.Wall] = None, liquid: Optional[lihzahrd.tiles.liquid.Liquid] = None, wiring: Optional[lihzahrd.tiles.wiring.Wiring] = None, extra: Union[lihzahrd.chests.chest.Chest, lihzahrd.signs.sign.Sign, lihzahrd.pressureplates.weighedpressureplate.WeighedPressurePlate, lihzahrd.tileentities.tileentity.TileEntity, None] = None)

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