Compare commits

...
Author SHA1 Message Date
Ludovic MarieandClaude Opus 5.5 2d0cf561ba Main build fixes: the stew particles' LAN send, the spawn egg test's NBT calls
#5176's lan_send_particles call predates the QueuedParticle argument, and the
spawn egg entity_data test's mob_to_nbt/mob_from_nbt calls predate their block
registry argument; each head was green alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 17:43:31 +01:00
Ludovic Marie b06a15edee Merge remote-tracking branch 'origin/main' into fix/audio-share-fields 2026-10-31 17:38:12 +01:00
Ludovic MarieandClaude Opus 5.5 a56afe1de4 Audio: a shared output starts with no device tracking (main build fix)
#3727 (Audio::share, splitscreen) and #5102/#5193's device fields (default_seen,
cards_seen, devices_seen, device_ticks) merged separately: main stopped compiling
with the audio feature (E0063 in share). A shared output has no stream of its
own, so it starts with nothing seen; the owner's engine tracks the devices.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 17:30:59 +01:00
3 changed files with 21 additions and 3 deletions

No files matched your search

+10
View File
@@ -1074,6 +1074,16 @@ impl Audio {
heard: Default::default(),
stopped: Default::default(),
preview: Default::default(),
// A shared output has no stream of its own: the owner's engine
// tracks the devices.
#[cfg(feature = "audio")]
default_seen: None,
#[cfg(feature = "audio")]
cards_seen: None,
#[cfg(feature = "audio")]
devices_seen: Vec::new(),
#[cfg(feature = "audio")]
device_ticks: 0,
}
}
/// Sync the volume options, refreshing the categories that changed
+2 -2
View File
@@ -3778,8 +3778,8 @@ mod item_component_tests {
else {
return m;
};
let tag = crate::data_cmd::merged(&mob_to_nbt(&m, [1, 2, 3, 4], None), data);
mob_from_nbt(&tag, &types, 2).unwrap()
let tag = crate::data_cmd::merged(&mob_to_nbt(&m, [1, 2, 3, 4], None, None), data);
mob_from_nbt(&tag, &types, 2, None).unwrap()
};
// `entity_data={NoAI:1b}`: no id, so the egg's own type holds the data.
assert!(spawn(&egg(Some(Tag::compound([("NoAI", Tag::Byte(1))])))).no_ai);
+9 -1
View File
@@ -4912,7 +4912,15 @@ impl Game<'_> {
// ALTERNATIVE_WITH_SPEED with a per-axis maximum speed.
self.particles
.send_particles(&options, at, spread, 0.2, count);
self.lan_send_particles(&options, at, spread, 0.2, count);
self.lan_send_particles(super::lan_particles::QueuedParticle {
dimension: self.dim.id(),
options,
state: None,
at,
spread,
speed: 0.2,
count: count as i32,
});
}
// PlayerInteractTrigger: the item used on the mob, once the interaction took.
if let Some(stack) = &held {