mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 12:17:17 -04:00
fixes disconnects when waila is installed on server and client
This commit is contained in:
parent
cc98b71884
commit
0d5a1af825
@ -131,8 +131,10 @@ abstract class Computer(isRemote: Boolean) extends Environment with ComponentInv
|
|||||||
|
|
||||||
override def writeToNBT(nbt: NBTTagCompound) {
|
override def writeToNBT(nbt: NBTTagCompound) {
|
||||||
super.writeToNBT(nbt)
|
super.writeToNBT(nbt)
|
||||||
|
if (!new Exception().getStackTrace.exists(_.getClassName.startsWith("mcp.mobius.waila"))) {
|
||||||
nbt.setNewCompoundTag(Settings.namespace + "computer", computer.save)
|
nbt.setNewCompoundTag(Settings.namespace + "computer", computer.save)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
override def readFromNBTForClient(nbt: NBTTagCompound) {
|
override def readFromNBTForClient(nbt: NBTTagCompound) {
|
||||||
|
|||||||
@ -189,6 +189,7 @@ class Rack extends Hub with PowerBalancer with Inventory with Rotatable with Bun
|
|||||||
}
|
}
|
||||||
|
|
||||||
override def writeToNBT(nbt: NBTTagCompound) {
|
override def writeToNBT(nbt: NBTTagCompound) {
|
||||||
|
if (!new Exception().getStackTrace.exists(_.getClassName.startsWith("mcp.mobius.waila"))) {
|
||||||
nbt.setNewTagList(Settings.namespace + "servers", servers map {
|
nbt.setNewTagList(Settings.namespace + "servers", servers map {
|
||||||
case Some(server) =>
|
case Some(server) =>
|
||||||
val serverNbt = new NBTTagCompound()
|
val serverNbt = new NBTTagCompound()
|
||||||
@ -196,6 +197,7 @@ class Rack extends Hub with PowerBalancer with Inventory with Rotatable with Bun
|
|||||||
serverNbt
|
serverNbt
|
||||||
case _ => new NBTTagCompound()
|
case _ => new NBTTagCompound()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
super.writeToNBT(nbt)
|
super.writeToNBT(nbt)
|
||||||
nbt.setByteArray(Settings.namespace + "sides", sides.map(_.ordinal.toByte))
|
nbt.setByteArray(Settings.namespace + "sides", sides.map(_.ordinal.toByte))
|
||||||
nbt.setNewTagList(Settings.namespace + "terminals", terminals.map(t => {
|
nbt.setNewTagList(Settings.namespace + "terminals", terminals.map(t => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user