Merge origin/parity/rendering-anim into parity/rendering-be

Client-ticked animation state now drives the renderer alongside the End
portal and gateway rendering; gateways, whose ages and cooldowns the client
does not track yet, keep rendering settled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-12 15:40:50 +02:00
12 changed files with 2481 additions and 174 deletions
@@ -7,6 +7,7 @@ use glam::{DVec3, Mat4, Quat, Vec3};
use horizon_client::{
assets::Assets,
banner::{self, Banners},
block_entity_anim::EnchantingBook,
block_entity_render::{
BlockAnim, BlockEntityRenderer, END_GATEWAY_LAYER, END_PORTAL_LAYER, Scene, TextCall,
},
@@ -115,7 +116,7 @@ fn main() -> Result<()> {
};
let assets = Assets::load(root)?;
let registry = assets.registry;
let mut renderer = BlockEntityRenderer::load(root, registry)?;
let renderer = BlockEntityRenderer::load(root, registry)?;
let atlas = HudAtlas::build(root)?;
let banners = Banners::load(root);
let (sprites, names, grid) = fake_sprites(textures)?;
@@ -217,13 +218,22 @@ fn main() -> Result<()> {
BlockStateId(neighbour),
)?;
}
if let Some(book) = case.get("book") {
renderer.set_book(
pos,
int(&book["time"]),
["flip", "oFlip", "open", "oOpen", "rot", "oRot"].map(|k| float(&book[k])),
);
}
let book = case
.get("book")
.map_or_else(EnchantingBook::default, |book| {
let [flip, o_flip, open, o_open, rot, o_rot] =
["flip", "oFlip", "open", "oOpen", "rot", "oRot"].map(|k| float(&book[k]));
EnchantingBook {
time: int(&book["time"]),
flip,
o_flip,
open,
o_open,
rot,
o_rot,
..EnchantingBook::default()
}
});
let sign = case.get("sign").map(|s| {
let mut data = SignData {
hanging: block.contains("hanging"),
@@ -267,6 +277,7 @@ fn main() -> Result<()> {
wobble: case["wobble"]
.as_array()
.map(|w| (w[0].as_str() == Some("POSITIVE"), float(&w[1]))),
book,
gateway: (
case["gateway"]["age"].as_i64().unwrap_or(0),
int(&case["gateway"]["cooldown"]),