Skip to content

Commit

Permalink
Forgot to save the node, ack!
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke committed Dec 29, 2015
1 parent 2739eae commit 5721ef4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ object SerialInterfaceProviderAdapter extends SerialInterfaceProvider {
}

override def readFromNBT(nbt: NBTTagCompound): Unit = {
node.load(nbt)

writeBuffer.clear()
writeBuffer ++= nbt.getIntArray("writeBuffer").map(_.toShort)
readBuffer.clear()
Expand All @@ -115,6 +117,8 @@ object SerialInterfaceProviderAdapter extends SerialInterfaceProvider {
}

override def writeToNBT(nbt: NBTTagCompound): Unit = {
node.save(nbt)

nbt.setIntArray("writeBuffer", writeBuffer.toArray.map(_.toInt))
nbt.setIntArray("readBuffer", readBuffer.toArray.map(_.toInt))
nbt.setBoolean("isReading", isReading)
Expand Down

0 comments on commit 5721ef4

Please sign in to comment.