diff --git a/.dockerignore b/.dockerignore
index 417a1867c..458330c93 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -2,7 +2,6 @@
target/
.local/
**/node_modules/
-website/
benchmarks/
packs/
mods/
diff --git a/.gitattributes b/.gitattributes
index 358aeae7a..f9e1922d7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,5 +2,5 @@
# where Git for Windows' core.autocrlf would check them out with CRLF.
docs/launcher-commands.md text eol=lf
docs/horizon-ctl-commands.md text eol=lf
-website/src/tokens.css text eol=lf
+crates/horizon-theme/tokens.css text eol=lf
docs/api/*-reference.md text eol=lf
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index eff82fa99..39ea920da 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,6 +73,42 @@ jobs:
run: |
cargo +stable test --workspace --lib --bins --tests --features horizon-client/mods,horizon-mods/pack
cargo +stable test --workspace --doc --features horizon-client/mods,horizon-mods/pack
+ # The launcher is its own workspace (launcher/Cargo.toml), so verify's cargo runs never build it. A pull request that
+ # changes it or a crate it builds is checked here, and so is every push to main: two pull requests can each pass
+ # alone and break it together (#2059 and the registry ratings did, 2026-10-26).
+ launcher:
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Does this pull request change the launcher or a crate it builds?
+ if: github.event_name == 'pull_request'
+ id: launcher
+ env:
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
+ run: python3 tools/ci/rust_changes.py --launcher "$BASE_SHA" "$HEAD_SHA" >> "$GITHUB_OUTPUT"
+ - name: Install Rust and the headers GPUI links against
+ if: steps.launcher.outputs.required != 'false'
+ run: |
+ sudo apt-get update && sudo apt-get install -y --no-install-recommends libxkbcommon-x11-dev libwayland-dev \
+ libx11-xcb-dev libfontconfig-dev libvulkan-dev libasound2-dev libudev-dev
+ rustup toolchain install stable --profile minimal --component rustfmt --component clippy
+ - uses: Swatinem/rust-cache@v2
+ if: steps.launcher.outputs.required != 'false'
+ with:
+ workspaces: launcher
+ shared-key: launcher
+ save-if: ${{ github.ref == 'refs/heads/main' }}
+ - name: Check the launcher's formatting, lint and tests
+ if: steps.launcher.outputs.required != 'false'
+ working-directory: launcher
+ run: |
+ cargo +stable fmt --check
+ cargo +stable clippy --all-targets --locked -- -D warnings
+ cargo +stable test --locked --lib
# Most pull requests leave the harnesses to parity-main, which runs them on main a batch of merges at a time
# (.github/workflows/parity-main.yml; releases wait for it). A pull request still runs them itself when it changes
# a harness, an oracle, a probe or the runner, or carries the run-parity label (run-parity.yml, when it is added).
diff --git a/AGENTS.md b/AGENTS.md
index dcd4ca595..e1fa9e7fe 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -54,7 +54,8 @@ Game workspace (root `Cargo.toml`); `launcher/` and `crates/horizon-telemetry-se
Other top-level folders: `tools/` (harnesses and dev scripts), `tests/` (Python unit tests: `python3 -m
unittest discover -s tests`), `mods/horizon/src/test/java/dev/horizonlab/parity/` (Java oracles),
-`website/` (playhorizon.dev; its paths are relative to `website/`), `docs/`, `.github/workflows/`.
+`docs/`, `.github/workflows/`. The website (playhorizon.dev) is the private ludovic111/horizon-site: its build
+reads `README.md`, `launcher/links.json`, `docs/api/`, `roadmap/roadmap.json` and `crates/horizon-theme/tokens.css` from main.
## Build and test fast
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 21951c083..03f3bd97b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,8 +4,8 @@ Thanks for helping. Horizon is Minecraft: Java Edition 26.3 rewritten in Rust, a
everything is that **it plays exactly like vanilla**. This page is the short version of how we work; questions are
welcome on [Discord](https://discord.gg/HcTeMZxe5E).
-This repository holds the game, the launcher and the website, plus the tools, tests and docs that build, check and
-release them. Anything else (videos, Discord and other community material) lives elsewhere.
+This repository holds the game and the launcher, plus the tools, tests and docs that build, check and release them.
+The website (playhorizon.dev) is built in a separate repository from this one's README, `docs/api/` and roadmap. Anything else (videos, Discord and other community material) lives elsewhere.
**Where to start: [playhorizon.dev/hub](https://playhorizon.dev/hub).** It shows what is being done now and next
([ROADMAP.md](ROADMAP.md) in the repository), the work board, good first tasks, and the forms to report a bug or
diff --git a/ROADMAP.md b/ROADMAP.md
index 4a2b90643..9b82f4fac 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -134,7 +134,7 @@ Better tools for mod makers: a test runner that needs no game window, templates
`cargo horizon-mod test` runs a mod's test scripts against a fake game snapshot ([#1816](https://github.com/ludovic111/horizon/issues/1816)) and, for server mods, scripted server events ([#1837](https://github.com/ludovic111/horizon/issues/1837)); the content template and the guides are merged ([#1859](https://github.com/ludovic111/horizon/issues/1859), [#1810](https://github.com/ludovic111/horizon/issues/1810), [docs/api/stability.md](docs/api/stability.md)). Left: templates for hud, server and machine mods, typed wrappers in the SDK, a frozen 0.1 compatibility mod that every runtime must load, a CI check that fails when a stable reference entry is removed without a new major version, and the SDK on crates.io once the API is stable.
-More: [website/docs/test-a-mod.md](website/docs/test-a-mod.md)
+More: [https://playhorizon.dev/docs/test-a-mod](https://playhorizon.dev/docs/test-a-mod)
@@ -310,7 +310,7 @@ Horizon should run well on small machines: integrated graphics, the Steam Deck,
Partly done: an opt-in 60 FPS cap with fewer workers on battery, Far Detail Reduced for integrated GPUs and animated textures on the GPU (both shipped). Left: measured targets and fixes per class of machine (memory use, worker counts, startup) on a Steam Deck, old Intel and Apple Silicon Macs and 8 GB computers, reported on the Benchmarks page.
-More: [docs/benchmark.md](docs/benchmark.md) · [website/docs/performance.md](website/docs/performance.md)
+More: [docs/benchmark.md](docs/benchmark.md) · [https://playhorizon.dev/docs/performance](https://playhorizon.dev/docs/performance)
@@ -600,7 +600,9 @@ You can port a mod to Horizon with your own AI agent on your own computer. Horiz
Technical
-A player runs their own agent locally with `horizon-ctl` and the MCP servers ([docs/agent-control.md](docs/agent-control.md)), `cargo horizon-mod`, `horizon-port-pack` and the parity harnesses as the check. Horizon writes the guide ([website/docs/agents.md](website/docs/agents.md), [docs/modpacks.md](docs/modpacks.md)) and runs no agents, accounts or keys for players. The No AI switch turns all of it off.
+A player runs their own agent locally with `horizon-ctl` and the MCP servers ([docs/agent-control.md](docs/agent-control.md)), `cargo horizon-mod`, `horizon-port-pack` and the parity harnesses as the check. Horizon writes the guide (playhorizon.dev/docs/agents, [docs/modpacks.md](docs/modpacks.md)) and runs no agents, accounts or keys for players. The No AI switch turns all of it off.
+
+More: [https://playhorizon.dev/docs/agents](https://playhorizon.dev/docs/agents)
@@ -936,7 +938,9 @@ Run Horizon's built-in benchmark and share the report: every new computer makes
Technical
-`horizon-launcher play --arg=--benchmark --arg=standard` writes a JSON report; `horizon-launcher data benchmark ` shows what would be sent and uploads it ([website/docs/performance.md](website/docs/performance.md)). Results from three installs with the same hardware appear on the Benchmarks page. Example: [#1711](https://github.com/ludovic111/horizon/issues/1711).
+`horizon-launcher play --arg=--benchmark --arg=standard` writes a JSON report; `horizon-launcher data benchmark ` shows what would be sent and uploads it (playhorizon.dev/docs/performance). Results from three installs with the same hardware appear on the Benchmarks page. Example: [#1711](https://github.com/ludovic111/horizon/issues/1711).
+
+More: [https://playhorizon.dev/docs/performance](https://playhorizon.dev/docs/performance)
diff --git a/crates/horizon-assets/src/item_model.rs b/crates/horizon-assets/src/item_model.rs
index 5999805eb..d567bc6ac 100644
--- a/crates/horizon-assets/src/item_model.rs
+++ b/crates/horizon-assets/src/item_model.rs
@@ -1031,19 +1031,22 @@ pub struct ItemModels {
}
impl ItemModels {
- pub fn components(&self, stack: &StackView) -> Components {
- let mut out = self
- .prototypes
- .get(&stack.item)
- .cloned()
- .unwrap_or_default();
+ /// The stack's components: its item's defaults with the stack's patch on top. A stack
+ /// with no patch (most stacks a screen draws) borrows the defaults instead of copying them.
+ pub fn components(&self, stack: &StackView) -> std::borrow::Cow<'_, Components> {
+ static NONE: Components = BTreeMap::new();
+ let prototype = self.prototypes.get(&stack.item).unwrap_or(&NONE);
+ if stack.patch.is_empty() {
+ return std::borrow::Cow::Borrowed(prototype);
+ }
+ let mut out = prototype.clone();
for (key, value) in &stack.patch {
match value {
Some(v) => out.insert(key.clone(), v.clone()),
None => out.remove(key),
};
}
- out
+ std::borrow::Cow::Owned(out)
}
/// `ItemModelResolver.updateForTopItem`.
pub fn resolve(&self, stack: &StackView, ctx: &Context, env: &dyn ItemEnv) -> ResolvedItem {
diff --git a/crates/horizon-client/examples/probe/creative_mining_probe.rs b/crates/horizon-client/examples/probe/creative_mining_probe.rs
new file mode 100644
index 000000000..897e4bf81
--- /dev/null
+++ b/crates/horizon-client/examples/probe/creative_mining_probe.rs
@@ -0,0 +1,48 @@
+use horizon_client::{
+ Result,
+ item_data::StackData,
+ items::{ItemStack, Items},
+};
+use horizon_world::nbt::Tag;
+use serde_json::Value;
+use std::{
+ fs::File,
+ io::{BufRead, BufReader, BufWriter, Write},
+ path::Path,
+};
+
+pub fn main() -> Result<()> {
+ let args: Vec<_> = crate::args().collect();
+ let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../.local/horizon-client/26.3");
+ let items = Items::catalog(&root)?;
+ let mut out = BufWriter::new(File::create(&args[2])?);
+ for line in BufReader::new(File::open(&args[1])?).lines() {
+ let row: Value = serde_json::from_str(&line?)?;
+ let mut stack = ItemStack::new(
+ row["item"].as_str().unwrap(),
+ row["count"].as_u64().unwrap() as u32,
+ );
+ match row["tool"].as_str().unwrap() {
+ "default" => {}
+ mode => {
+ let mut data = StackData::default();
+ let tool = if mode == "implicit" {
+ Tag::compound([] as [(&str, Tag); 0])
+ } else {
+ Tag::compound([(
+ "can_destroy_blocks_in_creative",
+ Tag::Byte(i8::from(mode == "allow")),
+ )])
+ };
+ data.set_other("minecraft:tool", Some(tool));
+ stack.extra = Some(Box::new(data));
+ }
+ }
+ writeln!(
+ out,
+ "{}",
+ items.can_destroy_block(Some(&stack), row["creative"].as_bool().unwrap())
+ )?;
+ }
+ Ok(())
+}
diff --git a/crates/horizon-client/examples/probe/entity_death_loot_fixture.rs b/crates/horizon-client/examples/probe/entity_death_loot_fixture.rs
index 86ef275d9..3f47ba787 100644
--- a/crates/horizon-client/examples/probe/entity_death_loot_fixture.rs
+++ b/crates/horizon-client/examples/probe/entity_death_loot_fixture.rs
@@ -23,6 +23,7 @@ fn stack(spec: &str) -> LootStack {
map: false,
exploration: None,
ominous_amplifier: None,
+ stew_effects: Vec::new(),
};
for e in parts {
let (name, level) = e.rsplit_once(':').unwrap_or((e, "1"));
diff --git a/crates/horizon-client/examples/probe/main.rs b/crates/horizon-client/examples/probe/main.rs
index 1e1bc04d9..6b4c3d7dd 100644
--- a/crates/horizon-client/examples/probe/main.rs
+++ b/crates/horizon-client/examples/probe/main.rs
@@ -27,6 +27,7 @@ mod chat_screen_fixture;
mod cloud_fixture;
mod command_parse_fixture;
mod container_screen_probe;
+mod creative_mining_probe;
mod creative_search_fixture;
mod cushion_placement_probe;
mod emitter_particles_probe;
@@ -84,6 +85,7 @@ mod sound_engine_fixture;
mod sound_event_fixture;
mod spawn_rules_fixture;
mod sprint_probe;
+mod squid_client_probe;
mod subtitle_fixture;
mod tab_list_fixture;
mod team_rules_fixture;
@@ -108,6 +110,8 @@ probes! {
block_transform_fixture,
breaking_fixture,
camera_probe,
+ squid_client_probe,
+ creative_mining_probe,
cushion_placement_probe,
cauldron_fixture,
chat_screen_fixture,
diff --git a/crates/horizon-client/examples/probe/squid_client_probe.rs b/crates/horizon-client/examples/probe/squid_client_probe.rs
new file mode 100644
index 000000000..f9f9c9b2c
--- /dev/null
+++ b/crates/horizon-client/examples/probe/squid_client_probe.rs
@@ -0,0 +1,51 @@
+use horizon_client::{
+ Result,
+ mobs::{Mob, MobTypes, aquatic},
+};
+use horizon_core::geometry::Vec3;
+use serde_json::Value;
+use std::{
+ fs::File,
+ io::{BufRead, BufReader, BufWriter, Write},
+ path::Path,
+ sync::Arc,
+};
+
+pub fn main() -> Result<()> {
+ let args: Vec<_> = crate::args().collect();
+ let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../.local/horizon-client/26.3");
+ let types = MobTypes::load(&root)?;
+ let mut out = BufWriter::new(File::create(&args[2])?);
+ for line in BufReader::new(File::open(&args[1])?).lines() {
+ let row: Value = serde_json::from_str(&line?)?;
+ let kind = Arc::new(
+ types.types[&format!("minecraft:{}", row["species"].as_str().unwrap())].clone(),
+ );
+ let mut mob = Mob::new(1, kind, Vec3::ZERO, 0.0);
+ mob.fluids.in_water = row["water"].as_bool().unwrap();
+ mob.velocity = Vec3::new(
+ row["x"].as_f64().unwrap(),
+ row["y"].as_f64().unwrap(),
+ row["z"].as_f64().unwrap(),
+ );
+ mob.body_yaw = row["body"].as_f64().unwrap() as f32;
+ for (i, value) in row["v"].as_array().unwrap().iter().enumerate() {
+ mob.anim.v[i] = value.as_f64().unwrap() as f32;
+ }
+ if row["reset"].as_bool().unwrap() {
+ aquatic::squid_cycle_event(&mut mob);
+ }
+ let velocity = mob.velocity;
+ aquatic::squid_client_step(&mut mob);
+ assert_eq!(
+ velocity, mob.velocity,
+ "a remote animation must preserve packet velocity"
+ );
+ write!(out, "{:08x}", mob.body_yaw.to_bits())?;
+ for value in &mob.anim.v[..6] {
+ write!(out, " {:08x}", value.to_bits())?;
+ }
+ writeln!(out)?;
+ }
+ Ok(())
+}
diff --git a/crates/horizon-client/src/animate_tick.rs b/crates/horizon-client/src/animate_tick.rs
index 48e8f16f4..28b28544b 100644
--- a/crates/horizon-client/src/animate_tick.rs
+++ b/crates/horizon-client/src/animate_tick.rs
@@ -58,7 +58,10 @@ enum Animate {
BubbleColumn {
drag: bool,
},
- Fire,
+ /// `BaseFireBlock` (`SoulFireBlock.canBurn` is always true).
+ Fire {
+ soul: bool,
+ },
/// An active sculk sensor.
SculkSensor,
/// Potent sulfur that is not dry.
@@ -140,7 +143,8 @@ fn classify(name: &str, prop: &dyn Fn(&str) -> Option) -> Animate {
"bubble_column" => Animate::BubbleColumn {
drag: prop("drag").as_deref() == Some("true"),
},
- "fire" | "soul_fire" => Animate::Fire,
+ "fire" => Animate::Fire { soul: false },
+ "soul_fire" => Animate::Fire { soul: true },
"dried_ghast" => Animate::DriedGhast {
waterlogged: prop("waterlogged").as_deref() == Some("true"),
},
@@ -190,6 +194,8 @@ pub struct AnimateTables {
power_transmitter: Vec,
/// `#triggers_ambient_dried_ghast_block_sounds` (soul sand, soul soil).
dried_ghast_sounds: Vec,
+ /// `FireBlock.canBurn`: states with ignite odds above zero (none waterlogged).
+ burnable: Vec,
/// Biome id -> ambient particles and probabilities (`minecraft:visual/ambient_particles`).
ambient: Vec>,
}
@@ -220,6 +226,21 @@ impl AnimateTables {
})
.collect()
};
+ let behaviour: serde_json::Value =
+ serde_json::from_slice(&std::fs::read(root.join("block-behaviours.json"))?)?;
+ let ignite_odds = behaviour["fire"]["igniteOdds"].as_object();
+ let burnable = (0..registry.len() as u32)
+ .map(|id| {
+ // FireBlock.getIgniteOdds: a waterlogged state never burns.
+ registry.state(BlockStateId(id)).is_some_and(|s| {
+ s.properties.get("waterlogged").map(String::as_str) != Some("true")
+ && ignite_odds
+ .and_then(|m| m.get(s.name.as_str()))
+ .and_then(serde_json::Value::as_i64)
+ .is_some_and(|odds| odds > 0)
+ })
+ })
+ .collect();
let mut ambient = vec![Vec::new(); biomes.list.len()];
for (name, &id) in &biomes.index {
let path = root.join(format!(
@@ -248,6 +269,7 @@ impl AnimateTables {
power_provider: by_state("minecraft:enchantment_power_provider"),
power_transmitter: by_state("minecraft:enchantment_power_transmitter"),
dried_ghast_sounds: by_state("minecraft:triggers_ambient_dried_ghast_block_sounds"),
+ burnable,
ambient,
})
}
@@ -1103,7 +1125,7 @@ fn block_animate_tick(
}
}
}
- Animate::Fire => {
+ Animate::Fire { soul } => {
let r = engine.random();
if next_int(r, 24) == 0 {
let (volume, pitch) = (1.0 + r.next_float(), r.next_float() * 0.7 + 0.3);
@@ -1115,6 +1137,55 @@ fn block_animate_tick(
pitch,
);
}
+ // BaseFireBlock.animateTick: three large smoke above the fire, or
+ // two at each burnable neighbour's face when nothing burnable or
+ // sturdy supports it (SoulFireBlock.canBurn is always true).
+ let can_burn = |p: [i32; 3]| {
+ soul || tables
+ .burnable
+ .get(ctx.state(p).0 as usize)
+ .copied()
+ .unwrap_or(false)
+ };
+ let below = [pos[0], pos[1] - 1, pos[2]];
+ let sturdy = ctx.facts.get(ctx.state(below)).sturdy_full & (1 << 1) != 0;
+ if !can_burn(below) && !sturdy {
+ // (neighbour, coordinate axis, face at the axis' high end): the
+ // west, east, north, south and above faces, in vanilla order.
+ for (at, axis, high) in [
+ ([pos[0] - 1, pos[1], pos[2]], 0usize, false),
+ ([pos[0] + 1, pos[1], pos[2]], 0, true),
+ ([pos[0], pos[1], pos[2] - 1], 2, false),
+ ([pos[0], pos[1], pos[2] + 1], 2, true),
+ ([pos[0], pos[1] + 1, pos[2]], 1, true),
+ ] {
+ if !can_burn(at) {
+ continue;
+ }
+ for _ in 0..2 {
+ let r = engine.random();
+ let d = [r.next_double(), r.next_double(), r.next_double()];
+ let mut p = [fx + d[0], fy + d[1], fz + d[2]];
+ // The face coordinate hugs the edge: `* 0.1F` (float).
+ p[axis] = if high {
+ f64::from(pos[axis]) + 1.0 - d[axis] * f64::from(0.1f32)
+ } else {
+ f64::from(pos[axis]) + d[axis] * f64::from(0.1f32)
+ };
+ add(engine, T::LargeSmoke, p, [0.0; 3]);
+ }
+ }
+ } else {
+ for _ in 0..3 {
+ let r = engine.random();
+ let p = [
+ fx + r.next_double(),
+ fy + r.next_double() * 0.5 + 0.5,
+ fz + r.next_double(),
+ ];
+ add(engine, T::LargeSmoke, p, [0.0; 3]);
+ }
+ }
}
}
}
@@ -1157,13 +1228,19 @@ pub fn campfire_particles<'a>(
if r.next_float() < 0.11 {
let count = next_int(r, 2) + 2;
for _ in 0..count {
- make_campfire_smoke(engine, pos, signal);
+ make_campfire_smoke(engine, pos, signal, false);
}
}
}
}
-/// `CampfireBlock.makeParticles` (always visible, overriding the limiter).
-pub fn make_campfire_smoke(engine: &mut ParticleEngine, pos: [i32; 3], signal: bool) {
+/// `CampfireBlock.makeParticles` (always visible, overriding the limiter);
+/// `smoking` adds the plain smoke puff at the logs.
+pub fn make_campfire_smoke(
+ engine: &mut ParticleEngine,
+ pos: [i32; 3],
+ signal: bool,
+ smoking: bool,
+) {
let r = engine.random();
let sign = |r: &mut LegacyRandom| if r.next_boolean() { 1.0 } else { -1.0 };
let dx = r.next_double() / 3.0;
@@ -1177,6 +1254,17 @@ pub fn make_campfire_smoke(engine: &mut ParticleEngine, pos: [i32; 3], signal: b
T::CampfireCosySmoke
};
engine.create(&ParticleOptions::simple(ty), [x, y, z], [0.0, 0.07, 0.0]);
+ if smoking {
+ let r = engine.random();
+ let dx = r.next_double() / 4.0 * sign(r);
+ let dz = r.next_double() / 4.0 * sign(r);
+ let at = [
+ f64::from(pos[0]) + 0.5 + dx,
+ f64::from(pos[1]) + 0.4,
+ f64::from(pos[2]) + 0.5 + dz,
+ ];
+ engine.create(&ParticleOptions::simple(T::Smoke), at, [0.0, 0.005, 0.0]);
+ }
}
#[cfg(test)]
diff --git a/crates/horizon-client/src/biome.rs b/crates/horizon-client/src/biome.rs
index 63ad004d4..c8c15e44e 100644
--- a/crates/horizon-client/src/biome.rs
+++ b/crates/horizon-client/src/biome.rs
@@ -28,6 +28,9 @@ pub struct BiomeInfo {
pub spawn_costs: HashMap,
/// The `gameplay/creature_world_gen_spawn_probability` attribute.
pub creature_probability: f32,
+ /// The `gameplay/increased_fire_burnout` attribute (jungles, swamps, peaks,
+ /// mushroom fields).
+ pub increased_fire_burnout: bool,
pub name: String,
pub temperature: f32,
pub downfall: f32,
@@ -128,6 +131,9 @@ impl Biomes {
attributes["minecraft:gameplay/creature_world_gen_spawn_probability"]
.as_f64()
.unwrap_or(0.1) as f32,
+ increased_fire_burnout: attributes["minecraft:gameplay/increased_fire_burnout"]
+ .as_bool()
+ .unwrap_or(false),
temperature,
downfall,
precipitation: v["has_precipitation"].as_bool().unwrap_or(true),
diff --git a/crates/horizon-client/src/chunk.rs b/crates/horizon-client/src/chunk.rs
index c0bec476b..7cd375343 100644
--- a/crates/horizon-client/src/chunk.rs
+++ b/crates/horizon-client/src/chunk.rs
@@ -161,6 +161,9 @@ pub struct Chunk {
/// Structure starts reaching into this chunk (`structures.References`):
/// structure id and the start's chunk.
pub structure_refs: Vec<(Arc, (i32, i32))>,
+ /// The starts generation made in this chunk (`structures.starts`), saved
+ /// with the state their placement has reached by then.
+ pub structure_starts: Vec>,
}
impl Chunk {
pub fn empty(x: i32, z: i32) -> Self {
@@ -178,6 +181,7 @@ impl Chunk {
block_entities: Vec::new(),
block_names: Vec::new(),
structure_refs: Vec::new(),
+ structure_starts: Vec::new(),
postprocess: Vec::new(),
saved: None,
entities: Vec::new(),
diff --git a/crates/horizon-client/src/creative.rs b/crates/horizon-client/src/creative.rs
index 033b4daec..1a227db65 100644
--- a/crates/horizon-client/src/creative.rs
+++ b/crates/horizon-client/src/creative.rs
@@ -3,7 +3,12 @@
//! (`creative-inventory.json`), a 9x5 scrolling grid and the search tab.
use crate::{Result, items::ItemStack, ui::EditBox};
use serde_json::Value;
-use std::{collections::HashMap, fs, path::Path};
+use std::{
+ collections::HashMap,
+ fs,
+ path::Path,
+ sync::{Arc, Mutex},
+};
#[derive(Clone, Debug)]
pub struct Tab {
@@ -40,6 +45,17 @@ pub struct Creative {
/// The search tab's stacks, in its display order.
search_items: Vec,
search_index: Vec,
+ /// ItemPickerMenu.items: what the grid shows, filled when the tab or the
+ /// search changes (selectTab, refreshSearchResults), not on every frame.
+ shown: Mutex