mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-28 15:30:08 -04:00
fixed AE network iterator being unsafe if the network changes when iterating (iteration may not fit in one tick, even if not suspended)
updated AE dependency
This commit is contained in:
parent
5f03fd3696
commit
6a062f1821
@ -115,6 +115,9 @@ repositories {
|
||||
name 'UsrvDE'
|
||||
url "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
|
||||
}
|
||||
maven {
|
||||
url "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
@ -1,9 +1,9 @@
|
||||
minecraft.version=1.7.10
|
||||
forge.version=10.13.4.1614-1.7.10
|
||||
|
||||
oc.version=1.7.5.8-GTNH
|
||||
oc.version=1.7.5.9-GTNH
|
||||
|
||||
ae2.version=rv2-beta-26
|
||||
ae2.version=rv3-beta-31
|
||||
bc.version=7.0.9
|
||||
bloodmagic.cf=2223/203
|
||||
bloodmagic.version=1.3.0a-1
|
||||
|
@ -1,11 +1,14 @@
|
||||
package li.cil.oc.integration.appeng
|
||||
|
||||
import java.lang
|
||||
|
||||
import appeng.api.AEApi
|
||||
import appeng.api.config.Actionable
|
||||
import appeng.api.networking.crafting.ICraftingLink
|
||||
import appeng.api.networking.crafting.ICraftingRequester
|
||||
import appeng.api.networking.security.IActionHost
|
||||
import appeng.api.networking.security.MachineSource
|
||||
import appeng.api.networking.security.{BaseActionSource, IActionHost, MachineSource}
|
||||
import appeng.api.networking.storage.IBaseMonitor
|
||||
import appeng.api.storage.IMEMonitorHandlerReceiver
|
||||
import appeng.api.storage.data.{IAEItemStack, IItemList}
|
||||
import appeng.me.helpers.IGridProxyable
|
||||
import appeng.util.item.AEItemStack
|
||||
@ -315,9 +318,11 @@ object NetworkControl {
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkContents(var controller: TileEntity with IGridProxyable) extends AbstractValue
|
||||
class NetworkContents(var controller: TileEntity with IGridProxyable) extends AbstractValue with IMEMonitorHandlerReceiver[IAEItemStack]
|
||||
{
|
||||
def this() = this(null)
|
||||
if (controller != null)
|
||||
controller.getProxy.getStorage.getItemInventory.addListener(this, null)
|
||||
var items : IItemList[IAEItemStack] = null
|
||||
var i : java.util.Iterator[IAEItemStack] = null
|
||||
var index = 0
|
||||
@ -350,8 +355,11 @@ object NetworkControl {
|
||||
index = nbt.getInteger("index")
|
||||
EventHandler.scheduleServer(() => {
|
||||
val tileEntity = DimensionManager.getWorld(dimension).getTileEntity(x, y, z)
|
||||
if (tileEntity != null && tileEntity.isInstanceOf[TileEntity with IGridProxyable])
|
||||
if (tileEntity != null && tileEntity.isInstanceOf[TileEntity with IGridProxyable]) {
|
||||
controller = tileEntity.asInstanceOf[TileEntity with IGridProxyable]
|
||||
if (controller!= null)
|
||||
controller.getProxy.getStorage.getItemInventory.addListener(this, null)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -365,6 +373,18 @@ object NetworkControl {
|
||||
nbt.setInteger("z", controller.zCoord)
|
||||
}
|
||||
}
|
||||
var valid = true
|
||||
def dispose(context: Nothing): Unit = {
|
||||
valid = false
|
||||
}
|
||||
|
||||
override def isValid(verificationToken: Any): Boolean = valid
|
||||
override def onListUpdate(): Unit = {
|
||||
this.items = null
|
||||
}
|
||||
override def postChange(monitor: IBaseMonitor[IAEItemStack], change: lang.Iterable[IAEItemStack], actionSource: BaseActionSource): Unit = {
|
||||
this.items = null
|
||||
}
|
||||
}
|
||||
def aeCraftItem(aeItem: IAEItemStack, tile: TileEntity with IGridProxyable): IAEItemStack = {
|
||||
val patterns = tile.getProxy.getCrafting.getCraftingFor(aeItem, null, 0, tile.getWorldObj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user