mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 12:17:17 -04:00
fixed wrong sub-api in bc tool check potentially leading to crashes if some other mod provided partial bc api
This commit is contained in:
parent
7938a04fd8
commit
87b5b3a412
@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer
|
|||||||
|
|
||||||
object BuildCraft {
|
object BuildCraft {
|
||||||
def holdsApplicableWrench(player: EntityPlayer, x: Int, y: Int, z: Int) =
|
def holdsApplicableWrench(player: EntityPlayer, x: Int, y: Int, z: Int) =
|
||||||
ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|core") &&
|
ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") &&
|
||||||
player.getCurrentEquippedItem != null &&
|
player.getCurrentEquippedItem != null &&
|
||||||
(player.getCurrentEquippedItem.getItem match {
|
(player.getCurrentEquippedItem.getItem match {
|
||||||
case wrench: IToolWrench => wrench.canWrench(player, x, y, z)
|
case wrench: IToolWrench => wrench.canWrench(player, x, y, z)
|
||||||
@ -14,7 +14,7 @@ object BuildCraft {
|
|||||||
})
|
})
|
||||||
|
|
||||||
def wrenchUsed(player: EntityPlayer, x: Int, y: Int, z: Int) =
|
def wrenchUsed(player: EntityPlayer, x: Int, y: Int, z: Int) =
|
||||||
ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|core") &&
|
ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") &&
|
||||||
player.getCurrentEquippedItem != null &&
|
player.getCurrentEquippedItem != null &&
|
||||||
(player.getCurrentEquippedItem.getItem match {
|
(player.getCurrentEquippedItem.getItem match {
|
||||||
case wrench: IToolWrench if wrench.canWrench(player, x, y, z) =>
|
case wrench: IToolWrench if wrench.canWrench(player, x, y, z) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user