feat: use sided success for SmartInstrument

This commit is contained in:
xtex committed 2023-08-01 14:57:31 +08:00
1 parent f588d3bc72
commit 2b62599485
1 file changed
+2 -2
@@ -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)
}