feat: save playerData when possible
This commit is contained in:
parent
89841beeb7
commit
df6a14f2b1
@ -174,6 +174,9 @@ class SmartInstrumentBlockEntity(pos: BlockPos, state: BlockState) :
|
|||||||
|
|
||||||
override fun saveAdditional(tag: CompoundTag) {
|
override fun saveAdditional(tag: CompoundTag) {
|
||||||
super.saveAdditional(tag)
|
super.saveAdditional(tag)
|
||||||
|
if (playerData != null) {
|
||||||
|
tag.put(TAG_MUSIC, playerData!!)
|
||||||
|
}
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
tag.put(TAG_MUSIC, player!!.toTag())
|
tag.put(TAG_MUSIC, player!!.toTag())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user