# lihzahrd.header

class lihzahrd.header.AnglerQuest(current_goal: AnglerQuestFish, completed_by: list[str])

  Information about today’s Angler’s quest.

  completed_by: list[str]

    A list of player names who completed the angler’s quest today.

  current_goal: AnglerQuestFish

    The fish currently requested by the angler.

class lihzahrd.header.AnglerQuestFish(*values)
  AMANITIA_FUNGIFIN = 25
  ANGELFISH = 26
  BATFISH = 0
  BLOODY_MANOWAR = 27
  BONEFISH = 28
  BUMBLEBEE_TUNA = 1
  BUNNYFISH = 29
  CAPN_TUNABEARD = 30
  CATFISH = 2
  CLOUDFISH = 3
  CLOWNFISH = 31
  CURSEDFISH = 4
  DEMONIC_HELLFISH = 32
  DERPFISH = 33
  DIRTFISH = 5
  DYNAMITE_FISH = 6
  EATER_OF_PLANKTON = 7
  FALLEN_STARFISH = 8
  FISHOTRON = 10
  FISHRON = 34
  GUIDE_VOODOO_FISH = 22
  HARPYFISH = 11
  HUNGERFISH = 12
  ICHORFISH = 13
  INFECTED_SCABBARDFISH = 35
  JEWELFISH = 14
  MIRAGE_FISH = 15
  MUDFISH = 36
  MUTANT_FLINXFIN = 16
  PENGFISH = 17
  PIXIEFISH = 18
  SCARAB_FISH = 39
  SCORPIO_FISH = 40
  SLIMEFISH = 37
  SPIDERFISH = 19
  THE_FISH_OF_CTHULHU = 9
  TROPICAL_BARRACUDA = 38
  TUNDRA_TROUT = 20
  UNICORN_FISH = 21
  UNKNOWN1 = 39
  WYVERNTAIL = 23
  ZOMBIE_FISH = 24

class lihzahrd.header.Backgrounds(underground_snow: int, underground_jungle: int, hell: int, forest: FourPartSplit, corruption: int, jungle: int, snow: int, hallow: int, crimson: int, desert: int, ocean: int, mushroom: int, underworld: int)

  The backgrounds of various world biomes.

class lihzahrd.header.BossesDefeated(eye_of_cthulhu: bool, eater_of_worlds: bool, skeletron: bool, queen_bee: bool, the_twins: bool, the_destroyer: bool, skeletron_prime: bool, any_mechnical_boss: bool, plantera: bool, golem: bool, king_slime: bool, goblin_army: bool, clown: bool, frost_moon: bool, pirates: bool, duke_fishron: bool, moon_lord: bool, pumpking: bool, mourning_wood: bool, ice_queen: bool, santa_nk1: bool, everscream: bool, martian_madness: bool, lunatic_cultist: bool, lunar_pillars: PillarsInfo, old_ones_army: OldOnesArmyTiers, empress_of_light: bool, queen_slime: bool, deerclops: bool)
  any_mechnical_boss: bool

    Appearently, there’s a different flag for beating any mechanical boss and a specific mechanical boss.

class lihzahrd.header.Clouds(bg_cloud: int, cloud_number: int, wind_speed: float)

  Information about… the clouds in the world?

class lihzahrd.header.Difficulty(*values)
  CLASSIC = 0
  EXPERT = 1
  JOURNEY = 3
  MASTER = 2

class lihzahrd.header.Events(blood_moon: bool, solar_eclipse: bool, invasion: Invasion, slime_rain: float, rain: Rain, party: Party, sandstorm: Sandstorm, lunar_events: LunarEvents, lantern_night: LanternNight)

  Information about the ongoing world events.

  blood_moon: bool

    If the current moon is a Blood Moon.

  invasion: Invasion

    Information about the currently ongoing invasion.

  lantern_night: LanternNight

    Information about the currently ongoing lantern night.

  lunar_events: LunarEvents

    Information about the currently ongoing Lunar Events.

  party: Party

    Information about the currently ongoing party.

  rain: Rain

    Information about the currently ongoing rain.

  sandstorm: Sandstorm

    Information about the currently ongoing sandstorm.

  slime_rain: float

    How long the slime rain will go on for.

  solar_eclipse: bool

    If the current day is a Solar Eclipse.

class lihzahrd.header.FourPartSplit(separators: list[int], properties: list)

  A world property split in four parts, separated by three vertical lines at a certain x coordinate.

  property far_left
  property far_right
  get_property_at_x(x: int)
  property nearby_left
  property nearby_right
  properties: list

    The four properties, in order:

    - The far left property, the one between the left world edge and the first separator.

    - The nearby left property, between the first and the second separator.

    - The nearby right property, between the second and the third separator.

    - The far right property, between the third separator and the right world edge.

  separators: list[int]

    The three x coordinates of the vertical separators, in increasing order.

class lihzahrd.header.GeneratorInfo(seed, version)

  Information about the world generator.

  seed

    The seed this world was generated with.

  version

    The version of the generator that created this world.

class lihzahrd.header.Invasion(delay: int, size: int, type_: InvasionType, position: float, size_start: int)

  Invasions (goblin army, pirates, martian madness…) related information.

  type: InvasionType

    The type of the current invasion (goblin army / pirates / martian madness…).

    If InvasionType.NONE, no invasion will be active in the world.

class lihzahrd.header.InvasionType(*values)
  FROST_LEGION = 2
  GOBLIN_INVASION = 1
  MARTIAN_MADNESS = 4
  NONE = 0
  PIRATE_INVASION = 3

class lihzahrd.header.LanternNight(nights_on_cooldown: int, genuine: bool, manual: bool, next_night_is_lantern_night: bool)

  Lantern Night event related information.

  genuine: bool

    Was this night started by the game spontaneously?

  property is_active
  manual: bool

    Was this night started by the player?

  next_night_is_lantern_night: bool

    Was a boss just defeated, making the next night a Lantern Night?

  nights_on_cooldown: int

    How many nights before the next lantern night can happen.

class lihzahrd.header.LunarEvents(are_active: bool, pillars_present: PillarsInfo)

  Lunar Events (Lunar Pillars) related information.

  are_active: bool

    If the Lunar Events are active or not.

  pillars_present: PillarsInfo

    Which pillars are currently present in the world.

class lihzahrd.header.MoonPhase(*values)
  FIRST_QUARTER = 6
  FULL_MOON = 0
  NEW_MOON = 4
  THIRD_QUARTER = 2
  WANING_CRESCENT = 3
  WANING_GIBBOUS = 1
  WAXING_CRESCENT = 5
  WAXING_GIBBOUS = 7

class lihzahrd.header.MoonStyle(*values)

  All possible moon styles.

  BLUE = 3
  GREEN = 5
  ICE = 4
  ORANGE = 1
  PINK = 6
  PINK_ORANGE = 7
  RINGED_GREEN = 2
  TRIPLE_PURPLE = 8
  WHITE = 0

class lihzahrd.header.OldOnesArmyTiers(tier1, tier2, tier3)

class lihzahrd.header.Party(is_doomed: bool, thrown_by_party_center: bool, thrown_by_npcs: bool, cooldown: int, partying_npcs: list[int])

  NPC Party related information.

  cooldown: int

    How long a party cannot be started for.

  property is_active
  is_doomed: bool

    If all NPCs will die after this party ends.

  partying_npcs: list[int]

    The list of NPC IDs that threw the party.

  thrown_by_npcs: bool

    If the item was spontaneously thrown by NPCs.

  thrown_by_party_center: bool

    If the party was started by right-clicking a Party Center.

class lihzahrd.header.Pets(cat: bool, dog: bool, bunny: bool)

  Information about the Pet Licenses that were activated in the world.

  bunny: float

    //terraria.gamepedia.com/Bunny_License) ever activated?

    Type:

      Was the Bunny License (https

  cat: bool

    //terraria.gamepedia.com/Cat_License) ever activated?

    Type:

      Was the Cat License (https

  dog: int

    //terraria.gamepedia.com/Dog_License) ever activated?

    Type:

      Was the Dog License (https

class lihzahrd.header.PillarsInfo(solar, vortex, nebula, stardust)

  A container for information associated with the Lunar Pillars.

class lihzahrd.header.Rain(is_active: bool, time_left: int, max_rain: float)

  Rain related information.

  is_active: bool

    If it is currently raining in the world.

  time_left: int

    How long it will continue to rain for.

class lihzahrd.header.Sandstorm(is_active: bool, time_left: int, severity: float, intended_severity: float)

  Sandstorm related information.

  is_active: bool

    If a sandstorm is currently ongoing in the desert.

  time_left: int

    How long the sandstorm will continue for.

class lihzahrd.header.SavedNPCs(goblin_tinkerer: bool, wizard: bool, mechanic: bool, angler: bool, stylist: bool, tax_collector: bool, bartender: bool, golfer: bool, advanced_combat: bool, slime_nerdy: bool, merchant: bool, demolitionist: bool, party_girl: bool, dye_trader: bool, truffle: bool, arms_dealer: bool, nurse: bool, princess: bool, advanced_combat_2: bool, peddlers_satchel: bool, slime_cool: bool, slime_elder: bool, slime_clumsy: bool, slime_diva: bool, slime_surly: bool, slime_mystic: bool, slime_squire: bool)

class lihzahrd.header.SavedOreTiers(tier_1: BlockType, tier_2: BlockType, tier_3: BlockType, tier_4: BlockType, hardmode_tier_1: BlockType | None, hardmode_tier_2: BlockType | None, hardmode_tier_3: BlockType | None)

  The types of ores that generated in the world.

  hardmode_tier_1: BlockType | None

    Cobalt or Palladium? None if it hasn’t been determined yet.

  hardmode_tier_2: BlockType | None

    Mythril or Orichalcum? None if it hasn’t been determined yet.

  hardmode_tier_3: BlockType | None

    Adamantite or Titanium? None if it hasn’t been determined yet.

  tier_1: BlockType

    Copper or Tin?

  tier_2: BlockType

    Iron or Lead?

  tier_3: BlockType

    Silver or Tungsten?

  tier_4: BlockType

    Gold or Platinum?

class lihzahrd.header.ShadowOrbs(smashed_at_least_once: bool, spawn_meteorite: bool, evil_boss_counter: int)

  Information related to the Shadow Orbs (or the Crimson Hearts) smashed in the world.

  evil_boss_counter: int

    If it is 2, the Eater of Worlds will spawn when a Shadow Orb is smashed.

    It is the number of Shadow Orbs broken, modulo 3.

  smashed_at_least_once: bool

    If a Shadow Orb has ever been smashed in this world.

  spawn_meteorite: bool

    If a Meteorite should land in the world at midnight.

    It is set to True when a Shadow Orb is smashed, then it is set to False when the meteorite actually lands.

class lihzahrd.header.Styles(moon: MoonStyle, trees: FourPartSplit, moss: FourPartSplit)

  The styles of various world elements.

class lihzahrd.header.Time(current: float, is_daytime: bool, moon_phase: int, sundial_cooldown: int, sundial_is_running: bool, moondial_cooldown: int, moondial_is_running: bool)

  Game time related information.

  current: float

    The current game time.

  is_daytime: bool

    If the current time represents a day or a night.

  moon_phase: int

    The current moon phase.

  moondial_cooldown: int

    The number of days the Enchanted Moondial can’t be used for.

  moondial_is_running: bool

    Whether the Enchanted Moondial is currently fast-forwarding time.

  sundial_cooldown: int

    The number of days the Enchanted Sundial can’t be used for.

  sundial_is_running: bool

    Whether the Enchanted Sundial is currently fast-forwarding time.

class lihzahrd.header.TreetopVariants(treetop_variants: list[int])

  (Unknown) Information about the treetop variants in the world.

class lihzahrd.header.Version(data: int | str)

  A Terraria version.

  _version_ids = {12: '1.0.5', 20: '1.0.6', 22: '1.0.6.1', 37: '1.1.1', 39: '1.1.2', 67: '1.2', 71: '1.2.0.3.1', 72: '1.2.1.1', 73: '1.2.1.2', 77: '1.2.2', 94: '1.2.3.1', 101: '1.2.4', 102: '1.2.4.1', 140: '1.3.0.1', 146: '1.3.0.1', 147: '1.3.0.2', 149: '1.3.0.3', 151: '1.3.0.4', 153: '1.3.0.5', 154: '1.3.0.6', 155: '1.3.0.7', 156: '1.3.0.8', 168: '1.3.1', 169: '1.3.1.1', 170: '1.3.2', 173: '1.3.2.1', 174: '1.3.3', 175: '1.3.3.1', 176: '1.3.3.2', 177: '1.3.3.3', 178: '1.3.4', 185: '1.3.4.1', 186: '1.3.4.2', 187: '1.3.4.3', 188: '1.3.4.4', 191: '1.3.5', 192: '1.3.5.1', 193: '1.3.5.2', 194: '1.3.5.3', 225: '1.4.0.1', 226: '1.4.0.2', 227: '1.4.0.3', 228: '1.4.0.4', 230: '1.4.0.5', 238: '1.4.2.3', 274: '1.4.4.5', 278: '1.4.4.8', 279: '1.4.4.9'}
  id
  property name

class lihzahrd.header.WorldEvilType(*values)
  CORRUPTION = False
  CRIMSON = True