Fixes and wrench works with ic2 machines now

This commit is contained in:
modmuss50 2016-09-06 22:16:21 +01:00
parent d96149fc97
commit d5ff2a42bb
6 changed files with 39 additions and 22 deletions
src/main/java/techreborn/items/tools

View file

@ -25,10 +25,12 @@ import reborncore.common.tile.TileMachineBase;
import techreborn.blocks.fluid.BlockFluidBase;
import techreborn.blocks.storage.BlockBatBox;
import techreborn.client.TechRebornCreativeTabMisc;
import techreborn.compat.CompatManager;
import techreborn.init.ModSounds;
import techreborn.items.ItemTR;
import techreborn.lib.ModInfo;
import techreborn.tiles.storage.TileEnergyStorage;
import techreborn.utils.IC2WrenchHelper;
import java.util.ArrayList;
import java.util.List;
@ -50,6 +52,12 @@ public class ItemWrench extends ItemTR implements ITexturedItem
@Override public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos,
EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand)
{
if(CompatManager.isIC2Loaded){
EnumActionResult result = IC2WrenchHelper.onItemUseFirst(stack, player, world, pos, side, hitX, hitY, hitZ, hand);
if(result == EnumActionResult.SUCCESS){
return result;
}
}
if (world.isAirBlock(pos))
{
return EnumActionResult.FAIL;