mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 10:21:45 -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
|
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() {
|
override def updateEntity() {
|
||||||
if (node != null && node.network == null) {
|
if (!addedToNetwork) {
|
||||||
|
addedToNetwork = true
|
||||||
api.Network.joinNewNetwork(node)
|
api.Network.joinNewNetwork(node)
|
||||||
}
|
}
|
||||||
if (animationTicksLeft > 0) {
|
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 Some(item) => player_.getAttributeMap.applyAttributeModifiers(item.getAttributeModifiers)
|
||||||
case _ =>
|
case _ =>
|
||||||
}
|
}
|
||||||
|
updateXpInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ private class Network private(private val data: mutable.Map[String, Network.Vert
|
|||||||
data.remove(node.address) match {
|
data.remove(node.address) match {
|
||||||
case Some(entry) =>
|
case Some(entry) =>
|
||||||
node match {
|
node match {
|
||||||
case connector: Connector if connector.localBufferSize > 0 => removeConnector(connector)
|
case connector: Connector => removeConnector(connector)
|
||||||
case _ =>
|
case _ =>
|
||||||
}
|
}
|
||||||
node.network = null
|
node.network = null
|
||||||
@ -287,11 +287,13 @@ private class Network private(private val data: mutable.Map[String, Network.Vert
|
|||||||
}
|
}
|
||||||
|
|
||||||
def removeConnector(connector: Connector) {
|
def removeConnector(connector: Connector) {
|
||||||
|
if (connector.localBufferSize > 0) {
|
||||||
assert(connectors.contains(connector))
|
assert(connectors.contains(connector))
|
||||||
connectors -= connector
|
connectors -= connector
|
||||||
globalBuffer -= connector.localBuffer
|
globalBuffer -= connector.localBuffer
|
||||||
globalBufferSize -= connector.localBufferSize
|
globalBufferSize -= connector.localBufferSize
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def changeBuffer(delta: Double): Double = {
|
def changeBuffer(delta: Double): Double = {
|
||||||
if (delta == 0) 0
|
if (delta == 0) 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user