Don't run the power check when trying to place ores on blocks.

fixes #1076
This commit is contained in:
IntegratedQuantum 2025-02-22 10:10:38 +01:00
parent efd9ce8141
commit c46c469f21

View File

@ -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;