From 2b625994856440040f022cd18de236bcd36f8d15 Mon Sep 17 00:00:00 2001 From: xtex Date: Tue, 1 Aug 2023 14:57:31 +0800 Subject: [PATCH] feat: use sided success for SmartInstrument --- .../main/kotlin/quaedam/projection/music/SmartInstrument.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/quaedam/projection/music/SmartInstrument.kt b/common/src/main/kotlin/quaedam/projection/music/SmartInstrument.kt index bce4353..829bc19 100644 --- a/common/src/main/kotlin/quaedam/projection/music/SmartInstrument.kt +++ b/common/src/main/kotlin/quaedam/projection/music/SmartInstrument.kt @@ -126,10 +126,10 @@ object SmartInstrumentBlock : Block( || CausalityAnchor.checkEffect(level, pos) ) { val entity = level.getBlockEntity(pos) as SmartInstrumentBlockEntity - if (entity.player == null) { + if (entity.player == null && !level.isClientSide) { entity.startMusic() } - return InteractionResult.SUCCESS + return InteractionResult.sidedSuccess(level.isClientSide) } return super.use(state, level, pos, player, hand, hit) }