Skip to content

Commit

Permalink
The IRIS patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul1365972 committed Dec 15, 2023
1 parent 46f475d commit a57884d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ opt-level = 1

[profile.release]
lto = "fat"
codegen-units = 1

[dependencies]
mchprs_core = { path = "./crates/core" }
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/plot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use self::data::sleep_time_for_tps;
use self::scoreboard::Scoreboard;

/// The width of a plot (2^n)
pub const PLOT_SCALE: u32 = 4;
pub const PLOT_SCALE: u32 = 5;

/// The width of a plot counted in chunks
pub const PLOT_WIDTH: i32 = 2i32.pow(PLOT_SCALE);
Expand All @@ -50,7 +50,7 @@ pub const PLOT_BLOCK_WIDTH: i32 = PLOT_WIDTH * 16;
pub const NUM_CHUNKS: usize = PLOT_WIDTH.pow(2) as usize;

/// The height of the world in sections (Default: 16, Max: 127)
pub const PLOT_SECTIONS: usize = 16;
pub const PLOT_SECTIONS: usize = 32;
/// The plot height in blocks
pub const PLOT_BLOCK_HEIGHT: i32 = PLOT_SECTIONS as i32 * 16;

Expand Down
5 changes: 3 additions & 2 deletions crates/core/src/redpiler/passes/identify_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::redpiler::compile_graph::{
Annotations, CompileGraph, CompileNode, LinkType, NodeIdx, NodeState, NodeType,
};
use crate::redpiler::{BackendVariant, CompilerInput, CompilerOptions};
use crate::redstone;
use crate::redstone::{self, wire};
use crate::world::{for_each_block_optimized, World};
use itertools::Itertools;
use mchprs_blocks::block_entities::BlockEntity;
Expand Down Expand Up @@ -87,7 +87,8 @@ 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)
|| matches!(block, Block::RedstoneWire { wire } if wire::is_dot(wire));

if ignore_wires && ty == NodeType::Wire && !(is_input | is_output) {
return;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/redstone/wire/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub fn get_regulated_sides(wire: RedstoneWire, world: &impl World, pos: BlockPos
state
}

fn is_dot(wire: RedstoneWire) -> bool {
pub(crate) fn is_dot(wire: RedstoneWire) -> bool {
wire.north == RedstoneWireSide::None
&& wire.south == RedstoneWireSide::None
&& wire.east == RedstoneWireSide::None
Expand Down

0 comments on commit a57884d

Please sign in to comment.