From 73999ff939882d88492d56c4beaa7697458b64dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sun, 22 Dec 2013 22:18:51 +0100 Subject: [PATCH] avoiding errors for upgrades that don't have a component and possibly timing issues (sending to client before it was initialized) --- li/cil/oc/common/tileentity/Robot.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/li/cil/oc/common/tileentity/Robot.scala b/li/cil/oc/common/tileentity/Robot.scala index bfaa953fe..071bb6fbf 100644 --- a/li/cil/oc/common/tileentity/Robot.scala +++ b/li/cil/oc/common/tileentity/Robot.scala @@ -45,6 +45,7 @@ class Robot(isRemote: Boolean) extends Computer(isRemote) with ISidedInventory w // We're guaranteed to have a driver for entries. environment.save(dataTag(Registry.driverFor(stack).get, stack)) ServerPacketSender.sendRobotEquippedUpgradeChange(this, stack) + case _ => } } @@ -384,6 +385,7 @@ class Robot(isRemote: Boolean) extends Computer(isRemote) with ISidedInventory w val stack = getStackInSlot(3) // We're guaranteed to have a driver for entries. environment.save(dataTag(Registry.driverFor(stack).get, stack)) + case _ => } nbt.setNewCompoundTag("upgrade", getStackInSlot(3).writeToNBT) }