mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 19:17:27 -04:00
check tag info for bucket compare on remove
This commit is contained in:
parent
acd384b7b7
commit
e38c3fd308
@ -129,7 +129,11 @@ class UpgradeGenerator(val host: EnvironmentHost with internal.Agent) extends pr
|
||||
}
|
||||
val selectedEmptyContainer: Option[ItemStack] = inQueue.getItem.getContainerItem(inQueue) match {
|
||||
case requiredContainer if requiredContainer != null && requiredContainer.stackSize > 0 => previousSelectedItem match {
|
||||
case slotItem: ItemStack if slotItem != null && slotItem.stackSize > 0 && slotItem.getItem == requiredContainer.getItem => Option(slotItem.copy)
|
||||
case slotItem: ItemStack if
|
||||
slotItem != null &&
|
||||
slotItem.stackSize > 0 &&
|
||||
slotItem.getItem == requiredContainer.getItem &&
|
||||
ItemStack.areItemStackTagsEqual(slotItem, requiredContainer) => Option(slotItem.copy)
|
||||
case _ => return result(false, "removing this fuel requires the appropriate container in the selected slot")
|
||||
}
|
||||
case _ => None // nothing to do, nothing required
|
||||
@ -193,7 +197,7 @@ class UpgradeGenerator(val host: EnvironmentHost with internal.Agent) extends pr
|
||||
}
|
||||
}
|
||||
|
||||
private def updateClient() = host match {
|
||||
private def updateClient(): Unit = host match {
|
||||
case robot: internal.Robot => robot.synchronizeSlot(robot.componentSlot(node.address))
|
||||
case _ =>
|
||||
}
|
||||
@ -236,6 +240,3 @@ class UpgradeGenerator(val host: EnvironmentHost with internal.Agent) extends pr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GeneratorActionException extends Exception {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user