From c46c469f21a118500042056e51e3392adec642f7 Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Sat, 22 Feb 2025 10:10:38 +0100 Subject: [PATCH] Don't run the power check when trying to place ores on blocks. fixes #1076 --- src/rotation.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rotation.zig b/src/rotation.zig index 5c242c92..48c0dc94 100644 --- a/src/rotation.zig +++ b/src/rotation.zig @@ -967,8 +967,8 @@ pub const RotationModes = struct { return true; } - pub fn canBeChangedInto(oldBlock: Block, newBlock: Block, item: main.items.ItemStack, shouldDropSourceBlockOnSuccess: *bool) RotationMode.CanBeChangedInto { - if(RotationMode.DefaultFunctions.canBeChangedInto(oldBlock, newBlock, item, shouldDropSourceBlockOnSuccess) == .no) return .no; + pub fn canBeChangedInto(oldBlock: Block, newBlock: Block, _: main.items.ItemStack, shouldDropSourceBlockOnSuccess: *bool) RotationMode.CanBeChangedInto { + if(std.meta.eql(oldBlock, newBlock)) return .no; if(oldBlock.transparent() or oldBlock.viewThrough()) return .no; if(!main.models.models.items[main.blocks.meshes.modelIndexStart(oldBlock)].allNeighborsOccluded) return .no; if(oldBlock.data != 0) return .no;