fixed formatting bug in tooltips; added check to fmp cable save to avoid errors when called on client (waila)

This commit is contained in:
Florian Nücke 2014-03-03 00:48:08 +01:00
parent 9d545e653d
commit add33b1d91
2 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,10 @@ class CablePart(val original: Option[Node] = None) extends DelegatePart with TCu
override def save(nbt: NBTTagCompound) {
super.save(nbt)
nbt.setNewCompoundTag(Settings.namespace + "node", node.save)
// Null check for Waila (and other mods that may call this client side).
if (node != null) {
nbt.setNewCompoundTag(Settings.namespace + "node", node.save)
}
}
@SideOnly(Side.CLIENT)

View File

@ -36,6 +36,7 @@ object Tooltip {
val c = iterator.next()
if (c == '§') {
iterator.next()
position += 2
}
else {
if (c == ' ') {