mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into master-MC1.7.10
Conflicts: src/main/scala/li/cil/oc/server/component/robot/Player.scala
This commit is contained in:
commit
6851a4f970
@ -144,13 +144,11 @@ class Player(val robot: tileentity.Robot) extends FakePlayer(robot.world.asInsta
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
!cancel && callUsingItemInSlot(0, stack => {
|
!cancel && callUsingItemInSlot(0, stack => {
|
||||||
val current = getCurrentEquippedItem
|
|
||||||
|
|
||||||
val result = isItemUseAllowed(stack) && (entity.interactFirst(this) || (entity match {
|
val result = isItemUseAllowed(stack) && (entity.interactFirst(this) || (entity match {
|
||||||
case living: EntityLivingBase if current != null => current.interactWithEntity(this, living)
|
case living: EntityLivingBase if getCurrentEquippedItem != null => getCurrentEquippedItem.interactWithEntity(this, living)
|
||||||
case _ => false
|
case _ => false
|
||||||
}))
|
}))
|
||||||
if (current != null && current.stackSize <= 0) {
|
if (getCurrentEquippedItem != null && getCurrentEquippedItem.stackSize <= 0) {
|
||||||
destroyCurrentEquippedItem()
|
destroyCurrentEquippedItem()
|
||||||
}
|
}
|
||||||
result
|
result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user