voxels: add fishing with a cast, bite and catch loop
- Commit
fd7fa878a025b521d6a8c993ad1bdf689287bb7b- Author
- Vayun Mathur <[email protected]>
- When
- 2026-08-05 18:15 UTC (4 months ago)
- Parents
28622da
Diff
games/voxels/src/main/assets/block/fishing_rod.png
diff --git a/games/voxels/src/main/assets/block/fishing_rod.png b/games/voxels/src/main/assets/block/fishing_rod.pngnew file mode 100644index 0000000000..92b1b0a75eBinary files /dev/null and b/games/voxels/src/main/assets/block/fishing_rod.png differ
games/voxels/src/main/assets/block/raw_fish.png
diff --git a/games/voxels/src/main/assets/block/raw_fish.png b/games/voxels/src/main/assets/block/raw_fish.pngnew file mode 100644index 0000000000..fe335065cdBinary files /dev/null and b/games/voxels/src/main/assets/block/raw_fish.png differ
games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt
diff --git a/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt b/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.ktindex 3190d5731c..0ff91cd7f7 100644--- a/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt+++ b/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt@@ -39,12 +39,12 @@ data class InvSlot(val id: Int, val count: Int) data class InventoryState(val selected: Int = 0, val slots: List<InvSlot> = List(9) { InvSlot(0, 0) }, val armor: List<InvSlot> = emptyList()) // Ids 163..178 and 197..202 are tools/armor whose slot `count` is durability (not a stack size).-fun isDurabilityItem(id: Int) = id in 163..178 || id in 197..202 || id in 239..244 || id == 186 || id == 188 || id == 252+fun isDurabilityItem(id: Int) = id in 163..178 || id in 197..202 || id in 239..244 || id == 186 || id == 188 || id in 252..253 val maxDurability = mapOf( 163 to 60, 164 to 60, 165 to 132, 166 to 132, 167 to 250, 168 to 250, 169 to 1562, 170 to 1562, 171 to 240, 172 to 240, 173 to 240, 174 to 240, 175 to 528, 176 to 528, 177 to 528, 178 to 528,- 186 to 64, 188 to 432, 252 to 238,+ 186 to 64, 188 to 432, 252 to 238, 253 to 64, 239 to 700, 240 to 700, 241 to 380, 242 to 380, 243 to 380, 244 to 380, 197 to 2031, 198 to 2031, 199 to 666, 200 to 666, 201 to 666, 202 to 666 )@@ -118,7 +118,7 @@ val blockNames = mapOf( 197 to "Adamant Pickaxe", 198 to "Adamant Sword", 199 to "Adamant Helmet", 200 to "Adamant Chestplate", 201 to "Adamant Leggings", 202 to "Adamant Boots", // Matcha's building set: slabs and stairs, cut on a stonecutter.- 119 to "Wool", 252 to "Shears",+ 119 to "Wool", 252 to "Shears", 253 to "Fishing Rod", 254 to "Raw Fish", 102 to "Stone Slab", 103 to "Stone Stairs", 104 to "Cobble Slab", 105 to "Cobble Stairs", 106 to "Plank Slab", 107 to "Plank Stairs", 108 to "Brick Slab", 109 to "Brick Stairs", 110 to "Sandstone Slab", 111 to "Sandstone Stairs",@@ -165,7 +165,7 @@ val blockIconFile = mapOf( 212 to "blessing_will.png", 213 to "blessing_hyacinthus.png", 214 to "blessing_aeolus.png", 215 to "blessing_cronus.png", 216 to "blessing_demeter.png", 217 to "blessing_glaucus.png", 218 to "blessing_apollo.png", 219 to "blessing_artemis.png", 220 to "blessing_warding.png",- 119 to "wool.png", 252 to "shears.png",+ 119 to "wool.png", 252 to "shears.png", 253 to "fishing_rod.png", 254 to "raw_fish.png", 221 to "blessing_paris.png", 245 to "blessing_athena.png", 246 to "blessing_sekhmet.png", 247 to "blessing_camazotz.png", 248 to "blessing_tangaroa.png", 249 to "blessing_anubis.png",@@ -214,14 +214,14 @@ val catalogItems = listOf(128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 154, 155, 156, 157, 158, 159, 187, 189, 190, 191, 192, 193, 194, 195, 196, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,- 236, 237, 238)+ 236, 237, 238, 254) val catalogBlessings = listOf(160, 161, 162, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 245, 246, 247, 248, 249) val catalogGear = listOf(163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 186, 188, 239, 240, 241, 242, 243, 244,- 197, 198, 199, 200, 201, 202, 252)+ 197, 198, 199, 200, 201, 202, 252, 253) val catalogMusic = listOf(82, 179, 180, 181, 182, 183, 184, 185) val catalogBuilding = listOf(10, 27, 30, 49, 52, 8, 57, 9, 53, 54, 55, 56, 58, 59, 72, 74, 76, 77, 78, 81, 7, 33, 34, 35, 96, 118, 88, 89, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119)
games/voxels/src/main/rust/src/engine.rs
diff --git a/games/voxels/src/main/rust/src/engine.rs b/games/voxels/src/main/rust/src/engine.rsindex e176246409..2d152aef94 100644--- a/games/voxels/src/main/rust/src/engine.rs+++ b/games/voxels/src/main/rust/src/engine.rs@@ -66,6 +66,7 @@ pub struct EngineState { // Footsteps, cave ambience and the eerie score; see ambience.rs. pub ambience: crate::ambience::Ambience, prev_walk: f32,+ pub fishing: crate::fishing::Fishing, } // One furnace job at a time, owned by the world rather than by a specific furnace block: the player@@ -255,6 +256,7 @@ pub fn init_engine(files_dir: String, seed: u32) -> bool { rain: rain_target(progress.weather), ambience: crate::ambience::Ambience::default(), prev_walk: 0.0,+ fishing: crate::fishing::Fishing::default(), }); INIT_DONE.store(true, Ordering::SeqCst); true@@ -678,6 +680,7 @@ pub fn tick_and_render() { tick_particles(&mut state.particles, dt); tick_weather(state, dt, player_pos); tick_ambience(state, dt, player_pos);+ tick_fishing(state, dt, player_pos); let (mut entity_verts, mut entity_indices) = build_entity_mesh(&state.mobs); { let right = state.player.right();@@ -802,6 +805,7 @@ fn publish_ui(state: &EngineState) { let ambience = serde_json::json!({ "stepN": a.step_n, "stepMat": a.step_mat, "cueN": a.cue_n, "cueKind": a.cue_kind,+ "cast": state.fishing.is_cast(), "bite": state.fishing.biting(), "eerie": a.eerie, "rain": state.rain, }).to_string(); if let Ok(mut c) = cref(&AMBIENCE_CACHE, "{}").lock() { *c = ambience; }@@ -1114,6 +1118,32 @@ fn tick_projectiles(state: &mut EngineState, dt: f32) { } } +// Run the line: hold the float in place, count down to a bite, and give up if the player walks off.+fn tick_fishing(state: &mut EngineState, dt: f32, player_pos: Vec3) {+ let Some(b) = state.fishing.bobber else { return; };+ let bob = vec3(b[0], b[1], b[2]);+ // The rod has to stay in hand and the player within reach of the water.+ if state.inventory.selected_block() != crate::fishing::ROD+ || (bob - player_pos).length() > crate::fishing::LEASH+ || state.chunks.get_block_world(b[0].floor() as i32, b[1].floor() as i32, b[2].floor() as i32) != 12+ {+ state.fishing.reel_in();+ return;+ }+ if state.fishing.tick(dt) {+ // A bite: splash, so the player knows to strike without needing to watch a HUD element.+ spawn_particles(&mut state.spawn_rng, &mut state.particles, bob, 10, [0.60, 0.80, 0.95], 3.0, 0.5, 0.09);+ }+ // The float itself, redrawn each frame as a short-lived particle.+ if state.particles.len() < 480 {+ let color = if state.fishing.biting() { [1.0, 0.85, 0.35] } else { [0.90, 0.25, 0.20] };+ state.particles.push(Particle {+ pos: bob + vec3(0.0, 0.1, 0.0), vel: Vec3::ZERO,+ life: 0.12, max_life: 0.12, size: 0.11, color, gravity: 0.0,+ });+ }+}+ // Feed the atmosphere system: how far the player walked, what they're standing on, and how dark and // deep it is where they are. fn tick_ambience(state: &mut EngineState, dt: f32, player_pos: Vec3) {@@ -1286,6 +1316,35 @@ fn do_break(state: &mut EngineState, origin: Vec3, dir: Vec3) -> bool { return true; } }+ // Fishing: the first tap casts into water, the second strikes. Striking on a bite lands a catch;+ // striking early just reels the line back in.+ if sel == crate::fishing::ROD && state.player.eat_cd <= 0.0 {+ state.player.eat_cd = 0.4;+ if state.fishing.is_cast() {+ if state.fishing.biting() {+ let mut r = state.spawn_rng;+ r ^= r << 13; r ^= r >> 17; r ^= r << 5;+ state.spawn_rng = r;+ let roll = (r >> 8) as f32 / 16_777_216.0;+ let id = crate::fishing::catch_of_the_day(roll, state.player.blessed(Passive::SeaLuck));+ if state.inventory.has_room_for(id, 1) {+ state.inventory.add_block(id);+ damage_tool(state);+ }+ }+ state.fishing.reel_in();+ return true;+ }+ // Cast: find open water along the look direction and drop the float on its surface.+ if let Some(at) = water_surface_along(state, origin, dir, player_reach(state) + 6.0) {+ let mut r = state.spawn_rng;+ r ^= r << 13; r ^= r >> 17; r ^= r << 5;+ state.spawn_rng = r;+ state.fishing.cast(at, (r >> 8) as f32 / 16_777_216.0);+ return true;+ }+ return false;+ } // Throwables: snowball (light damage/knock) and ender pearl (teleport to impact). if (sel == 190 || sel == 191) && state.player.eat_cd <= 0.0 { // Paris never spends the charge; everyone else does.@@ -1597,6 +1656,25 @@ fn slayer_mult(player: &Player, kind: MobKind) -> f32 { let horror = matches!(kind, MobKind::Creeper | MobKind::Shulker | MobKind::Ghast); if (is_undead(kind) && player.blessed(Passive::SmiteUndead)) || (horror && player.blessed(Passive::BaneOfHorrors)) { 2.0 } else { 1.0 } }+/// March along the aim direction looking for the top of a body of water to drop a float onto.+fn water_surface_along(state: &EngineState, origin: Vec3, dir: Vec3, max_dist: f32) -> Option<[f32; 3]> {+ let mut t = 1.0f32;+ while t < max_dist {+ let p = origin + dir * t;+ let (x, y, z) = (p.x.floor() as i32, p.y.floor() as i32, p.z.floor() as i32);+ let id = state.chunks.get_block_world(x, y, z);+ if id == 12 {+ // Float on the surface of this column, not wherever the ray happened to enter it.+ let mut top = y;+ while state.chunks.get_block_world(x, top + 1, z) == 12 { top += 1; }+ return Some([x as f32 + 0.5, top as f32 + 0.9, z as f32 + 0.5]);+ }+ if id != 0 && Block::from_id(id).is_solid() { return None; } // the shore is in the way+ t += 0.4;+ }+ None+}+ /// Wool from one shearing. A sheep only carries one coat, so this is the whole yield. const WOOL_PER_SHEARING: i32 = 3; /// Anubis keeps the dead this far back.
games/voxels/src/main/rust/src/fishing.rs
diff --git a/games/voxels/src/main/rust/src/fishing.rs b/games/voxels/src/main/rust/src/fishing.rsnew file mode 100644index 0000000000..b021773089--- /dev/null+++ b/games/voxels/src/main/rust/src/fishing.rs@@ -0,0 +1,150 @@+// Fishing: cast a line into water, wait for a bite, and reel it in before it gets away.+//+// Matcha's fisherman deals in 49 species across five tiers. The game has one fish item, so the depth+// lives in the loot pool instead: mostly fish, sometimes junk, occasionally something worth keeping.++/// Item 254. Cook it in a furnace for the cooked fish the villagers sell.+pub const RAW_FISH: u8 = 254;+/// Item 253.+pub const ROD: u8 = 253;++/// Shortest and longest wait before a bite.+const WAIT_MIN: f32 = 3.0;+const WAIT_MAX: f32 = 14.0;+/// How long the bite stays catchable. Miss it and the fish is gone.+pub const BITE_WINDOW: f32 = 1.6;+/// Wander further than this from the float and the line comes in on its own.+pub const LEASH: f32 = 14.0;++#[derive(Default)]+pub struct Fishing {+ /// Where the float is sitting, if a line is out.+ pub bobber: Option<[f32; 3]>,+ /// Seconds until a bite; once it reaches zero, `bite` starts running.+ pub wait: f32,+ /// Seconds left to strike. Zero means nothing is biting.+ pub bite: f32,+}++impl Fishing {+ pub fn cast(&mut self, at: [f32; 3], roll: f32) {+ self.bobber = Some(at);+ self.wait = WAIT_MIN + roll.clamp(0.0, 1.0) * (WAIT_MAX - WAIT_MIN);+ self.bite = 0.0;+ }+ pub fn reel_in(&mut self) {+ self.bobber = None;+ self.wait = 0.0;+ self.bite = 0.0;+ }+ pub fn is_cast(&self) -> bool { self.bobber.is_some() }+ pub fn biting(&self) -> bool { self.bite > 0.0 }++ /// Advance the line. Returns true on the frame a bite starts, so the caller can splash.+ pub fn tick(&mut self, dt: f32) -> bool {+ if self.bobber.is_none() { return false; }+ if self.bite > 0.0 {+ self.bite -= dt;+ // The fish got away; go back to waiting rather than ending the cast.+ if self.bite <= 0.0 { self.bite = 0.0; self.wait = WAIT_MIN; }+ return false;+ }+ self.wait -= dt;+ if self.wait <= 0.0 {+ self.wait = 0.0;+ self.bite = BITE_WINDOW;+ return true;+ }+ false+ }+}++/// What comes up on the hook. `lucky` is Glaucus (SeaLuck), which trades junk for treasure.+pub fn catch_of_the_day(roll: f32, lucky: bool) -> u8 {+ let r = roll.clamp(0.0, 0.999);+ // Treasure first, then junk, then the fish that makes up the bulk of every pool.+ let treasure = if lucky { 0.14 } else { 0.06 };+ let junk = if lucky { 0.06 } else { 0.16 };+ if r < treasure {+ // Four treasures, evenly split within the treasure band.+ match ((r / treasure) * 4.0) as u32 {+ 0 => 191, // ender pearl+ 1 => 156, // emerald+ 2 => crate::world::block::Block::SeaLantern as u8,+ _ => 137, // leather (a waterlogged boot, near enough)+ }+ } else if r < treasure + junk {+ crate::world::block::Block::Kelp as u8+ } else {+ RAW_FISH+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn a_cast_waits_then_bites_then_lets_go() {+ let mut f = Fishing::default();+ assert!(!f.tick(1.0), "an uncast line never bites");++ f.cast([0.0, 62.0, 0.0], 0.0); // shortest wait+ assert!(f.is_cast());+ assert!(!f.biting());++ // Nothing bites before the wait is up.+ let mut bit = false;+ for _ in 0..(WAIT_MIN as i32 * 60 - 5) { bit |= f.tick(1.0 / 60.0); }+ assert!(!bit, "it bit early");++ // Then it does, exactly once.+ let mut bites = 0;+ for _ in 0..60 { if f.tick(1.0 / 60.0) { bites += 1; } }+ assert_eq!(bites, 1, "a bite must be a single edge, not a held state");+ assert!(f.biting());++ // Miss the window and it goes back to waiting rather than ending the cast.+ for _ in 0..(BITE_WINDOW * 60.0) as i32 + 5 { f.tick(1.0 / 60.0); }+ assert!(!f.biting());+ assert!(f.is_cast(), "missing a fish shouldn't reel the line in");++ f.reel_in();+ assert!(!f.is_cast());+ }++ #[test]+ fn the_wait_is_never_instant_and_never_forever() {+ for r in [0.0f32, 0.5, 1.0, -2.0, 4.0] {+ let mut f = Fishing::default();+ f.cast([0.0; 3], r);+ assert!((WAIT_MIN..=WAIT_MAX).contains(&f.wait), "wait {} out of range for {r}", f.wait);+ }+ }++ // The pool has to be mostly fish, always yield a real item, and reward Glaucus.+ #[test]+ fn the_catch_is_mostly_fish_and_luck_helps() {+ let sample = |lucky: bool| {+ let (mut fish, mut junk, mut treasure) = (0, 0, 0);+ let n = 20_000;+ for i in 0..n {+ let id = catch_of_the_day(i as f32 / n as f32, lucky);+ assert!(id != 0, "the hook came up with nothing");+ assert!(id <= crate::world::block::MAX_BLOCK_ID || crate::item::is_item(id), "{id} is not an id");+ if id == RAW_FISH { fish += 1; }+ else if id == crate::world::block::Block::Kelp as u8 { junk += 1; }+ else { treasure += 1; }+ }+ (fish, junk, treasure)+ };+ let (fish, junk, treasure) = sample(false);+ assert!(fish > junk + treasure, "fishing should mostly catch fish");+ assert!(junk > 0 && treasure > 0, "every band has to be reachable");++ let (lucky_fish, lucky_junk, lucky_treasure) = sample(true);+ assert!(lucky_treasure > treasure, "Glaucus has to improve the odds");+ assert!(lucky_junk < junk, "and cut down on the rubbish");+ assert!(lucky_fish > 0);+ }+}
games/voxels/src/main/rust/src/inventory.rs
diff --git a/games/voxels/src/main/rust/src/inventory.rs b/games/voxels/src/main/rust/src/inventory.rsindex ad193b6068..ca972bafbd 100644--- a/games/voxels/src/main/rust/src/inventory.rs+++ b/games/voxels/src/main/rust/src/inventory.rs@@ -24,9 +24,10 @@ pub struct Inventory { // (in1_id, in1_count, in2_id, in2_count, out_id, out_count). in2_id == 0 means a single ingredient. // Item ids 154+ are materials/tools (see item.rs). Ore -> material conversions live in SMELTING // instead, since those need a furnace, fuel and time.-pub const RECIPES: [(u8, i32, u8, i32, u8, i32); 92] = [+pub const RECIPES: [(u8, i32, u8, i32, u8, i32); 93] = [ (154, 1, 157, 1, 186, 1), // iron + coal -> flint & steel (154, 2, 0, 0, 252, 1), // iron -> shears+ (159, 3, 137, 2, 253, 1), // sticks + leather -> fishing rod (187, 1, Block::Glass as u8, 5, Block::Beacon as u8, 1), // nether star + glass -> beacon (138, 2, 0, 0, 189, 3), // gunpowder -> firework rockets (Block::Snow as u8, 1, 0, 0, 190, 4), // snow -> snowballs@@ -134,7 +135,8 @@ pub struct Smelt { const fn smelt(in1: u8, n1: i32, in2: u8, n2: i32, out: u8, out_n: i32, secs: f32, blast: bool) -> Smelt { Smelt { in1, n1, in2, n2, out, out_n, secs, blast } }-pub const SMELTING: [Smelt; 18] = [+pub const SMELTING: [Smelt; 19] = [+ smelt(254, 1, 0, 0, 132, 1, 6.0, false), // raw fish -> cooked fish smelt(Block::CoalOre as u8, 1, 0, 0, 157, 1, 6.0, false), // coal smelt(Block::IronOre as u8, 1, 0, 0, 154, 1, 8.0, false), // iron ingot smelt(Block::DiamondOre as u8, 1, 0, 0, 155, 1, 10.0, false),
games/voxels/src/main/rust/src/item.rs
diff --git a/games/voxels/src/main/rust/src/item.rs b/games/voxels/src/main/rust/src/item.rsindex 89d2163fba..42e6e384b1 100644--- a/games/voxels/src/main/rust/src/item.rs+++ b/games/voxels/src/main/rust/src/item.rs@@ -39,7 +39,7 @@ pub fn is_food(id: u8) -> bool { food_effects(id).is_some() } // Tools 163..170: {wood,stone,iron,diamond} x {pickaxe,sword}. Armor 171..178: {iron,diamond} x // {helmet,chestplate,leggings,boots}. Matcha's bronze sits between iron and diamond at 239..244, // and adamant tops the ladder at 197..202. Durability is stored in the inventory slot's `count`.-pub fn is_tool(id: u8) -> bool { (163..=170).contains(&id) || matches!(id, 197 | 198 | 239 | 240 | 252) }+pub fn is_tool(id: u8) -> bool { (163..=170).contains(&id) || matches!(id, 197 | 198 | 239 | 240 | 252 | 253) } /// Shears: used on a sheep rather than on terrain, so they're a tool that mines nothing. pub fn is_shears(id: u8) -> bool { id == 252 } pub fn is_pickaxe(id: u8) -> bool { matches!(id, 163 | 165 | 167 | 169 | 197 | 239) }@@ -76,6 +76,7 @@ pub fn max_durability(id: u8) -> i32 { 171..=174 => 240, 175..=178 => 528, // iron/diamond armor 186 => 64, // flint & steel 252 => 238, // shears+ 253 => 64, // fishing rod 188 => 432, // elytra 197 | 198 => 2031, // adamant tools 199..=202 => 666, // adamant armor@@ -153,8 +154,8 @@ mod tests { fn tools_and_armor_do_not_overlap() { for id in 0..=255u8 { assert!(!(is_tool(id) && is_armor(id)), "{id} is both a tool and armor");- // Shears are the exception: a tool that neither mines nor fights.- if is_tool(id) && !is_shears(id) {+ // Shears and the fishing rod are the exceptions: tools that neither mine nor fight.+ if is_tool(id) && !is_shears(id) && id != crate::fishing::ROD { assert!(is_pickaxe(id) ^ is_sword(id), "{id} must be exactly one tool kind"); } if is_shears(id) { assert!(!is_pickaxe(id) && !is_sword(id), "shears are not a weapon"); }
games/voxels/src/main/rust/src/lib.rs
diff --git a/games/voxels/src/main/rust/src/lib.rs b/games/voxels/src/main/rust/src/lib.rsindex 490d3a09b7..1213ac6dc4 100644--- a/games/voxels/src/main/rust/src/lib.rs+++ b/games/voxels/src/main/rust/src/lib.rs@@ -9,6 +9,7 @@ pub mod input; pub mod inventory; pub mod villager; pub mod ambience;+pub mod fishing; pub mod engine; pub mod texture_atlas; pub mod vulkan;
scripts/voxels/build_atlas.py
diff --git a/scripts/voxels/build_atlas.py b/scripts/voxels/build_atlas.pyindex 8c99e9361e..3b2a8e5f77 100644--- a/scripts/voxels/build_atlas.py+++ b/scripts/voxels/build_atlas.py@@ -135,6 +135,7 @@ COPY_ICONS = { "adamant_boots.png": ("item", "netherite_boots.png"), "silver_ingot.png": ("item", "prismarine_crystals.png"), "shears.png": ("item", "shears.png"),+ "raw_fish.png": ("item", "catfish.png"), "quicksilver.png": ("item", "prismarine_shard.png"), # The blessing pantheon. Items only: a blessing is never placed as a block, so no atlas tile. **{f"blessing_{n}.png": ("item", f"blessing_{n}.png") for n in (@@ -164,6 +165,8 @@ TINT_ICONS = { "blessing_camazotz.png": ("blessing_glaucus.png", (1.25, 0.45, 0.62)), "blessing_tangaroa.png": ("blessing_yamm.png", (0.55, 1.15, 1.10)), "blessing_anubis.png": ("blessing_prometheus.png", (1.20, 0.98, 0.42)),+ # No fishing rod in the pack; a blaze rod browned down reads as a wooden one.+ "fishing_rod.png": ("blaze_rod.png", (0.62, 0.46, 0.30)), } # Item-only icons with no atlas tile (items are never placed as blocks). filename -> base rgb.