Skip to content

Commit

Permalink
Adjust noteblocks to new refactored redpiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul1365972 authored and StackDoubleFlow committed Apr 7, 2024
1 parent 7c8f276 commit 8c5e762
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion crates/core/src/redpiler/backend/direct/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub(super) fn update_node(
NodeType::NoteBlock { noteblock_id } => {
let should_be_powered = get_bool_input(node);
if node.powered != should_be_powered {
let node = &mut nodes[node_id];
set_node(node, should_be_powered);
if should_be_powered {
events.push(Event::NoteBlockPlay { noteblock_id });
Expand Down
5 changes: 4 additions & 1 deletion crates/core/src/redpiler/passes/identify_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ fn for_pos<W: World>(
ty,
NodeType::Button | NodeType::Lever | NodeType::PressurePlate
);
let is_output = matches!(ty, NodeType::Trapdoor | NodeType::Lamp);
let is_output = matches!(
ty,
NodeType::Trapdoor | NodeType::Lamp | NodeType::NoteBlock { .. }
);
// || matches!(block, Block::RedstoneWire { wire } if wire::is_dot(wire));

if ignore_wires && ty == NodeType::Wire && !(is_input | is_output) {
Expand Down

0 comments on commit 8c5e762

Please sign in to comment.