From 87b5b3a412a52c6dc770f4529663d99db8da31b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Thu, 27 Feb 2014 14:04:52 +0100 Subject: [PATCH] fixed wrong sub-api in bc tool check potentially leading to crashes if some other mod provided partial bc api --- src/main/java/li/cil/oc/util/mods/BuildCraft.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/li/cil/oc/util/mods/BuildCraft.scala b/src/main/java/li/cil/oc/util/mods/BuildCraft.scala index 6584d4825..3901637f3 100644 --- a/src/main/java/li/cil/oc/util/mods/BuildCraft.scala +++ b/src/main/java/li/cil/oc/util/mods/BuildCraft.scala @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer object BuildCraft { 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.getItem match { 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) = - ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|core") && + ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") && player.getCurrentEquippedItem != null && (player.getCurrentEquippedItem.getItem match { case wrench: IToolWrench if wrench.canWrench(player, x, y, z) =>