feat: use sided success for SmartInstrument

This commit is contained in:
xtex 2023-08-01 14:57:31 +08:00
parent f588d3bc72
commit 2b62599485
Signed by: xtex
GPG Key ID: B918086ED8045B91

View File

@ -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)
}