header

Module with structures used to process the world metadata header.

world_header

Submodule containing WorldHeader.

class lihzahrd.terraria.world.header.world_header.WorldHeader(*args: Pack)

Bases: PackComposite

PackComposite to process all metadata contained inside a Terraria world’s header.

name: Field[Self, WorldName]

The name of the world.

generator_seed: Field[Self, WorldGeneratorSeed]

The seed used to generate the world.

generator_version: Field[Self, WorldGeneratorVersion]

The version of the used world generator.

uuid: Field[Self, PackUUID]

The UUID of the world.

id: Field[Self, WorldID]

The ID of the world.

bounds: Field[Self, WorldBounds]

The camera bounds of the world.

size: Field[Self, WorldSize]

The size in tiles of the world.

difficulty: Field[Self, PackWorldDifficulty]

The difficulty of the world.

special_drunk: Field[Self, SpecialSeedActive]

If the world uses the special seed Drunk world.

special_fortheworthy: Field[Self, SpecialSeedActive]

If the world uses the special seed For the Worthy.

special_anniversary: Field[Self, SpecialSeedActive]

If the world uses the special seed 10th Anniversary.

special_dontstarve: Field[Self, SpecialSeedActive]

If the world uses the special seed Don’t Starve.

special_notthebees: Field[Self, SpecialSeedActive]

If the world uses the special seed Not the bees.

special_remix: Field[Self, SpecialSeedActive]

If the world uses the special seed Remix.

special_notraps: Field[Self, SpecialSeedActive]

If the world uses the special seed No traps.

special_zenith: Field[Self, SpecialSeedActive]

If the world uses the special seed Zenith.

special_skyblock: Field[Self, SpecialSeedActive]

If the world uses the special seed Skyblock.

created_on: Field[Self, PackDatetime]

The timestamp of when the world was generated.

last_saved_on: Field[Self, PackDatetime]

The timestamp of when the world was last saved.

moon_style: Field[Self, MoonStyle]

The style of the moon in the world.

forest_boundary_a_b: Field[Self, WorldStyleBoundary]

The vertical boundary separating the forest styles A and B.

forest_boundary_b_c: Field[Self, WorldStyleBoundary]

The vertical boundary separating the forest styles B and C.

forest_boundary_c_d: Field[Self, WorldStyleBoundary]

The vertical boundary separating the forest styles C and D.

forest_treetop_a: Field[Self, ForestTreetop]

The treetop style that the trees in the forest area A have.

forest_treetop_b: Field[Self, ForestTreetop]

The treetop style that the trees in the forest area B have.

forest_treetop_c: Field[Self, ForestTreetop]

The treetop style that the trees in the forest area C have.

forest_treetop_d: Field[Self, ForestTreetop]

The treetop style that the trees in the forest area D have.

cavern_boundary_a_b: Field[Self, WorldStyleBoundary]

The vertical boundary separating the cavern styles A and B.

cavern_boundary_b_c: Field[Self, WorldStyleBoundary]

The vertical boundary separating the cavern styles B and C.

cavern_boundary_c_d: Field[Self, WorldStyleBoundary]

The vertical boundary separating the cavern styles C and D.

cavern_background_a: Field[Self, CavernBackground]

The treetop style that the trees in the cavern area A have.

cavern_background_b: Field[Self, CavernBackground]

The treetop style that the trees in the cavern area B have.

cavern_background_c: Field[Self, CavernBackground]

The treetop style that the trees in the cavern area C have.

cavern_background_d: Field[Self, CavernBackground]

The treetop style that the trees in the cavern area D have.

ice_background: Field[Self, IceBackground]

The background of the underground ice biome.

jungle_underground_background: Field[Self, JungleUndergroundBackground]

The background of the underground jungle biome.

hell_background: Field[Self, HellBackground]

The background of the hell biome.

point_spawn: Field[Self, PackCoordinatesInt]

The spawn point of the world.

underground_surface_boundary: Field[Self, WorldLayerBoundary]

The horizontal boundary separating surface from underground.

cavern_underground_boundary: Field[Self, WorldLayerBoundary]

The horizontal boundary separating underground from cavern.

clock_time: Field[Self, Clock]

The current clock time of the world.

day_time: Field[Self, Daytime]

Whether it’s day or night in the world.

moon_phase: Field[Self, MoonPhase]

The current moon phase of the world.

bloodmoon_ongoing: Field[Self, EventOngoing]

Whether a blood moon is currently ongoing in the world.

eclipse_ongoing: Field[Self, EventOngoing]

Whether a solar eclipse is currently ongoing in the world.

point_dungeon: Field[Self, PackCoordinatesInt]

The spawn point of the Old Man.

evil: Field[Self, WorldEvil]

The main evil of the world: Corruption or Crimson.

defeated_eyeofcthulhu: Field[Self, EnemyDefeated]

Whether the Eye of Cthulhu was defeated at least once in the world.

defeated_eaterofworlds: Field[Self, EnemyDefeated]

Whether the Eater of Worlds was defeated at least once in the world.

defeated_skeletron: Field[Self, EnemyDefeated]

Whether Skeletron was defeated at least once in the world.

defeated_queenbee: Field[Self, EnemyDefeated]

Whether the Queen Bee was defeated at least once in the world.

defeated_thetwins: Field[Self, EnemyDefeated]

Whether The Twins were defeated at least once in the world.

defeated_thedestroyer: Field[Self, EnemyDefeated]

Whether The Destroyer was defeated at least once in the world.

defeated_skeletronprime: Field[Self, EnemyDefeated]

Whether Skeletron Prime was defeated at least once in the world.

defeated_anymechanicalboss: Field[Self, EnemyDefeated]

Whether any mechanical boss was defeated at least once in the world.

defeated_plantera: Field[Self, EnemyDefeated]

Whether Plantera was defeated at least once in the world.

defeated_golem: Field[Self, EnemyDefeated]

Whether the Golem was defeated at least once in the world.

defeated_kingslime: Field[Self, EnemyDefeated]

Whether King Slime was defeated at least once in the world.

rescued_goblin: Field[Self, NPCRescued]

Whether the Goblin Tinkerer NPC was rescued and can now arrive automatically.

rescued_wizard: Field[Self, NPCRescued]

Whether the Wizard NPC was rescued and can now arrive automatically.

rescued_mechanic: Field[Self, NPCRescued]

Whether the Mechanic NPC was rescued and can now arrive automatically.

defeated_goblinarmy: Field[Self, EnemyDefeated]

Whether the Goblin Army was repelled at least once in the world.

defeated_clown: Field[Self, EnemyDefeated]

Whether a Clown was defeated at least once in the world.

defeated_frostlegion: Field[Self, EnemyDefeated]

Whether the Frost Legion was repelled at least once in the world.

defeated_pirateinvasion: Field[Self, EnemyDefeated]

Whether the Pirate Invasion was repelled at least once in the world.

shadoworb_smashed: Field[Self, Milestone]

Whether a Shadow Orb was smashed at least once in the world.

meteorite_scheduled: Field[Self, EventOngoing]

Whether a meteorite is schedule to land as soon as possible.

shadoworb_count: Field[Self, ShadowOrbCount]

How many shadow orbs or crimson hearts were broken in the world, and how many are left to summon the World Evil boss.

altar_count: Field[Self, AltarCount]

How many demon or crimson altars were smashed in the world.

mode: Field[Self, WorldMode]

The current world mode, either pre-hardmode or hardmode.

party_doomed: Field[Self, EventOngoing]

Whether all NPCs should die and be un-rescued when the current party ends.

invasion_delay: Field[Self, InvasionDelay]

Unknown.

invasion_power_left: Field[Self, InvasionPower]

How many enemies still need to be defeated to repel the current invasion.

invasion_kind: Field[Self, InvasionKind]

The kind of the current invasion.

invasion_position: Field[Self, InvasionPosition]

The position of the current invasion.

slimerain_duration: Field[Self, SlimeRainDuration]

How long the current Slime Rain will last for.

sundial_cooldown: Field[Self, TimedialCooldown]

How much the Sundial is on cooldown for.

rain_ongoing: Field[Self, EventOngoing]

Whether it is raining or not.

rain_duration: Field[Self, RainDuration]

How much it will still rain for.

rain_strength: Field[Self, RainStrength]

How strong is the current rain.

ore_cobalt_tier: Field[Self, OreAvailable]

The first tier of hardmode ore selected to spawn in the world: either Cobalt or Palladium.

ore_mythril_tier: Field[Self, OreAvailable]

The second tier of hardmode ore selected to spawn in the world: either Mythril or Orichalcum.

ore_adamantite_tier: Field[Self, OreAvailable]

The third tier of hardmode ore selected to spawn in the world: either Adamantite or Titanium.

forest_background_a: Field[Self, ForestBackground]

The background of the forest biome in the forest area A.

corruption_background: Field[Self, CorruptionBackground]

The background of the corruption biome.

jungle_surface_background: Field[Self, JungleSurfaceBackground]

The background of the surface jungle biome.

snow_background: Field[Self, SnowBackground]

The background of the surface snow biome.

hallow_background: Field[Self, HallowBackground]

The background of the hallow biome.

crimson_background: Field[Self, CrimsonBackground]

The background of the crimson biome.

desert_background: Field[Self, DesertBackground]

The background of the desert biome.

ocean_background: Field[Self, OceanBackground]

The background of the ocean biome.

cloud_background_active: Field[Self, CloudBackgroundActive]

Unknown.

cloud_count: Field[Self, CloudCount]

Unknown.

wind_speed: Field[Self, WindSpeed]

The current wind speed and direction.

fishingquest_completed_by: Field[Self, FishingQuestCompletedBy]

Which players have completed the current fishing quest.

rescued_angler: Field[Self, NPCRescued]

Whether the Angler NPC was rescued and can now arrive automatically.

fishingquest_goal: Field[Self, FishingQuestGoal]

The current goal of the fishing quest.

rescued_stylist: Field[Self, NPCRescued]

Whether the Stylist NPC was rescued and can now arrive automatically.

rescued_taxcollector: Field[Self, NPCRescued]

Whether the Tax Collector NPC was rescued and can now arrive automatically.

rescued_golfer: Field[Self, NPCRescued]

Whether the Golfer NPC was rescued and can now arrive automatically.

invasion_power_total: Field[Self, InvasionPower]

The total amount of enemies to defeat to repel the current invasion.

The value of invasion_power_left at the start of the current invasion.

cultists_cooldown: Field[Self, CultistsCooldown]

Unknown.

banner_kill_counts: Field[Self, BannerKillCounts]

How many enemies of each type were killed, for banner drop purposes.

banner_claimable_counts: Field[Self, BannerClaimableCounts]

How many banners of each enemy type can be claimed at the moment.

sundial_running: Field[Self, TimedialRunning]

Whether the Sundial is currently running.

defeated_dukefishron: Field[Self, EnemyDefeated]

Whether Duke Fishron was defeated at least once in the world.

defeated_martianmadness: Field[Self, EnemyDefeated]

Whether the Martian Madness was repelled at least once in the world.

defeated_lunaticcultist: Field[Self, EnemyDefeated]

Whether the Lunatic Cultist was defeated at least once in the world.

defeated_moonlord: Field[Self, EnemyDefeated]

Whether Moon Lord was defeated at least once in the world.

defeated_pumpking: Field[Self, EnemyDefeated]

Whether Pumpking was defeated at least once in the world.

defeated_mourningwood: Field[Self, EnemyDefeated]

Whether Mourning Wood was defeated at least once in the world.

defeated_icequeen: Field[Self, EnemyDefeated]

Whether Ice Queen was defeated at least once in the world.

defeated_santank1: Field[Self, EnemyDefeated]

Whether Santa-NK1 was defeated at least once in the world.

defeated_everscream: Field[Self, EnemyDefeated]

Whether Everscream was defeated at least once in the world.

defeated_pillar_solar: Field[Self, EnemyDefeated]

Whether the Solar Pillar was defeated at least once in the world.

defeated_pillar_vortex: Field[Self, EnemyDefeated]

Whether the Vortex Pillar was defeated at least once in the world.

defeated_pillar_nebula: Field[Self, EnemyDefeated]

Whether the Nebula Pillar was defeated at least once in the world.

defeated_pillar_stardust: Field[Self, EnemyDefeated]

Whether the Stardust Pillar was defeated at least once in the world.

pillar_solar_present: Field[Self, EventOngoing]

Whether the Solar Pillar is currently present in the world.

pillar_vortex_present: Field[Self, EventOngoing]

Whether the Vortex Pillar is currently present in the world.

pillar_nebula_present: Field[Self, EventOngoing]

Whether the Nebula Pillar is currently present in the world.

pillar_stardust_present: Field[Self, EventOngoing]

Whether the Stardust Pillar is currently present in the world.

impendingdoom_approaching: Field[Self, EventOngoing]

Whether Moon Lord is about to spawn.

party_center_active: Field[Self, PartyCenterActive]

Whether the Party Center is active.

party_spontaneous_active: Field[Self, PartySpontaneousActive]

Whether a naturally-occurring party is ongoing.

party_spontaneous_cooldown: Field[Self, PartySpontaneousCooldown]

How much time has to pass before another naturally-occurring party can occur.

party_partecipants: Field[Self, PartyPartecipants]

Which NPCs are partecipating in the party.

sandstorm_ongoing: Field[Self, EventOngoing]

Whether a sandstorm is currently ongoing.

sandstorm_duration: Field[Self, SandstormDuration]

How long the currently ongoing sandstorm will last for.

sandstorm_severity_current: Field[Self, SandstormSeverity]

Unknown.

sandstorm_severity_target: Field[Self, SandstormSeverity]

Unknown.

rescued_bartender: Field[Self, NPCRescued]

Whether the Bartender NPC was rescued and can now arrive automatically.

defeated_oldonesarmy_a: Field[Self, EnemyDefeated]

Whether the first tier of the Old One’s Army was repelled at least once in the world.

defeated_oldonesarmy_b: Field[Self, EnemyDefeated]

Whether the second tier of the Old One’s Army was repelled at least once in the world.

defeated_oldonesarmy_c: Field[Self, EnemyDefeated]

Whether the third tier of the Old One’s Army was repelled at least once in the world.

mushroom_background: Field[Self, MushroomBackground]

The background of the glowing mushroom biome.

underworld_background: Field[Self, UnderworldBackground]

The background of the underworld biome.

forest_background_b: Field[Self, ForestBackground]

The background of the forest biome in the forest area B.

forest_background_c: Field[Self, ForestBackground]

The background of the forest biome in the forest area C.

forest_background_d: Field[Self, ForestBackground]

The background of the forest biome in the forest area D.

used_advancedcombattechniques_1: Field[Self, Milestone]

Whether Advanced Combat Techniques was used in the world.

lanternnight_spontaneous_cooldown: Field[Self, LanternNightSpontaneousCooldown]

How much time must pass before a new Lantern Night can spontaneously start again (if Moon Lord is defeated).

lanternnight_spontaneous_active: Field[Self, LanternNightSpontaneousActive]

Whether a (spontaneous) Lantern Night is ongoing or not.

lanternnight_celebration_active: Field[Self, LanternNightCelebrationActive]

Whether a celebratory (boss defeated) Lantern Night is ongoing.

lanternnight_celebration_scheduled: Field[Self, LanternNightCelebrationScheduled]

Whether a celebratory (boss defeated) Lantern Night will start at the next night.

treetops: Field[Self, Treetops]

The treetops in the world’s various biomes.

halloween_ongoing: Field[Self, EventOngoing]

Whether it’s Halloween for the next day.

christmas_ongoing: Field[Self, EventOngoing]

Whether it’s Christmas for the next day.

ore_copper_tier: Field[Self, OreAvailable]

The first tier of pre-hardmode ore selected to spawn in the world: either Copper or Tin.

ore_iron_tier: Field[Self, OreAvailable]

The first tier of pre-hardmode ore selected to spawn in the world: either Iron or Lead.

ore_silver_tier: Field[Self, OreAvailable]

The first tier of pre-hardmode ore selected to spawn in the world: either Silver or Tungsten.

ore_gold_tier: Field[Self, OreAvailable]

The first tier of pre-hardmode ore selected to spawn in the world: either Gold or Platinum.

bought_cat: Field[Self, NPCRescued]

Whether the Cat NPC was bought and can now arrive automatically.

bought_dog: Field[Self, NPCRescued]

Whether the Dog NPC was bought and can now arrive automatically.

bought_bunny: Field[Self, NPCRescued]

Whether the Bunny NPC was bought and can now arrive automatically.

defeated_empressoflight: Field[Self, EnemyDefeated]

Whether the Empress of Light was defeated at least once in the world.

defeated_queenslime: Field[Self, EnemyDefeated]

Whether Queen Slime was defeated at least once in the world.

defeated_deerclops: Field[Self, EnemyDefeated]

Whether Deerclops was defeated at least once in the world.

unlocked_slime_nerdy: Field[Self, NPCRescued]

Whether the Nerdy Slime NPC was unlocked and can now arrive automatically.

unlocked_merchant: Field[Self, NPCRescued]

Whether the Merchant NPC was unlocked and can now arrive automatically.

unlocked_demolitionist: Field[Self, NPCRescued]

Whether the Demolitionist NPC was unlocked and can now arrive automatically.

unlocked_partygirl: Field[Self, NPCRescued]

Whether the Party Girl NPC was unlocked and can now arrive automatically.

unlocked_dyetrader: Field[Self, NPCRescued]

Whether the Dye Trader NPC was unlocked and can now arrive automatically.

unlocked_truffle: Field[Self, NPCRescued]

Whether the Truffle NPC was unlocked and can now arrive automatically.

unlocked_armsdealer: Field[Self, NPCRescued]

Whether the Arms Dealer NPC was unlocked and can now arrive automatically.

unlocked_nurse: Field[Self, NPCRescued]

Whether the Nurse NPC was unlocked and can now arrive automatically.

unlocked_princess: Field[Self, NPCRescued]

Whether the Princess NPC was unlocked and can now arrive automatically.

used_advancedcombattechniques_2: Field[Self, Milestone]

Whether Advanced Combat Techniques: Volume Two was used in the world.

used_peddlerssatchel: Field[Self, Milestone]

Whether the Peddler’s Satchel was used in the world.

unlocked_slime_cool: Field[Self, NPCRescued]

Whether the Cool Slime NPC was unlocked and can now arrive automatically.

unlocked_slime_elder: Field[Self, NPCRescued]

Whether the Elder Slime NPC was unlocked and can now arrive automatically.

unlocked_slime_clumsy: Field[Self, NPCRescued]

Whether the Clumsy Slime NPC was unlocked and can now arrive automatically.

unlocked_slime_diva: Field[Self, NPCRescued]

Whether the Diva Slime NPC was unlocked and can now arrive automatically.

unlocked_slime_surly: Field[Self, NPCRescued]

Whether the Surly Slime NPC was unlocked and can now arrive automatically.

unlocked_slime_mystic: Field[Self, NPCRescued]

Whether the Mystic Slime NPC was unlocked and can now arrive automatically.

unlocked_slime_squire: Field[Self, NPCRescued]

Whether the Squire Slime NPC was unlocked and can now arrive automatically.

moondial_running: Field[Self, TimedialRunning]

Whether the Moondial is currently running.

moondial_cooldown: Field[Self, TimedialCooldown]

How much the Moondial is on cooldown for.

secret_halloween: Field[Self, SecretSeedActive]

If the world uses the secret seed Hocus Pocus.

secret_christmas: Field[Self, SecretSeedActive]

If the world uses the secret seed Jingle All The Way.

secret_vampirism: Field[Self, SecretSeedActive]

If the world uses the secret seed Vampirism.

secret_purification: Field[Self, SecretSeedActive]

If the world uses the secret seed Purify This.

meteorshower_remaining: Field[Self, MeteorShowerRemaining]

How many meteors are left in the Meteor Shower.

coinrain_remaining: Field[Self, CoinRainRemaining]

Total value of the coins that are left in the Coin Rain.

secret_teams: Field[Self, SecretSeedActive]

If the world uses the secret seed Royale With Cheese.

secret_teams_spawns: Field[Self, SecretTeamsSpawns]

The spawn points for the secret seed Royale With Cheese.

secret_dualdungeons: Field[Self, SecretSeedActive]

If the world uses the secret seed Dual Dungeons.

manifest: Field[Self, WorldManifest]

Unknown.

bosses() list[EnemyDefeated]
Returns:

The list of EnemyDefeated flags for all bosses in the game.

world_name

class lihzahrd.terraria.world.header.world_name.WorldName(value: Value)

Bases: OpCollection[str], PackStrVariable

The name of a Terraria world.

exception NameTooLongError(value: Value)

Bases: ValidationError

The name of the world surpasses in length the maximum length that the Terraria game client allows to enter.

VALUE_LEN_MAX = 27

Maximum length of the world name.

world_generator_seed

class lihzahrd.terraria.world.header.world_generator_seed.WorldGeneratorSeed(value: Value)

Bases: OpCollection[str], PackStrVariable

The seed used to randomize the generator used to generate a Terraria world.

world_generator_version

class lihzahrd.terraria.world.header.world_generator_version.WorldGeneratorVersion(value: Value)

Bases: OpInteger[int], PackULong

The version of the generator used to generate a Terraria world.

world_id

class lihzahrd.terraria.world.header.world_id.WorldID(value: Value)

Bases: PackInt

The (regular) ID of a Terraria world, used to name the corresponding map file.

world_bounds

class lihzahrd.terraria.world.header.world_bounds.WorldBounds(value: Value)

Bases: PackRectangleInt

Camera bounds of the world.

world_size

class lihzahrd.terraria.world.header.world_size.WorldSize(value: Value)

Bases: OpEquality[Coordinates], PackCoordinatesInt

The size of a Terraria world, in tiles.

Note

For some reason, y is serialized before x.

This is not an error.

SMALL = Coordinates(x=4200, y=1200)

Size of a small world.

MEDIUM = Coordinates(x=6400, y=1800)

Size of a medium world.

LARGE = Coordinates(x=8400, y=2400)

Size of a large world.

is_small() bool
Returns:

Whether the world’s size matches the size of a small world exactly.

is_medium() bool
Returns:

Whether the world’s size matches the size of a medium world exactly.

is_large() bool
Returns:

Whether the world’s size matches the size of a large world exactly.

set_small() None

Set value to the size of a small world.

set_medium() None

Set value to the size of a medium world.

set_large() None

Set value to the size of a large world.

world_difficulty

class lihzahrd.terraria.world.header.world_difficulty.WorldDifficulty(*values)

Bases: IntEnum

The difficulties a world can be in.

CLASSIC = 0

Classic mode, or Expert in For The Worthy.

EXPERT = 1

Expert mode, or Master in For The Worthy.

MASTER = 2

Master mode, or Legendary in For The Worthy.

JOURNEY = 3

Journey mode.

class lihzahrd.terraria.world.header.world_difficulty.PackWorldDifficulty(value: Value)

Bases: PackEnum[WorldDifficulty, int], PackInt

The base difficulty a Terraria world is set to.

Note

Having the “For The Worthy” special world seed increases the difficulty by one tier, and this class does not take that into account.

ENUM

alias of WorldDifficulty

special_seed_active

class lihzahrd.terraria.world.header.special_seed_active.SpecialSeedActive(value: Value)

Bases: OpBoolean[bool], PackBool

A flag denoting whether a world is running a special world seed.

As of 1.4.5.4, special world seeds are:

  • Drunk world

  • For the worthy

  • 10th Anniversary

  • Don’t Starve

  • Not the bees

  • Remix

  • No traps

  • Zenith

  • Skyblock

moon_style

class lihzahrd.terraria.world.header.moon_style.MoonStyleEnum(*values)

Bases: IntEnum

Possible moon styles.

WHITE = 0

White moon.

https://terraria.wiki.gg/images/Moon.png
YELLOW = 1

Yellow moon.

https://terraria.wiki.gg/images/Moon_style_1.png
RINGED = 2

Green ringed moon.

https://terraria.wiki.gg/images/Moon_style_2.png
MYTHRIL = 3

Mythil moon.

https://terraria.wiki.gg/images/Moon_style_3.png
BLUE = 4

Bright blue moon.

https://terraria.wiki.gg/images/Moon_style_4.png
GREEN = 5

Green moon.

https://terraria.wiki.gg/images/Moon_style_5.png
PINK = 6

Pink moon.

https://terraria.wiki.gg/images/Moon_style_6.png
ORANGE = 7

Orange moon.

https://terraria.wiki.gg/images/Moon_style_7.png
PURPLE = 8

Purple moon.

https://terraria.wiki.gg/images/Moon_style_8.png
class lihzahrd.terraria.world.header.moon_style.MoonStyle(value: Value)

Bases: PackEnum[MoonStyleEnum, int], PackByte

The style of the moon of a Terraria world.

ENUM

alias of MoonStyleEnum

world_style_boundary

class lihzahrd.terraria.world.header.world_style_boundary.WorldStyleBoundary(value: Value)

Bases: OpInteger[int], PackInt

The horizontal tile coordinate at which something changes style.

Might be forest trees and background, or cavern background.

forest_treetop

class lihzahrd.terraria.world.header.forest_treetop.ForestTreetopEnum(*values)

Bases: IntEnum

Possible treetops for the forest biome.

TREE_0 = 0
https://terraria.wiki.gg/images/Treetop_Forest_1.png
TREE_1 = 1
https://terraria.wiki.gg/images/Treetop_Forest_Alt1_1.png
TREE_2 = 2
https://terraria.wiki.gg/images/Treetop_Forest_Alt2_1.png
TREE_3 = 3
https://terraria.wiki.gg/images/Treetop_Forest_Alt3_1.png
TREE_4 = 4
https://terraria.wiki.gg/images/Treetop_Forest_Alt4_1.png
TREE_5 = 5
https://terraria.wiki.gg/images/Treetop_Forest_Alt5_1.png
class lihzahrd.terraria.world.header.forest_treetop.ForestTreetop(value: Value)

Bases: PackEnum[ForestTreetopEnum, int], PackInt

The style of the forest trees in a segment of a Terraria world.

ENUM

alias of ForestTreetopEnum

cavern_background

class lihzahrd.terraria.world.header.cavern_background.CavernBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the cavern biome.

CAVERN_0 = 0

Unknown.

CAVERN_1 = 1

Unknown.

CAVERN_2 = 2

Unknown.

CAVERN_3 = 3

Unknown.

CAVERN_4 = 4

Unknown.

CAVERN_5 = 5

Unknown.

CAVERN_6 = 6

Unknown.

CAVERN_7 = 7

Unknown.

class lihzahrd.terraria.world.header.cavern_background.CavernBackground(value: Value)

Bases: PackEnum[CavernBackgroundEnum, int], PackInt

The style of the cavern background in a segment of a Terraria world.

ENUM

alias of CavernBackgroundEnum

ice_background

class lihzahrd.terraria.world.header.ice_background.IceBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the ice biome.

ICE_0 = 0

Unknown.

ICE_1 = 1

Unknown.

ICE_2 = 2

Unknown.

ICE_3 = 3

Unknown.

class lihzahrd.terraria.world.header.ice_background.IceBackground(value: Value)

Bases: PackEnum[IceBackgroundEnum, int], PackInt

The style of the ice (underground snow) background in a Terraria world.

ENUM

alias of IceBackgroundEnum

jungle_underground_background

class lihzahrd.terraria.world.header.jungle_underground_background.JungleUndergroundBackground(value: Value)

Bases: PackEnum[JungleUndergroundBackgroundEnum, int], PackInt

The style of the underground jungle background in a segment of a Terraria world.

hell_background

class lihzahrd.terraria.world.header.hell_background.HellBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the hell biome.

HELL_0 = 0

Unknown.

HELL_1 = 1

Unknown.

HELL_2 = 2

Unknown.

class lihzahrd.terraria.world.header.hell_background.HellBackground(value: Value)

Bases: PackEnum[HellBackgroundEnum, int], PackInt

The style of the hell background in a Terraria world.

ENUM

alias of HellBackgroundEnum

world_layer_boundary

class lihzahrd.terraria.world.header.world_layer_boundary.WorldLayerBoundary(value: Value)

Bases: OpFloating[float], PackDouble

The vertical tile coordinate at which the active layer changes.

For example, the underground-cavern boundary.

clock

class lihzahrd.terraria.world.header.clock.Clock(value: Value)

Bases: OpFloating[float], PackDouble

The in-game time of the world, at the moment it was saved.

daytime

class lihzahrd.terraria.world.header.daytime.Daytime(value: Value)

Bases: PackBool

Whether it is daytime or nighttime in a Terraria world.

moon_phase

class lihzahrd.terraria.world.header.moon_phase.MoonPhaseEnum(*values)

Bases: IntEnum

Possible moon phases.

FULL = 0

Full Moon.

WANING_GIBBOUS = 1

Waning Gibbous Moon.

THIRD_QUARTER = 2

Third Quarter Moon.

WANING_CRESCENT = 3

Waning Crescent Moon.

NEW = 4

New Moon.

WAXING_CRESCENT = 5

Waxing Crescent Moon.

FIRST_QUARTER = 6

First Quarter Moon.

WAXING_GIBBOUS = 7

Waxing Gibbous Moon.

class lihzahrd.terraria.world.header.moon_phase.MoonPhase(value: Value)

Bases: PackEnum[MoonPhaseEnum, int], PackUInt

The phase of the moon in a Terraria world.

ENUM

alias of MoonPhaseEnum

event_ongoing

class lihzahrd.terraria.world.header.event_ongoing.EventOngoing(value: Value)

Bases: OpBoolean[bool], PackBool

A flag denoting whether an event is currently ongoing in the world or not.

world_evil

class lihzahrd.terraria.world.header.world_evil.WorldEvil(value: Value)

Bases: PackBool

The primary evil present in a Terraria world.

Either Corruption, or Crimson.

is_corruption() bool
Returns:

Whether the world has Corruption as main evil.

is_crimson() bool
Returns:

Whether the world has Crimson as main evil.

set_to_corruption() None

Set value to represent Corruption.

set_to_crimson() None

Set value to represent Crimson.

enemy_defeated

class lihzahrd.terraria.world.header.enemy_defeated.EnemyDefeated(value: Value)

Bases: Milestone

A flag denoting whether a certain enemy (tipically a boss) was defeated in a Terraria world.

npc_rescued

class lihzahrd.terraria.world.header.npc_rescued.NPCRescued(value: Value)

Bases: Milestone

A flag denoting whether a NPC was rescued in a Terraria world.

milestone

class lihzahrd.terraria.world.header.milestone.Milestone(value: Value)

Bases: OpBoolean[bool], PackBool

A flag denoting whether a certain thing was accomplished in a Terraria world.

shadow_orb_count

class lihzahrd.terraria.world.header.shadow_orb_count.ShadowOrbCount(value: Value)

Bases: OpInteger[int], PackByte

How many Shadow Orbs / Crimson Hearts have been smashed since the last time Eater of Worlds / Brain of Cthulhu was fought.

REQUIRED_FOR_BOSS = 3

How many shadow orbs need to be smashed to summon the World Evil boss in general.

remaining_before_boss()
Returns:

How many shadow orbs still need to be smashed to summon the World Evil boss in the current world.

exception UnexpectedOrbCountError(value: Value)

Bases: ValidationError

The number of smashed shadow orbs is unexpectedly out of range.

altar_count

class lihzahrd.terraria.world.header.altar_count.AltarCount(value: Value)

Bases: OpInteger[int], PackInt

How many altars have been smashed in the world so far.

next_ore_tier() Literal['cobalt_tier', 'mythril_tier', 'adamantite_tier']
Returns:

A string representing the ore tier that will be added to the world when an altar is broken.

world_mode

class lihzahrd.terraria.world.header.world_mode.WorldMode(value: Value)

Bases: OpBoolean[bool], PackBool

The current mode of a Terraria world.

Is it in Hardmode yet?

is_prehardmode() bool
Returns:

Whether the world has yet to enter hardmode.

is_hardmode() bool
Returns:

Whether the world has entered hardmode.

set_to_prehardmode() None

Set the world to pre-hardmode.

set_to_hardmode() None

Set the world to hardmode.

invasion_delay

class lihzahrd.terraria.world.header.invasion_delay.InvasionDelay(value: Value)

Bases: OpInteger[int], PackInt

Unknown.

invasion_power

class lihzahrd.terraria.world.header.invasion_power.InvasionPower(value: Value)

Bases: OpInteger[int], PackInt

How many enemies are in the invasion, either remaining or total.

invasion_kind

class lihzahrd.terraria.world.header.invasion_kind.InvasionKindEnum(*values)

Bases: IntEnum

Possible kinds of invasions.

NONE = 0

No invasion is currently ongoing.

GOBLIN = 1

A goblin army has arrived!

FROST = 2

The Frost Legion has arrived!

PIRATE = 3

The pirates have arrived!

MARTIAN = 4

Martians are invading!

class lihzahrd.terraria.world.header.invasion_kind.InvasionKind(value: Value)

Bases: PackEnum[InvasionKindEnum, int], PackInt

The kind of invasion that is currently ongoing.

ENUM

alias of InvasionKindEnum

invasion_position

class lihzahrd.terraria.world.header.invasion_position.InvasionPosition(value: Value)

Bases: OpFloating[float], PackDouble

The current horizontal position of an invasion.

Approaches the spawn point’s horizontal position at 60 tiles per second.

slimerain_duration

class lihzahrd.terraria.world.header.slimerain_duration.SlimeRainDuration(value: Value)

Bases: OpFloating[float], PackDouble

Unknown.

timedial_cooldown

class lihzahrd.terraria.world.header.timedial_cooldown.TimedialCooldown(value: Value)

Bases: OpInteger, PackByte

How many days a Sundial or Moondial is in cooldown for.

rain_duration

class lihzahrd.terraria.world.header.rain_duration.RainDuration(value: Value)

Bases: OpInteger[int], PackInt

Unknown.

rain_strength

class lihzahrd.terraria.world.header.rain_strength.RainStrength(value: Value)

Bases: OpFloating[float], PackFloat

Unknown.

ore_available

class lihzahrd.terraria.world.header.ore_available.OreAvailable(value: Value)

Bases: PackInt

The kind of ore that’s available in a Terraria world.

get_block() type[BlockBase] | None

Convert value into a block ClassMember.

Returns:

None if no ore has been selected yet or the block kind if it exists.

Raises:

ValueError – If no corresponding Tile exists.

set_from_block(block: type[BlockBase] | None) None

Set value from the given block ClassMember.

Parameters:

block – The kind of the block to set, or None to mark this as not selected yet.

exception UnknownOreError(value: Value)

Bases: ValidationError

The ore’s value does not correspond to any known tile ID, nor it represents an undetermined value.

forest_background

class lihzahrd.terraria.world.header.forest_background.ForestBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the forest biome.

FOREST_0 = 0

Unknown.

FOREST_1 = 1

Unknown.

FOREST_2 = 2

Unknown.

FOREST_3 = 3

Unknown.

FOREST_4 = 4

Unknown.

FOREST_5 = 5

Unknown.

FOREST_6 = 6

Unknown.

FOREST_7 = 7

Unknown.

FOREST_8 = 8

Unknown.

FOREST_9 = 9

Unknown.

FOREST_10 = 10

Unknown.

FOREST_11 = 11

Unknown.

FOREST_12 = 12

Unknown.

FOREST_13 = 13

Unknown.

FOREST_31 = 31

Unknown.

FOREST_51 = 51

Unknown.

FOREST_71 = 71

Unknown.

FOREST_72 = 72

Unknown.

FOREST_73 = 73

Unknown.

class lihzahrd.terraria.world.header.forest_background.ForestBackground(value: Value)

Bases: PackEnum[ForestBackgroundEnum, int], PackByte

The style of the forest background in a Terraria world.

ENUM

alias of ForestBackgroundEnum

corruption_background

class lihzahrd.terraria.world.header.corruption_background.CorruptionBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the corruption biome.

CORRUPTION_0 = 0

Unknown.

CORRUPTION_1 = 1

Unknown.

CORRUPTION_2 = 2

Unknown.

CORRUPTION_3 = 3

Unknown.

CORRUPTION_4 = 4

Unknown.

CORRUPTION_51 = 51

Unknown.

CORRUPTION_52 = 52

Unknown.

class lihzahrd.terraria.world.header.corruption_background.CorruptionBackground(value: Value)

Bases: PackEnum[CorruptionBackgroundEnum, int], PackByte

The style of the corruption background in a Terraria world.

ENUM

alias of CorruptionBackgroundEnum

jungle_surface_background

class lihzahrd.terraria.world.header.jungle_surface_background.JungleSurfaceBackground(value: Value)

Bases: PackByte

The style of the surface jungle background in a segment of a Terraria world.

Possible values are currently unknown.

snow_background

class lihzahrd.terraria.world.header.snow_background.SnowBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the snow biome.

SNOW_0 = 0

Unknown.

SNOW_1 = 1

Unknown.

SNOW_2 = 2

Unknown.

SNOW_3 = 3

Unknown.

SNOW_4 = 4

Unknown.

SNOW_5 = 5

Unknown.

SNOW_6 = 6

Unknown.

SNOW_7 = 7

Unknown.

SNOW_21 = 21

Unknown.

SNOW_22 = 22

Unknown.

SNOW_31 = 31

Unknown.

SNOW_32 = 32

Unknown.

SNOW_41 = 41

Unknown.

SNOW_42 = 42

Unknown.

class lihzahrd.terraria.world.header.snow_background.SnowBackground(value: Value)

Bases: PackEnum[SnowBackgroundEnum, int], PackByte

The style of the snow (surface ice) background in a Terraria world.

ENUM

alias of SnowBackgroundEnum

hallow_background

class lihzahrd.terraria.world.header.hallow_background.HallowBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the hallow biome.

HALLOW_0 = 0

Unknown.

HALLOW_1 = 1

Unknown.

HALLOW_2 = 2

Unknown.

HALLOW_3 = 3

Unknown.

HALLOW_4 = 4

Unknown.

class lihzahrd.terraria.world.header.hallow_background.HallowBackground(value: Value)

Bases: PackEnum[HallowBackgroundEnum, int], PackByte

The style of the hallow background in a Terraria world.

ENUM

alias of HallowBackgroundEnum

crimson_background

class lihzahrd.terraria.world.header.crimson_background.CrimsonBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the crimson biome.

CRIMSON_0 = 0

Unknown.

CRIMSON_1 = 1

Unknown.

CRIMSON_2 = 2

Unknown.

CRIMSON_3 = 3

Unknown.

CRIMSON_4 = 4

Unknown.

CRIMSON_5 = 4

Unknown.

class lihzahrd.terraria.world.header.crimson_background.CrimsonBackground(value: Value)

Bases: PackEnum[CrimsonBackgroundEnum, int], PackByte

The style of the crimson background in a Terraria world.

ENUM

alias of CrimsonBackgroundEnum

desert_background

class lihzahrd.terraria.world.header.desert_background.DesertBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the crimson biome.

DESERT_0 = 0

Unknown.

DESERT_1 = 1

Unknown.

DESERT_2 = 2

Unknown.

DESERT_3 = 3

Unknown.

DESERT_4 = 4

Unknown.

DESERT_51 = 51

Unknown.

DESERT_52 = 52

Unknown.

DESERT_53 = 53

Unknown.

class lihzahrd.terraria.world.header.desert_background.DesertBackground(value: Value)

Bases: PackEnum[DesertBackgroundEnum, int], PackByte

The style of the desert background in a Terraria world.

ENUM

alias of DesertBackgroundEnum

ocean_background

class lihzahrd.terraria.world.header.ocean_background.OceanBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the ocean biome.

OCEAN_0 = 0

Unknown.

OCEAN_1 = 1

Unknown.

OCEAN_2 = 2

Unknown.

OCEAN_3 = 3

Unknown.

OCEAN_4 = 4

Unknown.

OCEAN_5 = 5

Unknown.

OCEAN_6 = 6

Unknown.

OCEAN_7 = 7

Unknown.

class lihzahrd.terraria.world.header.ocean_background.OceanBackground(value: Value)

Bases: PackEnum[OceanBackgroundEnum, int], PackByte

The style of the ocean background in a Terraria world.

ENUM

alias of OceanBackgroundEnum

cloud_count

class lihzahrd.terraria.world.header.cloud_count.CloudCount(value: Value)

Bases: OpInteger[int], PackShort

Unknown.

wind_speed

class lihzahrd.terraria.world.header.wind_speed.WindSpeed(value: Value)

Bases: PackFloat

Unknown.

fishingquest_completedby

class lihzahrd.terraria.world.header.fishingquest_completedby.FishingQuestCompletedBy(value: Value)

Bases: PackPrimitive[list[str]]

List of names of the players who completed today’s Angler Fishing Quest.

exception ListOverflowError(value: Value)

Bases: ValidationError

The list contains more items than how many can possibly be represented.

fishingquest_goal

class lihzahrd.terraria.world.header.fishingquest_goal.FishingQuestGoalEnum(*values)

Bases: IntEnum

Possible fishing quest goals and their IDs.

BATFISH = 0

Batfish.

BUMBLEBEE_TUNA = 1

Bumblebee Tuna.

CATFISH = 2

Catfish.

CLOUDFISH = 3

Cloudfish.

CURSEDFISH = 4

Cursedfish.

DIRTFISH = 5

Dirtfish.

DYNAMITE_FISH = 6

Dynamite Fish.

EATER_OF_PLANKTON = 7

Eater of Plankton.

FALLEN_STARFISH = 8

Fallen Starfish.

THE_FISH_OF_CTHULHU = 9

The Fish of Cthulhu.

FISHOTRON = 10

Fishotron.

HARPYFISH = 11

Harpyfish.

HUNGERFISH = 12

Hungerfish.

ICHORFISH = 13

Ichorfish.

JEWELFISH = 14

Jewelfish.

MIRAGE_FISH = 15

Mirage Fish.

MUTANT_FLINXFIN = 16

Mutant Flinxfin.

PENGFISH = 17

Pengfish.

PIXIEFISH = 18

Pixiefish.

SPIDERFISH = 19

Spiderfish.

TUNDRA_TROUT = 20

Tundra Trout.

UNICORN_FISH = 21

Unicorn Fish.

GUIDE_VOODOO_FISH = 22

Guide Voodoo Fish.

WYVERNTAIL = 23

Wyverntail.

ZOMBIE_FISH = 24

Zombie Fish.

AMANITIA_FUNGIFIN = 25

Amanitia Fungifin.

ANGELFISH = 26

Angelfish.

BLOODY_MANOWAR = 27

Bloody Manowar.

BONEFISH = 28

Bonefish.

BUNNYFISH = 29

Bunnyfish.

CAPN_TUNABEAR = 30

Cap’n Tunabeard.

CLOWNFISH = 31

Clownfish.

DEMONIC_HELLFISH = 32

Demonic Hellfish.

DERPFISH = 33

Derpfish.

FISHRON = 34

Fishron.

INFECTED_SCABBARDFISH = 35

Infected Scabbardfish.

MUDFISH = 36

Mudfish.

SLIMEFISH = 37

Slimefish.

TROPICAL_BARRACUDA = 38

Tropical Barracuda.

class lihzahrd.terraria.world.header.fishingquest_goal.FishingQuestGoal(value: Value)

Bases: PackEnum[FishingQuestGoalEnum, int], PackInt

The fish that should be caught to complete today’s Angler Fishing Quest.

ENUM

alias of FishingQuestGoalEnum

QUEST_TO_ITEM: dict[FishingQuestGoalEnum, type[ItemBase]]

Mapping from FishingQuestGoalEnum to ClassMember.

ITEM_TO_QUEST: dict[type[ItemBase], FishingQuestGoalEnum]

Mapping from ClassMember to FishingQuestGoalEnum.

get_item() type[ItemBase]

Convert value into an item ClassMember.

Returns:

The item ClassMember.

Raises:

ValueError – If no corresponding item ClassMember exists.

set_from_item(item: type[ItemBase]) None

Set the value to the given item ClassMember.

Parameters:

item – The item ClassMember.

Raises:

ValueError – If no corresponding FishingQuestGoalEnum exists.

cloud_background_active

class lihzahrd.terraria.world.header.cloud_background_active.CloudBackgroundActive(value: Value)

Bases: PackInt

Unknown.

cultists_cooldown

class lihzahrd.terraria.world.header.cultists_cooldown.CultistsCooldown(value: Value)

Bases: OpInteger[int], PackInt

Unknown.

banner_kill_counts

class lihzahrd.terraria.world.header.banner_kill_counts.BannerKillCounts(value: Value)

Bases: PackPrimitive[list[int]]

Counts of enemies killed for banner purposes, by enemy ID.

exception UnknownListLengthError(value: Value)

Bases: ValidationError

The list contains more items than how many there usually are in a Terraria version.

exception OverflowError(value: Value)

Bases: ValidationError

At least one item in the list is out of representable range.

banner_claimable_counts

class lihzahrd.terraria.world.header.banner_claimable_counts.BannerClaimableCounts(value: Value)

Bases: PackPrimitive[list[int]]

Counts of claimable banners by enemy ID.

exception UnknownListLengthError(value: Value)

Bases: ValidationError

The list contains more items than how many there usually are in a Terraria version.

exception OverflowError(value: Value)

Bases: ValidationError

At least one item in the list is out of representable range.

timedial_running

class lihzahrd.terraria.world.header.timedial_running.TimedialRunning(value: Value)

Bases: OpBoolean[bool], PackBool

Whether the Sundial or Moondial is running or not.

party_center_active

class lihzahrd.terraria.world.header.party_center_active.PartyCenterActive(value: Value)

Bases: OpBoolean[bool], PackBool

Whether a Party Center is active or not.

party_spontaneous_active

class lihzahrd.terraria.world.header.party_spontaneous_active.PartySpontaneousActive(value: Value)

Bases: OpBoolean[bool], PackBool

Whether a (spontaneous) party is ongoing or not.

party_spontaneous_cooldown

class lihzahrd.terraria.world.header.party_spontaneous_cooldown.PartySpontaneousCooldown(value: Value)

Bases: OpInteger[int], PackInt

How much time must pass before a new party can spontaneously start again.

party_partecipants

class lihzahrd.terraria.world.header.party_partecipants.PartyPartecipants(value: Value)

Bases: PackPrimitive[list[int]]

NPC IDs of NPCs partecipating in the ongoing party.

get_npcs() list[type[NPCBase]]
Returns:

The list of NPC ClassMember corresponding to value.

Raises:

KeyError – If a NPC is not found.

set_from_npcs(value: Iterable[type[NPCBase]]) None
Parameters:

value – The list of NPC ClassMember to set value to.

exception ListOverflowError(value: Value)

Bases: ValidationError

The list contains more items than how many can possibly be represented.

exception UnknownNPCError(value: Value)

Bases: ValidationError

At least one value in the list does not correspond to a known NPC ID.

sandstorm_duration

class lihzahrd.terraria.world.header.sandstorm_duration.SandstormDuration(value: Value)

Bases: OpInteger[int], PackInt

Unknown.

sandstorm_severity

class lihzahrd.terraria.world.header.sandstorm_severity.SandstormSeverity(value: Value)

Bases: OpInteger[float], PackFloat

Unknown.

mushroom_background

class lihzahrd.terraria.world.header.mushroom_background.MushroomBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the glowing mushroom biome.

MUSHROOM_0 = 0

Unknown.

MUSHROOM_1 = 1

Unknown.

MUSHROOM_2 = 2

Unknown.

MUSHROOM_3 = 3

Unknown.

MUSHROOM_4 = 4

Unknown.

class lihzahrd.terraria.world.header.mushroom_background.MushroomBackground(value: Value)

Bases: PackEnum[MushroomBackgroundEnum, int], PackByte

The style of the mushroom background in a Terraria world.

ENUM

alias of MushroomBackgroundEnum

underworld_background

class lihzahrd.terraria.world.header.underworld_background.UnderworldBackgroundEnum(*values)

Bases: IntEnum

Possible backgrounds of the underworld biome.

UNDERWORLD_0 = 0

Unknown.

UNDERWORLD_1 = 1

Unknown.

UNDERWORLD_2 = 2

Unknown.

class lihzahrd.terraria.world.header.underworld_background.UnderworldBackground(value: Value)

Bases: PackEnum[UnderworldBackgroundEnum, int], PackByte

The style of the underworld background in a Terraria world.

ENUM

alias of UnderworldBackgroundEnum

lanternnight_spontaneous_cooldown

class lihzahrd.terraria.world.header.lanternnight_spontaneous_cooldown.LanternNightSpontaneousCooldown(value: Value)

Bases: OpInteger[int], PackInt

How much time must pass before a new Lantern Night can spontaneously start again (if Moon Lord is defeated).

lanternnight_spontaneous_active

class lihzahrd.terraria.world.header.lanternnight_spontaneous_active.LanternNightSpontaneousActive(value: Value)

Bases: EventOngoing

Whether a (spontaneous) Lantern Night is ongoing or not.

lanternnight_celebration_active

class lihzahrd.terraria.world.header.lanternnight_celebration_active.LanternNightCelebrationActive(value: Value)

Bases: EventOngoing

Whether a celebratory (boss defeated) Lantern Night is ongoing.

treetops

secret_seed_active

class lihzahrd.terraria.world.header.secret_seed_active.SecretSeedActive(value: Value)

Bases: OpBoolean[bool], PackBool

A flag denoting whether a world is running a secret world seed.

meteorshower_remaining

class lihzahrd.terraria.world.header.meteorshower_remaining.MeteorShowerRemaining(value: Value)

Bases: OpInteger[int], PackInt

How many meteors are left in the shower.

coinrain_remaining

class lihzahrd.terraria.world.header.coinrain_remaining.CoinRainRemaining(value: Value)

Bases: OpInteger[int], PackInt

Total value of the coins that are left in the Coin Rain.

secret_teams_spawns

class lihzahrd.terraria.world.header.secret_teams_spawns.SecretTeamsSpawns(value: Value)

Bases: PackPrimitive[list[Coordinates]]

Spawn points of the various teams in a Teams secret seed.

exception UnknownListLengthError(value: Value)

Bases: ValidationError

The list contains more items than how many there usually are in a Terraria version.

exception OverflowError(value: Value)

Bases: ValidationError

At least one item in the list is out of representable range.

world_manifest

class lihzahrd.terraria.world.header.world_manifest.WorldManifest(value: Value)

Bases: PackStrVariable

Unknown. Contains JSON.

get_json() Any
Returns:

The Python object resulting from parsing value.

set_from_json(value: Any) None
Parameters:

value – The Python object to use as value. Must be JSON-able.