mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-09 10:39:46 -10:00
Merge remote-tracking branch 'origin/main' into prO-m-7162
This commit is contained in:
commit
86929d2ebe
12 files changed
+123
-32
No files matched your search
@@ -5091,8 +5091,8 @@ impl Renderer {
|
||||
if self.detail_columns.remove(&(x, z)) == Some(complete) {
|
||||
self.detail_revision += 1;
|
||||
}
|
||||
self.occlusion.remove_column(x, z);
|
||||
}
|
||||
self.occlusion.remove_columns(&gone);
|
||||
let kept = |key: &SectionKey| !gone.contains(&(key.0, key.2));
|
||||
let before = self.block_entities.len();
|
||||
self.block_entities.retain(|key, _| kept(key));
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
//! frame has (vanilla's partial update), so what it opens shows at once; what
|
||||
//! it closes goes at the next full search.
|
||||
use super::SectionKey;
|
||||
use crate::fast_hash::FxHashSet;
|
||||
use crate::mesher::ALL_VISIBLE;
|
||||
use glam::DVec3;
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
@@ -589,6 +590,19 @@ impl Occlusion {
|
||||
}
|
||||
}
|
||||
}
|
||||
/// `remove_column` for each of `gone`. When they are every column it holds (a
|
||||
/// teleport drops the whole view), the old graph says nothing about what arrives
|
||||
/// next: it starts over as `clear` does instead of seeing through each removed
|
||||
/// section one edit at a time (some 90 000 at render distance 32).
|
||||
pub fn remove_columns(&mut self, gone: &FxHashSet<(i32, i32)>) {
|
||||
if self.columns.map.keys().all(|column| gone.contains(column)) {
|
||||
self.clear();
|
||||
return;
|
||||
}
|
||||
for &(x, z) in gone {
|
||||
self.remove_column(x, z);
|
||||
}
|
||||
}
|
||||
pub fn clear(&mut self) {
|
||||
self.columns.map.clear();
|
||||
self.edits.clear();
|
||||
@@ -1313,6 +1327,46 @@ mod tests {
|
||||
println!("search_cost: best {best:.2} ms over 12, {reached} reached");
|
||||
}
|
||||
|
||||
/// Removed columns see through every face: the graph is the one of a world that
|
||||
/// never had them, whether some columns go or all of them (a teleport).
|
||||
#[test]
|
||||
fn removed_columns_leave_the_graph_of_a_world_without_them() {
|
||||
fn without(o: &Occlusion, gone: &FxHashSet<(i32, i32)>) -> Occlusion {
|
||||
let mut fresh = Occlusion::new(0, 6);
|
||||
for (&(x, z), column) in &o.columns.map {
|
||||
if !gone.contains(&(x, z)) {
|
||||
for (y, &vis) in column.iter().enumerate() {
|
||||
fresh.set((x, y as i32, z), vis);
|
||||
}
|
||||
}
|
||||
}
|
||||
fresh
|
||||
}
|
||||
let camera = at((0, 2, 0));
|
||||
let mut o = Occlusion::new(0, 6);
|
||||
random_world(&mut o, 0x51ed_2701, 900, 6);
|
||||
o.settle(camera, 6);
|
||||
let some: FxHashSet<(i32, i32)> = (-6..=6)
|
||||
.flat_map(|x| (-1..=1).map(move |z| (x, z)))
|
||||
.collect();
|
||||
let mut expected = without(&o, &some);
|
||||
o.remove_columns(&some);
|
||||
o.settle(camera, 6);
|
||||
expected.settle(camera, 6);
|
||||
let graph = |o: &Occlusion| o.graph.as_ref().expect("searched").directions.clone();
|
||||
assert_eq!(graph(&o), graph(&expected));
|
||||
|
||||
let all: FxHashSet<(i32, i32)> = o.columns.map.keys().copied().collect();
|
||||
o.remove_columns(&all);
|
||||
assert!(o.contains((40, 3, 40)), "no graph from the old view culls");
|
||||
random_world(&mut o, 0x2545_f491, 900, 6);
|
||||
let mut arrived = Occlusion::new(0, 6);
|
||||
random_world(&mut arrived, 0x2545_f491, 900, 6);
|
||||
o.settle(camera, 6);
|
||||
arrived.settle(camera, 6);
|
||||
assert_eq!(graph(&o), graph(&arrived));
|
||||
}
|
||||
|
||||
/// The worker's graph is the one the render thread would compute.
|
||||
#[test]
|
||||
fn the_worker_matches_a_search_on_the_render_thread() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ClientPacketListener.<init> port crates/horizon-client/src/game/remote.rs::Game::join_server gap: minor: clears the chat on join; vanilla restores chat state kept across a reconfiguration
|
||||
ClientPacketListener.<init> port crates/horizon-client/src/game/remote.rs::Game::join_server the chat is cleared on join (hud_disconnected leaves it out), while a reconfiguration keeps it: Event::Reconfiguring flushes it and ChatComponent.storeState's state survives
|
||||
ClientPacketListener.clearCacheSlots skip:java weak-reference cache slots; Horizon has no such cache
|
||||
ClientPacketListener.handleAddEntity inline crates/horizon-client/src/game/remote.rs::Game::handle_packet AddEntity arm: spawn_entity, then object or projectile spawn, then motion
|
||||
ClientPacketListener.createEntityFromPacket inline crates/horizon-client/src/game/remote.rs::Game::handle_packet gap: minor: the player spawns without checking that its profile is known
|
||||
@@ -16,9 +16,9 @@ ClientPacketListener.handleChunkBlocksUpdate port crates/horizon-client/src/game
|
||||
ClientPacketListener.handleChunksBiomes port crates/horizon-client/src/game/remote_chunks.rs::Game::remote_chunks_biomes each loaded column replaces its biomes, then its sections and its neighbours' are drawn again
|
||||
ClientPacketListener.enableChunkLight inline crates/horizon-client-render/src/streaming.rs::Streaming::insert_remote gap: minor: the air-only section status is not set; every section of the 3x3 columns is marked dirty
|
||||
ClientPacketListener.handleForgetLevelChunk port crates/horizon-client/src/game/remote.rs::Game::handle_packet ForgetLevelChunk arm: Streaming::forget, block entities and renderer columns dropped
|
||||
ClientPacketListener.queueLightRemoval inline crates/horizon-client-render/src/streaming.rs::Streaming::forget gap: minor: the column's light state is dropped with the column; no per-section light clearing
|
||||
ClientPacketListener.queueLightRemoval inline crates/horizon-client-render/src/streaming.rs::Streaming::forget_columns gap: minor: the column's light state is dropped with the column (lit removed); no per-section light clearing
|
||||
ClientPacketListener.handleBlockUpdate port crates/horizon-client/src/game/remote.rs::Game::server_block
|
||||
ClientPacketListener.handleConfigurationStart port crates/horizon-client/src/net.rs::receive_play gap: player: no reconfiguring screen is shown and the chat state is not stored
|
||||
ClientPacketListener.handleConfigurationStart port crates/horizon-client/src/game/remote.rs::Game::poll_remote the Reconfiguring arm flushes the held-back chat, acknowledges it, closes dialogs and drops the level, keeping the chat; gap: player: no reconfiguring screen is drawn
|
||||
ClientPacketListener.handleSystemChat port crates/horizon-client/src/game/remote.rs::Game::handle_packet SystemChat arm: overlay to the action bar, otherwise the chat
|
||||
ClientPacketListener.handlePlayerChat port crates/horizon-client/src/game/remote.rs::Game::handle_packet PlayerChat arm: the global index (a mismatch disconnects), an unknown sender and the sender's validator; gap: minor: markMessageAsProcessed (no last-seen tracker is kept)
|
||||
ClientPacketListener.handleDisguisedChat port crates/horizon-client/src/game/remote.rs::Game::handle_packet DisguisedChat arm
|
||||
|
||||
|
@@ -52,11 +52,11 @@ BlockEntityRenderDispatcher.tryExtractRenderState port crates/horizon-client-ren
|
||||
BlockEntityRenderDispatcher.submit port crates/horizon-client-render/src/block_entity_render.rs::BlockEntityRenderer::render_one draws each kind; no crash report wrapper
|
||||
BlockEntityRenderDispatcher.onResourceManagerReload missing minor: block entity models load once in BlockEntityRenderer::load; no reload path found
|
||||
BlockEntityRenderers.createEntityRenderers skip:data renderer registration table; Horizon's classify table replaces it
|
||||
BlockEntityWithBoundingBoxRenderer.extractRenderState missing player: game-master players (creative or op) see no structure box, invisible-block or structure-void markers
|
||||
BlockEntityWithBoundingBoxRenderer.extract missing player: game-master players (creative or op) see no structure box, invisible-block or structure-void markers
|
||||
BlockEntityWithBoundingBoxRenderer.extractRenderState port crates/horizon-client/src/game/structure_blocks.rs::Game::bounding_box_gizmos for a game-master or spectator: each structure block's box and, with Show Invisible Blocks on, its invisible-block markers, all within getViewDistance (96)
|
||||
BlockEntityWithBoundingBoxRenderer.extract port crates/horizon-client/src/game/structure_blocks.rs::Game::bounding_box_gizmos the renderable box comes from the block's own render mode and offset/size, and a box past the view distance or in RenderMode::None is skipped
|
||||
BlockEntityWithBoundingBoxRenderer.submit port crates/horizon-client/src/gizmos.rs::Gizmos::bounding_box the box on top and the invisible-block markers, indexed by position
|
||||
BlockEntityWithBoundingBoxRenderer.renderInvisibleBlocks inline crates/horizon-client/src/gizmos.rs::Gizmos::bounding_box barrier, light, air and structure void markers with their own colours
|
||||
BlockEntityWithBoundingBoxRenderer.renderStructureVoids missing player: game-master players (creative or op) see no structure void markers
|
||||
BlockEntityWithBoundingBoxRenderer.renderStructureVoids inline crates/horizon-client/src/game/structure_blocks.rs::Game::bounding_box_gizmos a StructureVoid marker for every structure void cell of the box, at gizmos.rs::InvisibleBlock::StructureVoid's colour
|
||||
BrightnessCombiner.acceptDouble inline crates/horizon-client-render/src/block_entity_render.rs::BlockEntityRenderer::render_one brighter of the two chest halves per channel, in the chest branch
|
||||
BrushableBlockRenderer.extractRenderState inline crates/horizon-client/src/game/brush.rs::Game::brushable_geometry the item and hit direction are read from the block entity
|
||||
BrushableBlockRenderer.submit port crates/horizon-client/src/game/brush.rs::Game::brushable_geometry the item drawn on the brushed face, sliding out with the dust stage
|
||||
@@ -100,7 +100,7 @@ SpawnerRenderer.extractRenderState port crates/horizon-client/src/mobs/spawner.r
|
||||
SpawnerRenderer.submit port crates/horizon-client/src/game/spawner.rs::Game::spawner_geometry display mob at the spawner's centre with spin, tilt and scale
|
||||
StandingSignRenderer.extractRenderState inline crates/horizon-client-render/src/block_entity_render.rs::BlockEntityRenderer::render_one gap: minor: the text filtering option is not read
|
||||
StandingSignRenderer.createTransformations inline crates/horizon-client-render/src/block_entity_render.rs::BlockEntityRenderer::render_one front and back text transforms per attachment
|
||||
TestInstanceRenderer.extractRenderState missing player: creative players placing a test instance block see no beacon beam, box or error markers
|
||||
TestInstanceRenderer.extractRenderState port crates/horizon-client/src/game/structure_blocks.rs::Game::bounding_box_gizmos the block's box as a game-master gizmo (TestInstanceBlockEntity.renderMode is BOX); the beacon beam is beacon.rs::test_instance_beam and the error marker text test_instances.rs::test_instance_marker_geometry
|
||||
TestInstanceRenderer.submit port crates/horizon-client/src/game/test_instances.rs::Game::test_instance_marker_geometry the per-block loop drawing the error markers and their billboards; the beam sections come from Game::test_instance_beam and the box from Game::bounding_box_gizmos, both drawn per frame
|
||||
TestInstanceRenderer.submitErrorMarker port crates/horizon-client/src/gizmos.rs::error_marker_shape the red box and its text, drawn by Game::test_instance_marker_geometry
|
||||
TestInstanceRenderer.shouldRenderOffScreen missing minor: culling policy of a renderer Horizon lacks
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 13 and column 112.
|
@@ -49,10 +49,10 @@ BeeDebugRenderer missing minor: F3 bee and hive debug view (hive blacklist, flo
|
||||
BrainDebugRenderer missing minor: F3 brain debug view (activities, memories, POIs); not drawn
|
||||
BreezeDebugRenderer missing minor: F3 breeze jump target view; breeze_jump_target is kept in monster_brain.rs but never drawn
|
||||
ChunkCullingDebugRenderer missing minor: F3 chunk culling frustum view; the occlusion graph has no draw
|
||||
ChunkDebugRenderer missing minor: F3 chunk info view fed by the integrated server; not drawn
|
||||
ChunkDebugRenderer.ChunkData missing minor: data for the F3 chunk info view; not built
|
||||
ChunkDebugRenderer missing minor: the visualize_chunks_on_server entry is listed in debug_entries.rs but draws nothing, for want of the server's chunk statuses
|
||||
ChunkDebugRenderer.ChunkData missing minor: no ChunkData is built, since the view it feeds draws nothing
|
||||
CollisionBoxRenderer home crates/horizon-client/src/game/debug_renderers.rs Game::debug_renderer_gizmos outlines the block shapes within 6 of the camera entity's box, white (visualize_collision_boxes)
|
||||
DebugRenderer.refreshRendererList inline crates/horizon-client/src/game/debug_keys.rs::Game::debug_gizmos the enabled views; Horizon has only chunk borders (show_chunk_borders) and hitboxes (show_hitboxes), the rest are missing
|
||||
DebugRenderer.refreshRendererList inline crates/horizon-client/src/game/debug_keys.rs::Game::debug_gizmos the views switched on: chunk borders, hitboxes and entity hitboxes, the 3d crosshair, the structure and test instance boxes (bounding_box_gizmos) and the F3 geometry run from debug_renderer_geometry; the bee, brain, breeze, goal, path, poi, raid, octree, neighbours, light section, village, support and redstone views are not drawn
|
||||
DebugRenderer.getTargetedEntity skip:debug entity under the crosshair for debug views only
|
||||
DebugRenderer.mixColor skip:debug colour helper for debug paths
|
||||
DebugRenderer.shiftHue skip:debug colour helper with no callers
|
||||
@@ -64,8 +64,8 @@ GameTestBlockHighlightRenderer skip:debug game test block markers; Horizon does
|
||||
GoalSelectorDebugRenderer missing minor: F3 mob goal view; not drawn
|
||||
HeightMapRenderer home crates/horizon-client/src/game/debug_renderers.rs Game::heightmap_shapes fills a small box per column of the 5x5 chunks around the camera, stacked by kind, coloured as getColor (visualize_heightmap)
|
||||
LightDebugRenderer home crates/horizon-client/src/game/debug_renderers.rs light_level_texts prints the block and sky light within 10 of the camera (visualize_block_light_levels and visualize_sky_light_levels)
|
||||
LightSectionDebugRenderer missing minor: F3 light section view; not drawn
|
||||
LightSectionDebugRenderer.SectionData missing minor: data for the F3 light section view; not built
|
||||
LightSectionDebugRenderer missing minor: the visualize_sky_light_sections entry is listed but draws nothing: the light engine keeps no section data to draw
|
||||
LightSectionDebugRenderer.SectionData missing minor: no SectionData is built, since the view it feeds draws nothing
|
||||
NeighborsUpdateRenderer missing minor: F3 neighbour update view; not drawn
|
||||
NeighborsUpdateRenderer.LastUpdate missing minor: data for the F3 neighbour update view; not kept
|
||||
OctreeDebugRenderer missing minor: F3 chunk section octree view; not drawn
|
||||
@@ -75,7 +75,7 @@ RaidDebugRenderer missing minor: F3 raid centre view; not drawn
|
||||
RedstoneWireOrientationsRenderer missing minor: F3 redstone wire orientation view; not drawn
|
||||
SolidFaceRenderer home crates/horizon-client/src/game/debug_renderers.rs Game::solid_face_shapes fills the sturdy sides of the outline boxes of the blocks within 6, grown by 0.002 (visualize_solid_faces)
|
||||
StructureRenderer missing minor: F3 structure bounding box view fed by debug subscriptions; Horizon sends none
|
||||
SupportBlockRenderer missing minor: F3 support block view; not drawn
|
||||
SupportBlockRenderer missing minor: the visualize_entity_supporting_blocks entry is listed but draws nothing: Entity.mainSupportingBlockPos is not kept
|
||||
VillageSectionsDebugRenderer missing minor: F3 village section view; not drawn
|
||||
WaterDebugRenderer home crates/horizon-client/src/game/debug_renderers.rs Game::water_level_shapes fills each water block within 10 of the feet to its height and prints its amount over it (visualize_water_levels)
|
||||
LevelExtractor.extract port crates/horizon-client/src/game.rs::Game::render the frame's extraction and draw; gap: minor: no separate render state, the frame is built and drawn in one fn
|
||||
|
||||
|
@@ -65,7 +65,7 @@ BreathAirGoal.givesAir inline crates/horizon-client/src/mobs/goals.rs::BreathAir
|
||||
BreedGoal.getFreePartner inline crates/horizon-client/src/mobs/goals.rs::Breed::can_use gap: minor: the partner's isPanicking is not tested (Seen has no panic flag)
|
||||
CatLieOnBlockGoal.isValidTarget port crates/horizon-client/src/mobs/tame.rs::can_lie_on
|
||||
CatSitOnBlockGoal.isValidTarget port crates/horizon-client/src/mobs/tame.rs::can_sit_on
|
||||
ClimbOnTopOfPowderSnowGoal.canUse missing player: rabbits, foxes, silverfish and endermites that end up in powder snow never jump to climb out (goal missing from their registration)
|
||||
ClimbOnTopOfPowderSnowGoal.canUse port crates/horizon-client/src/mobs/goals.rs::ClimbOnTopOfPowderSnow::can_use in powder snow and a powder-snow walker, with powder snow or no collision above: foxes, rabbits, silverfish and endermites all register the goal
|
||||
DolphinJumpGoal.waterIsClear inline crates/horizon-client/src/mobs/dolphin.rs::Jump::can_use water at each step and not a blocks_dolphin_jump block
|
||||
DolphinJumpGoal.surfaceIsClear inline crates/horizon-client/src/mobs/dolphin.rs::Jump::can_use two air blocks above each step
|
||||
DolphinJumpGoal.canContinueToUse port crates/horizon-client/src/mobs/dolphin.rs::Jump::can_continue
|
||||
@@ -96,7 +96,7 @@ RangedCrossbowAttackGoal.isValidTarget inline crates/horizon-client/src/mobs/ill
|
||||
RemoveBlockGoal.getPosWithBlock inline crates/horizon-client/src/mobs/undead.rs::AttackTurtleEgg::tick own cell, below, west, east, north, south, two below
|
||||
RunAroundLikeCrazyGoal.start inline crates/horizon-client/src/mobs/equine.rs::RunAroundLikeCrazy::can_use navigation to the random spot starts in can_use
|
||||
SpearUseGoal home crates/horizon-client/src/mobs/spear_use.rs
|
||||
SpearUseGoal.SpearUseState missing player: see SpearUseGoal
|
||||
SpearUseGoal.SpearUseState home crates/horizon-client/src/mobs/spear_use.rs the charge's engagement phase, its spear-down timer and the flee state (struct SpearUseState)
|
||||
StrollThroughVillageGoal.tick missing minor: foxes do not wander through villages at night (goal missing; no village-bound step)
|
||||
StrollThroughVillageGoal.moveRandomly missing minor: foxes do not wander through villages at night
|
||||
TemptGoal.shouldFollow inline crates/horizon-client/src/mobs/goals.rs::Tempt::can_use main hand or off hand holds a tempt item
|
||||
|
||||
|
@@ -116,7 +116,7 @@ ArmorStand.setArmorStandPose port crates/horizon-client/src/entity_nbt.rs::armor
|
||||
ArmorStand.getArmorStandPose port crates/horizon-client/src/entity_nbt.rs::armor_stand_to_nbt Pose tag written from the six pose parts
|
||||
BlockAttachedEntity.skipAttackInteraction inline crates/horizon-client/src/game/cushions.rs::Game::attack_cushion the mayInteract gate and the break; frames and paintings keep their own copies
|
||||
BlockAttachedEntity.kill inline crates/horizon-client/src/game/cushions.rs::Game::break_cushion removal and the break; no game event
|
||||
BlockAttachedEntity.ignoreExplosion missing player: explosions do not break paintings, item frames, cushions or armour stands; only players, mobs, items, TNT and minecarts are hurt
|
||||
BlockAttachedEntity.ignoreExplosion port crates/horizon-client/src/game/explosion.rs::blast_spares_decorations a source in water spares paintings, item frames, cushions and armour stands, and so does a blast that keeps blocks without mob griefing; read when the blast picks its entities
|
||||
BlockAttachedEntity.move missing minor: a piston push does not break a cushion, painting or frame here
|
||||
BlockAttachedEntity.push missing minor: a push from a blast or piston does not break a cushion, painting or frame
|
||||
BlockAttachedEntity.readAdditionalSaveData port crates/horizon-client/src/entity_nbt.rs::cushion_from_nbt gap: minor: no 16-block check on block_pos; the stored block is used as is
|
||||
|
||||
|
@@ -133,7 +133,7 @@ WardenSpawnTracker.copyData inline crates/horizon-client-render/src/sculk.rs::Wa
|
||||
Drowned.checkDrownedSpawnRules port crates/horizon-client/src/mobs/spawn_rules.rs::check_spawn_rules water below, spawner or deep enough, dark enough, frequency roll
|
||||
Drowned.isDeepEnoughToSpawn inline crates/horizon-client/src/mobs/spawn_rules.rs::check_spawn_rules below sea level minus 5
|
||||
Drowned.populateDefaultEquipmentSlots port crates/horizon-client/src/mobs/finalize.rs::Ctx::populate 10 percent chance of a trident (10 in 16) or fishing rod
|
||||
Drowned.canReplaceCurrentItem missing no mob item pickup, so the nautilus shell guard never applies
|
||||
Drowned.canReplaceCurrentItem port crates/horizon-client/src/game/mob_looting.rs::Game::can_replace the mob pickup compare (armour, toughness, attack damage) with the drowned's nautilus shell guard; called before a mob swaps what it holds
|
||||
Drowned.rangedAttackUncertainty port crates/horizon-client/src/mobs/undead.rs::drowned_throw gap: minor: fixed uncertainty 6 (normal difficulty), not 14 minus 4 times the difficulty
|
||||
Drowned.rideTick port crates/horizon-client/src/game/passengers.rs::position_riders a rider takes its vehicle's body yaw every tick
|
||||
Drowned.wantsToPickUp port crates/horizon-client/src/mobs/equip.rs::wants_to_pick_up spears are refused, then the zombie checks
|
||||
|
||||
|
@@ -21,8 +21,8 @@ StructureBlockEntity.isStructureLoadable port crates/horizon-client/src/game/str
|
||||
StructureBlockEntity.renderMode port crates/horizon-client-render/src/structure_block.rs::StructureBlock::render_mode a creative structure block shows its mode's outline
|
||||
StructureBlockEntity.getRenderableBox port crates/horizon-client-render/src/structure_block.rs::StructureBlock::renderable_box the outline box of SAVE and LOAD modes
|
||||
TestInstanceBlockEntity.Data.withSize skip:java record copy-with builder; no behaviour of its own
|
||||
TestInstanceBlockEntity.Data.withStatus missing minor: test instance status never changes; Horizon has no game test runner (/test only reports no instances)
|
||||
TestInstanceBlockEntity.Data.withError missing minor: no game test runner, so no error message is ever set on a test instance block
|
||||
TestInstanceBlockEntity.Data.withStatus port crates/horizon-client/src/game/game_tests.rs::Game::set_test_status setRunning and setSuccess write the status through it and mark the block entity updated; a new status clears the error message
|
||||
TestInstanceBlockEntity.Data.withError port crates/horizon-client/src/game/game_tests.rs::Game::set_test_status setErrorMessage carries the text as the block entity's error_message, which the next status change clears
|
||||
TheEndGatewayBlockEntity.beamAnimationTick port crates/horizon-client-render/src/block_entity_anim.rs::EndGateway::tick client ticker: age goes up and the teleport cooldown goes down
|
||||
TheEndGatewayBlockEntity.getSpawnPercent inline crates/horizon-client-render/src/block_entity_render.rs::gateway_beam spawn percent is (age + partial) / 200, clamped, inside the beam function
|
||||
TheEndGatewayBlockEntity.getCooldownPercent inline crates/horizon-client-render/src/block_entity_render.rs::gateway_beam cooldown percent is one minus the clamped cooldown over 40, inside the beam function
|
||||
@@ -91,7 +91,7 @@ TreeGrower.removeSaplings inline crates/horizon-world/src/level/growth.rs::Sim::
|
||||
TreeGrower.resetSaplings inline crates/horizon-world/src/level/growth.rs::Sim::grow_tree restores the four blocks after a failed placement
|
||||
TreeGrower.isTwoByTwoSapling inline crates/horizon-world/src/level/growth.rs::Sim::two_by_two all four blocks must be the sapling's own block
|
||||
MovingPistonBlock.destroy port crates/horizon-world/src/level/update.rs::Sim::destroy_moving_piston_base a removed moving piston removes the extended base behind it, and leaves an unextended one
|
||||
MovingPistonBlock.useWithoutItem missing minor: a right click on a moving piston with no block entity does not remove it
|
||||
MovingPistonBlock.useWithoutItem port crates/horizon-world/src/level/interact.rs::Sim::use_without_item the MovingPiston arm: a server-side click removes a moving piston whose block entity is gone, and one still in flight passes
|
||||
MovingPistonBlock.getDrops port crates/horizon-world/src/level/pistons.rs::dropped_state the block the moving piston carries, or None (vanilla's empty list) when its block entity is gone; drop_resources calls it
|
||||
MovingPistonBlock.getBlockEntity port crates/horizon-world/src/level/pistons.rs::Sim::moving_piston
|
||||
MovingPistonBlock.rotate port crates/horizon-world/src/worldgen/structure.rs::StateTransforms::rotate rotation goes through the table built from block data
|
||||
|
||||
|
@@ -31,18 +31,18 @@ CircleGizmo.emit missing minor: debug circle gizmo (F3 debug renderers only); g
|
||||
GizmoStyle.hasStroke skip:other style predicate; Horizon debug lines always carry one width (gizmos.rs::Line), so there is no stroke to test
|
||||
Gizmos.addGizmo skip:other registration into vanilla's thread-local collector; Horizon's gizmos.rs::Gizmos holds the lines directly
|
||||
Gizmos.rect inline crates/horizon-client/src/game/debug_renderers.rs::Game::solid_face_shapes the box-and-direction fill overload `SolidFaceRenderer` uses: one cuboid face's four corners from gizmos.rs::cuboid_fill_quads, filled with a plain colour; the four-corner overload has no caller
|
||||
Gizmos.billboardTextOverBlock missing minor: debug text above a block (debug renderers only); gizmos.rs has no billboard text
|
||||
Gizmos.billboardTextOverBlock inline crates/horizon-client/src/game/debug_renderers.rs::Game::debug_renderer_geometry the frame's texts: centred billboard text above a block in its own colour, sized by gizmos.rs::billboard_text_unit (block and sky light, water amounts)
|
||||
Gizmos.billboardTextOverMob missing minor: debug text above a mob (debug renderers only); gizmos.rs has no billboard text
|
||||
Gizmos.TemporaryCollection.close skip:other restores vanilla's thread-local gizmo collector; Horizon has no collector stack
|
||||
LineGizmo.emit port crates/horizon-client/src/gizmos.rs::Gizmos::line gap: minor: no alpha multiplier, so debug lines do not fade
|
||||
PointGizmo.emit missing minor: debug point gizmo (F3 debug renderers only); gizmos.rs has no point primitive
|
||||
RectGizmo.fromCuboidFace inline crates/horizon-client/src/game/debug_renderers.rs::Game::solid_face_shapes the four corners of one cuboid face, in gizmos.rs::cuboid_fill_quads' order (+X, -X, -Z, +Z, +Y, -Y), for the sturdy sides
|
||||
RectGizmo.emit missing minor: filled and outlined debug quads (F3 debug renderers only); gizmos.rs has no quad primitive
|
||||
RectGizmo.emit inline crates/horizon-client/src/gizmos.rs::cuboid_fill_quads the filled quad of a rect gizmo: cuboid_fill_quads' six faces, filled with a plain colour in debug_renderer_geometry
|
||||
SimpleGizmoCollector.add skip:other adds to vanilla's per-frame gizmo collector; Horizon has no collector object, gizmos.rs::Gizmos holds the lines
|
||||
SimpleGizmoCollector.drainGizmos skip:other per-frame hand-off and expiry of vanilla's collector; Horizon's debug gizmos have no expiry
|
||||
SimpleGizmoCollector.GizmoInstance.persistForMillis missing minor: debug gizmos that stay on screen for a set time (F3 debug renderers only); gizmos.rs has no expiry
|
||||
SimpleGizmoCollector.GizmoInstance.getAlphaMultiplier missing minor: fade-out of persisted debug gizmos; gizmos.rs has no fade
|
||||
TextGizmo.emit missing minor: debug text gizmo (F3 debug renderers only); gizmos.rs has no text primitive
|
||||
TextGizmo.emit inline crates/horizon-client/src/game/debug_renderers.rs::Game::debug_renderer_geometry a text gizmo draws through the billboard text path, one font pixel at billboard_text_unit's world size
|
||||
TextGizmo.Style.withLeftAlignment missing minor: left-aligned debug label text (debug renderers only); no text style in gizmos.rs
|
||||
DeprecatedTranslationsInfo.loadFromJson port crates/horizon-client-core/src/lang.rs::apply_deprecated parses and applies the deprecated list in one fn; vanilla throws on a bad file, Horizon ignores it
|
||||
DeprecatedTranslationsInfo.loadFromResource inline crates/horizon-client-core/src/lang.rs::Language::load reads assets/minecraft/lang/deprecated.json from the first source that has it, then applies it
|
||||
|
||||
|
@@ -7,7 +7,7 @@ UnconfiguredPipelineHandler.Outbound.write skip:other Netty guard for packets s
|
||||
VarInt.getByteSize port crates/horizon-protocol/src/buf.rs::varint_size
|
||||
VarLong.getByteSize skip:java byte-size helper with no caller here; Horizon writes varlongs and measures the buffer
|
||||
Varint21FrameDecoder.copyVarint inline crates/horizon-protocol/src/frame.rs::split the 3-byte length read and the 'length wider than 21 bits' error
|
||||
Varint21FrameDecoder.decode port crates/horizon-protocol/src/frame.rs::split gap: minor: a zero frame length is not rejected (vanilla throws 'Frame length cannot be zero')
|
||||
Varint21FrameDecoder.decode port crates/horizon-protocol/src/frame.rs::split the length prefix is read by frame::header, which refuses a zero frame as corrupted, and split cuts the frame at it
|
||||
ChatType.bind port crates/horizon-client/src/lan/hub/chat.rs::Hub::handle_chat the bound takes the chat type and the sender's display name
|
||||
ChatTypeDecoration.incomingDirectMessage skip:data chat_type registry bootstrap; the msg decorations come from the chat_type data
|
||||
ChatTypeDecoration.outgoingDirectMessage skip:data chat_type registry bootstrap; the msg decorations come from the chat_type data
|
||||
@@ -23,7 +23,7 @@ Component.contains skip:other no caller in the 26.3 sources; the only match is
|
||||
Component.translatableEscape port crates/horizon-client-core/src/text.rs::Text::tr non-text arguments become literal strings
|
||||
Component.translatableWithFallback inline crates/horizon-client-core/src/component.rs::to_text_with the fallback key is read from the JSON and used when the key is missing
|
||||
Component.score skip:java builder of a score component; Horizon reads score components from JSON in resolve_score_component
|
||||
Component.object missing minor: an object component (sprite or player head) draws nothing and its fallback text is not shown
|
||||
Component.object inline crates/horizon-client-core/src/component.rs::to_text_with the object branch keeps the object's JSON on the span's style, and inline_object turns it into the fallback text
|
||||
Component.translationArg skip:java Date-to-text helper; Horizon has no Date argument type
|
||||
ComponentSerialization.createFromList port crates/horizon-client-core/src/component.rs::to_text_with a list: the first element, then the rest as siblings in its style
|
||||
ComponentSerialization.createLegacyComponentMatcher skip:java codec dispatch builder; to_text_with reads both forms directly
|
||||
@@ -44,7 +44,7 @@ FilterMask.equals skip:java value equality
|
||||
FilterMask.hashCode skip:java hashing
|
||||
FormattedText.of skip:java adapter from a String to FormattedText
|
||||
FormattedText.getString port crates/horizon-client-core/src/text.rs::Text::plain
|
||||
HoverEvent.Action.filterForSerialization port crates/horizon-client-core/src/component.rs::object_style gap: minor: show_entity is accepted by vanilla and dropped here
|
||||
HoverEvent.Action.filterForSerialization port crates/horizon-client-core/src/component.rs::object_style show_text, show_item and show_entity are kept; a show_entity hover draws its tooltip in chat with advanced item tooltips on
|
||||
HoverEvent.EntityTooltipInfo.getTooltipLines port crates/horizon-client/src/game/chat.rs::Game::entity_tooltip_lines the name when the event has one, then the entity type and the uuid, for a show_entity hover
|
||||
HoverEvent.EntityTooltipInfo.equals skip:java value equality
|
||||
HoverEvent.EntityTooltipInfo.hashCode skip:java hashing
|
||||
@@ -115,8 +115,8 @@ TextColor.parseColor port crates/horizon-client-core/src/component.rs::object_st
|
||||
KeybindContents.getNestedComponent port crates/horizon-client-core/src/key_display.rs::display_name the key's display text
|
||||
KeybindContents.visit port crates/horizon-client-core/src/key_display.rs::display_name visits the nested key text
|
||||
KeybindContents.equals skip:java value equality
|
||||
ObjectContents.resolve missing minor: object components (sprite or player head) are not resolved; the fallback text is not shown
|
||||
ObjectContents.visit missing minor: object components draw nothing
|
||||
ObjectContents.resolve inline crates/horizon-client-core/src/component.rs::inline_object the object's own fallback text: '[sprite]' for a sprite and '[name head]' for a player head, replaced by the drawn sprite
|
||||
ObjectContents.visit port crates/horizon-client-render/src/hud.rs::draw_inline_object the sprite or player head is drawn at the text's U+FFFC placeholder span, with the hat toggle and the span's tint
|
||||
PlainTextContents.LiteralContents.visit skip:java leaf of the visit walk; Text holds the literal in its spans
|
||||
ScoreContents.findTargetName inline crates/horizon-client/src/game/commands/text_commands.rs::Game::resolve_score_component a selector matching one entity is that entity, none is the name, more than one is an error
|
||||
ScoreContents.getScore port crates/horizon-client/src/game/commands/text_commands.rs::Game::resolve_score_component the objective's value in the holder's format; empty when there is none
|
||||
@@ -135,9 +135,9 @@ TranslatableContents.hashCode skip:java hashing
|
||||
TranslatableContents.toString skip:debug debug text
|
||||
BlockDataSource.getData inline crates/horizon-client/src/game/commands/text_commands.rs::Game::resolve_nbt_component the block branch: the block's data for an nbt component
|
||||
EntityDataSource.getData inline crates/horizon-client/src/game/commands/text_commands.rs::Game::resolve_nbt_component the entity branch: the entity's data for an nbt component
|
||||
AtlasSprite.toShortName missing minor: sprite object components are not drawn, so their short names are not shown
|
||||
AtlasSprite.defaultFallback missing minor: the '[sprite]' fallback text of a sprite object is not produced
|
||||
PlayerSprite.defaultFallback missing minor: the '[name head]' fallback text of a player head is not produced
|
||||
AtlasSprite.toShortName inline crates/horizon-client-core/src/component.rs::inline_object a minecraft id drops its namespace, any other id keeps it
|
||||
AtlasSprite.defaultFallback inline crates/horizon-client-core/src/component.rs::inline_object '[sprite]', or '[sprite@atlas]' when the atlas is not minecraft:blocks
|
||||
PlayerSprite.defaultFallback inline crates/horizon-client-core/src/component.rs::inline_object '[name head]', or '[unknown player head]' for a profile with no name
|
||||
NumberFormatTypes.bootstrap skip:data registry bootstrap of number format types
|
||||
ByteBufCodecs.compoundTagCodec port crates/horizon-protocol/src/buf.rs::Nbt::read gap: minor: any NBT tag is accepted where a compound is required
|
||||
ByteBufCodecs.fromCodec skip:java generic codec adapter
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 18 and column 126.
|
@@ -331,6 +331,37 @@ def jukebox_case(rng, states, case):
|
||||
'creative': True, 'sneaking': False, 'food': 20}
|
||||
|
||||
|
||||
# A block placed from an item carrying `minecraft:block_state`: the block and the properties the
|
||||
# component sets, none of them the ones the click would have chosen. The last two name a property the
|
||||
# block has no such thing as, and no property at all, which `BlockItemStateProperties.apply` skips.
|
||||
STATED = [('oak_stairs', '{half:"top",facing:"east",shape:"outer_right"}'),
|
||||
('oak_slab', '{type:"top"}'),
|
||||
('oak_log', '{axis:"x"}'),
|
||||
('oak_trapdoor', '{half:"top",open:"true"}'),
|
||||
('hopper', '{enabled:"false"}'),
|
||||
('repeater', '{delay:"4",facing:"west",locked:"true"}'),
|
||||
('comparator', '{mode:"subtract",powered:"true"}'),
|
||||
('beehive', '{honey_level:"5"}'),
|
||||
('chest', '{facing:"east"}'),
|
||||
('composter', '{level:"6"}'),
|
||||
('oak_fence_gate', '{in_wall:"true",open:"true"}'),
|
||||
('oak_stairs', '{half:"sideways"}'),
|
||||
('stone', '{facing:"east"}'),
|
||||
('oak_stairs', '{}')]
|
||||
|
||||
|
||||
def block_state_case(rng, states, case):
|
||||
"""A block placed from an item that carries a `minecraft:block_state` component (Ctrl + Pick Block
|
||||
of a turned stair, a half slab, a disabled hopper): `BlockItem.updateBlockStateFromTag` sets those
|
||||
properties on the state `getStateForPlacement` chose, so the block ends up in the state the item
|
||||
names. Ignoring the component leaves the state the click alone would have placed."""
|
||||
case['cells'] = [[0, 0, 0, states.get(rng.choice(['stone', 'dirt', 'grass_block']))]]
|
||||
block, props = rng.choice(STATED)
|
||||
case['use_item'] = {'item': '{id:"minecraft:%s",count:1,components:{"minecraft:block_state":%s}}'
|
||||
% (block, props),
|
||||
'creative': rng.random() < 0.7, 'sneaking': rng.random() < 0.2, 'food': 20}
|
||||
|
||||
|
||||
def cases(facts, count, seed):
|
||||
rng = random.Random(seed)
|
||||
states = d.States(facts)
|
||||
@@ -392,6 +423,12 @@ def cases(facts, count, seed):
|
||||
case['mode'] = 'dispense'
|
||||
yield case
|
||||
continue
|
||||
if rng.random() < 0.06:
|
||||
block_state_case(rng, states, case)
|
||||
case['items'] = []
|
||||
case['mode'] = 'dispense'
|
||||
yield case
|
||||
continue
|
||||
cells = []
|
||||
item = rng.choice(ITEMS)
|
||||
if rng.random() < 0.15:
|
||||
|
||||
Reference in new issue
Block a user