mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 19:56:17 -04:00
Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts: # src/main/scala/li/cil/oc/common/block/RedstoneAware.scala # src/main/scala/li/cil/oc/common/tileentity/Keyboard.scala # src/main/scala/li/cil/oc/server/agent/Player.scala
This commit is contained in:
commit
f7a1347779
@ -82,7 +82,10 @@ class Proxy {
|
||||
if (api.Machine.architectures.size == 0) {
|
||||
api.Machine.add(classOf[LuaJLuaArchitecture])
|
||||
}
|
||||
api.Machine.LuaArchitecture = api.Machine.architectures.head
|
||||
|
||||
api.Machine.LuaArchitecture =
|
||||
if (Settings.get.forceLuaJ) classOf[LuaJLuaArchitecture]
|
||||
else api.Machine.architectures.head
|
||||
}
|
||||
|
||||
def init(e: FMLInitializationEvent) {
|
||||
|
@ -30,7 +30,7 @@ abstract class RedstoneAware extends SimpleBlock /* with IRedNetOmniNode TODO MF
|
||||
|
||||
override def getWeakPower(state: IBlockState, world: IBlockAccess, pos: BlockPos, side: EnumFacing) =
|
||||
world.getTileEntity(pos) match {
|
||||
case redstone: tileentity.traits.RedstoneAware if side != null => math.min(math.max(redstone.output(side.getOpposite), 0), 15)
|
||||
case redstone: tileentity.traits.RedstoneAware if side != null => redstone.output(side.getOpposite) max 0
|
||||
case _ => super.getWeakPower(state, world, pos, side)
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ class Keyboard extends traits.Environment with traits.Rotatable with traits.Immi
|
||||
|
||||
override def node = keyboard.node
|
||||
|
||||
def hasNodeOnSide(side: EnumFacing) =
|
||||
side.getOpposite == facing || side == forward || (isOnWall && side.getOpposite == forward)
|
||||
def hasNodeOnSide(side: EnumFacing) : Boolean =
|
||||
side != facing && (isOnWall || side.getOpposite != forward)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
|
@ -259,7 +259,7 @@ class Robot extends traits.Computer with traits.PowerInformation with traits.Rot
|
||||
else {
|
||||
world.setBlockToAir(newPosition)
|
||||
}
|
||||
created
|
||||
created && BlockPosition(this) == newPosition
|
||||
}
|
||||
finally {
|
||||
blockRobotProxy.moving.set(None)
|
||||
|
@ -147,6 +147,7 @@ class Player(val agent: internal.Agent) extends FakePlayer(agent.world.asInstanc
|
||||
ObfuscationReflectionHelper.setPrivateValue(classOf[EntityPlayer], this, inventory, "inventory", "field_71071_by", "bm")
|
||||
}
|
||||
else this.inventory = inventory
|
||||
this.inventory.player = this
|
||||
|
||||
// because the inventory was just overwritten, the container is now detached
|
||||
this.inventoryContainer = new ContainerPlayer(this.inventory, !world.isRemote, this)
|
||||
@ -190,6 +191,7 @@ class Player(val agent: internal.Agent) extends FakePlayer(agent.world.asInstanc
|
||||
for (drop <- itemsDropped) {
|
||||
drop.setNoPickupDelay()
|
||||
drop.onCollideWithPlayer(this)
|
||||
drop.setDead()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user