mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 02:12:42 -04:00
Merge branch 'master' of https://github.com/MightyPirates/OpenComputers into robot_components
This commit is contained in:
commit
d35ad805bb
BIN
assets/opencomputers/lib/native.32.dylib
Normal file
BIN
assets/opencomputers/lib/native.32.dylib
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/opencomputers/lib/native.64.dylib
Normal file
BIN
assets/opencomputers/lib/native.64.dylib
Normal file
Binary file not shown.
Binary file not shown.
@ -22,7 +22,7 @@ abstract class Environment extends net.minecraft.tileentity.TileEntity with Tile
|
||||
|
||||
def block = getBlockType
|
||||
|
||||
private var addedToNetwork = false
|
||||
protected var addedToNetwork = false
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
|
@ -237,7 +237,8 @@ class Robot(isRemote: Boolean) extends Computer(isRemote) with ISidedInventory w
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
override def updateEntity() {
|
||||
if (node != null && node.network == null) {
|
||||
if (!addedToNetwork) {
|
||||
addedToNetwork = true
|
||||
api.Network.joinNewNetwork(node)
|
||||
}
|
||||
if (animationTicksLeft > 0) {
|
||||
@ -270,6 +271,7 @@ class Robot(isRemote: Boolean) extends Computer(isRemote) with ISidedInventory w
|
||||
case Some(item) => player_.getAttributeMap.applyAttributeModifiers(item.getAttributeModifiers)
|
||||
case _ =>
|
||||
}
|
||||
updateXpInfo()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ private class Network private(private val data: mutable.Map[String, Network.Vert
|
||||
data.remove(node.address) match {
|
||||
case Some(entry) =>
|
||||
node match {
|
||||
case connector: Connector if connector.localBufferSize > 0 => removeConnector(connector)
|
||||
case connector: Connector => removeConnector(connector)
|
||||
case _ =>
|
||||
}
|
||||
node.network = null
|
||||
@ -287,10 +287,12 @@ private class Network private(private val data: mutable.Map[String, Network.Vert
|
||||
}
|
||||
|
||||
def removeConnector(connector: Connector) {
|
||||
assert(connectors.contains(connector))
|
||||
connectors -= connector
|
||||
globalBuffer -= connector.localBuffer
|
||||
globalBufferSize -= connector.localBufferSize
|
||||
if (connector.localBufferSize > 0) {
|
||||
assert(connectors.contains(connector))
|
||||
connectors -= connector
|
||||
globalBuffer -= connector.localBuffer
|
||||
globalBufferSize -= connector.localBufferSize
|
||||
}
|
||||
}
|
||||
|
||||
def changeBuffer(delta: Double): Double = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user