classmembers¶
Submodule for ClassMember and ClassMemberBase.
Bases¶
block_base¶
Submodule for BlockBase.
- class lihzahrd.terraria.data.classmembers.block_base.BlockBase(*, frame: tuple[int, int] | None = None, shape: BlockShapeEnum = BlockShapeEnum.NORMAL, is_inactive: bool = False, paint: PaintEnum = PaintEnum.NONE, is_illuminant: bool = False, is_echo: bool = False)¶
The kind of Terraria block.
All blocks inherit from this; it’s a ClassMemberBase for members of
BlockEnum.It:
annotates the mandatory attributes that all blocks should have.
implements the
FrameImportantVariantsystem for the ClassInstance.
- Parameters:
frame – The
uvsprite coordinates of this block’s current animation frame, orNoneif the block is not frame important.shape – The shape the block has. Defaults to
BlockShapeEnum.NORMAL, which is the full block.is_inactive – Whether the block has been deactivated by an actuator or not.
paint – The paint that is applied to the block, or
Noneif no paint is applied.is_illuminant – Whether the block has had Illuminant Coating applied to it and is therefore always full bright.
is_echo – Whether the block has had Echo Coating applied to it and is therefore invisible.
- NAME: str¶
The default name of the ClassMember.
- COLOR: ColorRGB | None = None¶
The default color of the ClassMember.
- SOLID: bool = False¶
The default solidity of the ClassMember.
- TRANSPARENT: bool = False¶
The default transparency (lets light through) of the ClassMember.
- IS_STONE: bool = False¶
The default stone-ness of the ClassMember.
- IS_GRASS: bool = False¶
The default grass-ness of the ClassMember.
- EMIT_LIGHT_COLOR: ColorRGB | None = None¶
The default color of the light emitted by the ClassMember, if any.
- FRAMEIMPORTANT_VARIANTS: tuple[FrameImportantVariant, ...]¶
Ordered
tupleof allFrameImportantVariantpotentially applying to this tile, from the first to be tested, to the last.
- shape: BlockShapeEnum¶
The shape the block has.
- is_illuminant: bool¶
Whether the block has had Illuminant Coating applied to it and is therefore always full bright.
- property frame: tuple[int, int] | None¶
- Returns:
The
uvsprite coordinates of this block’s current animation frame, orNoneif the block is not frame important.
- property u: int | None¶
The
usprite coordinate of this block’s current animation frame, orNoneif the block is not frame important.
- property v: int | None¶
The
vsprite coordinate of this block’s current animation frame, orNoneif the block is not frame important.
- is_frameimportant() bool¶
- Returns:
Whether this ClassInstance is FrameImportant, determined by whether
_uand_vare set.
- name() str¶
- Returns:
The name of this ClassInstance.
- color() ColorRGB | None¶
- Returns:
The color of this ClassInstance.
- solid() bool¶
- Returns:
The solidity of this ClassInstance.
- transparent() bool¶
- Returns:
The transparency (lets light through) of the ClassInstance.
- is_stone() bool¶
- Returns:
The stone-ness of the ClassInstance.
- is_grass() bool¶
- Returns:
The grass-ness of the ClassInstance.
- emit_light_color() ColorRGB | None¶
- Returns:
The color of the light emitted by the ClassInstance, if any.
wall_base¶
Submodule for WallBase.
- class lihzahrd.terraria.data.classmembers.wall_base.WallBase(paint: PaintEnum = None, is_illuminant: bool = False, is_echo: bool = False)¶
The kind of Terraria wall.
All walls inherit from this; it’s a ClassMemberBase for members of
WallEnum.It:
annotates the mandatory attributes that all walls should have.
- Parameters:
paint – The paint that is applied to the wall, or
Noneif no paint is applied.is_illuminant – Whether the wall has had Illuminant Coating applied to it and is therefore always full bright.
is_echo – Whether the wall has had Echo Coating applied to it and is therefore invisible.
item_base¶
Submodule for ItemBase.
- class lihzahrd.terraria.data.classmembers.item_base.ItemBase(quantity: int = 1, prefix: type[PrefixBase] | None = None)¶
The kind of Terraria item.
All items inherit from this; it’s a ClassMemberBase for members of
ItemEnum.It:
annotates the mandatory attributes that all items should have.
defines the
__init__()method to create a ClassInstance.
- Parameters:
quantity – The amount of items in the stack.
prefix – The prefix of the items in the stack.
- prefix: type[PrefixBase] | None¶
The prefix of the items in the stack.
npc_base¶
Submodule for NPCBase.
- class lihzahrd.terraria.data.classmembers.npc_base.NPCBase(name: str, position: Coordinates[float], is_homeless: bool, home: Coordinates[int], is_town_npc: bool, flag_1: bool, flag_2: bool, flag_3: bool, flag_4: bool, flag_5: bool, flag_6: bool, flag_7: bool, variation_index: int | None, homeless_despawn: bool)¶
The kind of Terraria NPC.
All NPCs inherit from this; it’s a ClassMemberBase for members of
NPCEnum.It:
annotates the mandatory attributes that all NPCs should have.
- position: Coordinates[float]¶
The current position of the NPC.
- home: Coordinates[int]¶
The position of the last home of the NPC.
- is_town_npc: bool¶
Unknown. Determines whether
variation_indexis saved for this NPC.
prefix_base¶
Submodule for PrefixBase.
- class lihzahrd.terraria.data.classmembers.prefix_base.PrefixBase¶
The prefix.
All prefixes inherit from this one; it’s a ClassMemberBase for members of
PrefixEnum.It:
annotates the mandatory attributes that all prefixes should have.
- Raises:
NotImplementedError – If attempted to instantiate.
liquid_base¶
Submodule for LiquidBase.
- class lihzahrd.terraria.data.classmembers.liquid_base.LiquidBase(volume: int)¶
The kind of Terraria liquid.
All liquid inherit from this; it’s a ClassMemberBase for members of
LiquidEnum.It:
annotates the mandatory attributes that all liquids should have.
- Parameters:
volume – The volume of the liquid.
Members¶
blocks¶
Module for ClassMember of BlockEnum.
Note
This module was partially generated by lihzahrd._generate.terraria.tiles_generator.TilesGenerator.
Note
For brevity, only a single ClassMember is documented, as an example.
items¶
Module for ClassMember of ItemEnum.
Note
This module was partially generated by lihzahrd._generate.terraria.tiles_generator.TilesGenerator.
Note
For brevity, only a single ClassMember is documented, as an example.
npcs¶
Module for ClassMember of NPCEnum.
Note
This module was partially generated by lihzahrd._generate.terraria.tiles_generator.TilesGenerator.
Note
For brevity, only a single ClassMember is documented, as an example.
- class lihzahrd.terraria.data.classmembers.npcs.Merchant(name: str, position: Coordinates[float], is_homeless: bool, home: Coordinates[int], is_town_npc: bool, flag_1: bool, flag_2: bool, flag_3: bool, flag_4: bool, flag_5: bool, flag_6: bool, flag_7: bool, variation_index: int | None, homeless_despawn: bool)¶
The Merchant.
prefixes¶
Module for ClassMember of PrefixEnum.
Note
This module was partially generated by lihzahrd._generate.terraria.tiles_generator.TilesGenerator.
Note
For brevity, only a single ClassMember is documented, as an example.
walls¶
Module for ClassMember of WallEnum.
Note
This module was partially generated by lihzahrd._generate.terraria.tiles_generator.TilesGenerator.
Note
For brevity, only a single ClassMember is documented, as an example.
- class lihzahrd.terraria.data.classmembers.walls.StoneWall(paint: PaintEnum = None, is_illuminant: bool = False, is_echo: bool = False)¶
A Stone Wall.
liquids¶
Module for ClassMember of LiquidEnum.