Skip to content

Commit

Permalink
replace magic number with NUM_QUEUES
Browse files Browse the repository at this point in the history
  • Loading branch information
BramOtte committed Dec 1, 2023
1 parent b8b82c2 commit bc3e777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/redpiler/backend/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ impl TickScheduler {

fn reset<W: World>(&mut self, world: &mut W, blocks: &[Option<(BlockPos, Block)>]) {
for (idx, queues) in self.queues_deque.iter().enumerate() {
let delay = if self.pos >= idx { idx + 16 } else { idx } - self.pos;
let delay = if self.pos >= idx { idx + Self::NUM_QUEUES } else { idx } - self.pos;
for (entries, priority) in queues.0.iter().zip(Self::priorities()) {
for node in entries {
let Some((pos, _)) = blocks[node.index()] else {
Expand Down

0 comments on commit bc3e777

Please sign in to comment.