feat: use sided success for SmartInstrument
This commit is contained in:
parent
f588d3bc72
commit
2b62599485
@ -126,10 +126,10 @@ object SmartInstrumentBlock : Block(
|
|||||||
|| CausalityAnchor.checkEffect(level, pos)
|
|| CausalityAnchor.checkEffect(level, pos)
|
||||||
) {
|
) {
|
||||||
val entity = level.getBlockEntity(pos) as SmartInstrumentBlockEntity
|
val entity = level.getBlockEntity(pos) as SmartInstrumentBlockEntity
|
||||||
if (entity.player == null) {
|
if (entity.player == null && !level.isClientSide) {
|
||||||
entity.startMusic()
|
entity.startMusic()
|
||||||
}
|
}
|
||||||
return InteractionResult.SUCCESS
|
return InteractionResult.sidedSuccess(level.isClientSide)
|
||||||
}
|
}
|
||||||
return super.use(state, level, pos, player, hand, hit)
|
return super.use(state, level, pos, player, hand, hit)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user