mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
Configurator Overhaul. Modes now more accurately descriptive.
Now only configurates in mode 0, mode 1 unchanged, mode 2 only rotates and mode 3 acts as a buildcraft wrench.
This commit is contained in:
1 parent
39509fc133
commit
e16a39912e
11 files changed
+191
-219
No files matched your search
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import mekanism.api.Chunk3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.IMekWrench;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.common.EnergyDisplay;
|
||||
@@ -70,9 +71,12 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import cpw.mods.fml.common.ModAPIManager;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
||||
/**
|
||||
* Utilities used by Mekanism. All miscellaneous methods are located here.
|
||||
* @author AidanBrady
|
||||
@@ -1345,6 +1349,16 @@ public final class MekanismUtils
|
||||
return Item.getIdFromItem(itemStack.getItem());
|
||||
}
|
||||
|
||||
public static boolean hasUsableWrench(EntityPlayer player, int x, int y, int z)
|
||||
{
|
||||
ItemStack tool = player.getCurrentEquippedItem();
|
||||
if(tool.getItem() instanceof IMekWrench && ((IMekWrench)tool.getItem()).canUseWrench(player, x, y, z))
|
||||
return true;
|
||||
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") && tool.getItem() instanceof IToolWrench && ((IToolWrench)tool.getItem()).canWrench(player, x, y, z))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static enum ResourceType
|
||||
{
|
||||
GUI("gui"),
|
||||
|
||||
Reference in new issue
Block a user