mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
avoiding errors for upgrades that don't have a component and possibly timing issues (sending to client before it was initialized)
This commit is contained in:
parent
c260ac0c7e
commit
73999ff939
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user