Skip to main content

terrustia_proto/
lib.rs

1#![forbid(unsafe_code)]
2//! Terraria network wire format.
3//!
4//! This crate is deliberately free of I/O so that every packet can be round-tripped in a unit test
5//! without a socket. The async server lives in the `terrustia` crate.
6//!
7//! Copyright (c) 2026 Brooklyn Halmstad.
8//! Licensed under the MIT licence; see the LICENSE file beside this crate's manifest. The server
9//! that uses it is AGPL, but this crate is not: it is a description of a wire format, and holding
10//! that hostage to a licence would help nobody.
11
12pub mod angler;
13pub mod banners;
14pub mod buffs;
15pub mod conditional_drops;
16pub mod convert;
17pub mod difficulty;
18pub mod error;
19pub mod housing;
20pub mod hurt;
21pub mod hurt_tiles;
22pub mod id;
23pub mod inventory;
24pub mod item;
25pub mod items;
26pub mod locks;
27pub mod net_module;
28pub mod net_text;
29pub mod npc;
30pub mod npc_data;
31pub mod npc_drops;
32pub mod npc_params;
33pub mod objects;
34pub mod orbs;
35pub mod packets;
36pub mod placed_items;
37pub mod player_info;
38pub mod prehardmode;
39pub mod projectile;
40pub mod projectile_data;
41pub mod reader;
42pub mod recipes;
43pub mod section;
44pub mod shimmer;
45pub mod square;
46pub mod statues;
47pub mod tile;
48pub mod tile_drops;
49pub mod tile_entity;
50pub mod tile_object;
51pub mod tile_sets;
52pub mod tile_solid;
53pub mod touch_debuffs;
54pub mod town_names;
55pub mod travel_shop;
56pub mod writer;
57
58pub use error::{ProtoError, Result};
59pub use item::ItemStack;
60pub use net_text::{NetworkText, TextMode};
61pub use reader::PacketReader;
62pub use section::{SECTION_HEIGHT, SECTION_WIDTH, SectionBounds, SectionExtras};
63pub use tile::{Liquid, Tile, TileFlags};
64pub use writer::{MAX_FRAME_LEN, PacketWriter, Writer};