Skip to content

Commit

Permalink
Fix repeater walk bound
Browse files Browse the repository at this point in the history
  • Loading branch information
rollrat committed Nov 17, 2024
1 parent 6d48ab1 commit f22a25e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/world/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ impl World3D {
&& pos_src
.down()
.map_or(false, |pos| self[pos].kind.is_redstone());
let Some(walk) = pos_src.walk(self[pos_src].direction) else {
return;
};
let flat_repeater_check =
matches!(self[pos_src].kind, BlockKind::Repeater { .. }) && pos == walk;
let flat_repeater_check = self[pos_src].kind.is_repeater()
&& pos_src
.walk(self[pos_src].direction)
.map_or(false, |walk| walk == pos);

if !(flat_check || flat_repeater_check) && !(up_check || down_check) {
return;
Expand Down

0 comments on commit f22a25e

Please sign in to comment.