mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
Merge branch 'master-MC1.10' into master-MC1.11
This commit is contained in:
commit
e856f829c9
@ -1,7 +1,7 @@
|
||||
package li.cil.oc.common.event
|
||||
|
||||
import li.cil.oc.api.event.RobotPlaceInAirEvent
|
||||
import li.cil.oc.api.network.Component
|
||||
import li.cil.oc.api.network.Node
|
||||
import li.cil.oc.server.component.UpgradeAngel
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
|
||||
|
||||
@ -12,8 +12,8 @@ object AngelUpgradeHandler {
|
||||
def onPlaceInAir(e: RobotPlaceInAirEvent) {
|
||||
val machineNode = e.agent.machine.node
|
||||
e.setAllowed(machineNode.reachableNodes.exists {
|
||||
case component: Component if component.canBeSeenFrom(machineNode) =>
|
||||
component.host.isInstanceOf[UpgradeAngel]
|
||||
case node: Node if node.canBeReachedFrom(machineNode) =>
|
||||
node.host.isInstanceOf[UpgradeAngel]
|
||||
case _ => false
|
||||
})
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ class Robot extends traits.Computer with traits.PowerInformation with traits.Rot
|
||||
else {
|
||||
getWorld.setBlockToAir(newPosition)
|
||||
}
|
||||
created && BlockPosition(this) == newPosition
|
||||
created && this.position == newPosition
|
||||
}
|
||||
finally {
|
||||
blockRobotProxy.moving.set(None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user