Delete pub items nothing uses, and the stubs that hid unused code
93 pub items (78 functions and methods, 14 constants, 1 struct) in horizon-client, horizon-world, horizon-core, horizon-friends and horizon-server-files had no caller anywhere in the repository: not in the crate, the other crates, the examples, the tests or the binaries. rustc can't flag them because horizon-client and the others are libraries, where a pub item counts as used. The imports and the private helpers only they used go with them (title.rs date_string, goals.rs flag_index). Also drops the #[allow(dead_code)]/#[allow(unused)] items that only hid dead code: chat_debug_fill, merchant_title and Goals::locked_by had no caller, and four stubs (_keep, _unused, _rule_kind, const _) existed only to keep an import used. LightTables::from_parts is used by its tests, so it is #[cfg(test)] instead of allowed. Protocol id tables and entity data serializer ids stay: they mirror vanilla's registries in full. The launcher's three unused items are left for a launcher PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -769,19 +769,6 @@ pub fn weighted_pick(list: &[SpawnEntry], random: &mut impl RandomSource) -> Opt
|
||||
None
|
||||
}
|
||||
|
||||
/// `NaturalSpawner.getRandomSpawnMobAt`.
|
||||
pub fn random_spawn_mob_at(
|
||||
list: &[SpawnEntry],
|
||||
category: &str,
|
||||
reduced_water_ambient: bool,
|
||||
random: &mut impl RandomSource,
|
||||
) -> Option<SpawnEntry> {
|
||||
if category == "water_ambient" && reduced_water_ambient && random.next_float() < 0.98 {
|
||||
return None;
|
||||
}
|
||||
weighted_pick(list, random)
|
||||
}
|
||||
|
||||
/// `SpawnerData.count().sample(random)`: a constant draws nothing.
|
||||
pub fn sample_count(entry: &SpawnEntry, random: &mut impl RandomSource) -> u32 {
|
||||
if entry.constant {
|
||||
|
||||
Reference in New Issue
Block a user