Merge pull request #2848 from ruifung/binCrashFix

Some minor fixes.
This commit is contained in:
Aidan 2015-07-25 13:08:10 -07:00
commit 94be300959
3 changed files with 9 additions and 9 deletions

View file

@ -1212,6 +1212,11 @@ public class Mekanism
hooks.loadOCDrivers();
}
if(Loader.isModLoaded("appliedenergistics2"))
{
hooks.registerAE2P2P();
}
//Packet registrations
packetHandler.initialize();

View file

@ -469,10 +469,9 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
{
TileEntityBin bin = (TileEntityBin)world.getTileEntity(x, y, z);
Item tool = entityplayer.getCurrentEquippedItem().getItem();
if(MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
if(entityplayer.getCurrentEquippedItem() != null && MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
{
Item tool = entityplayer.getCurrentEquippedItem().getItem();
if(entityplayer.isSneaking())
{
dismantleBlock(world, x, y, z, false);

View file

@ -68,10 +68,6 @@ public final class MekanismHooks
loadCCPeripheralProviders();
}
if(AE2Loaded)
{
hookAE2();
}
}
@ -155,7 +151,7 @@ public final class MekanismHooks
}
@Method(modid = "appliedenergistics2")
public void hookAE2() {
public void registerAE2P2P() {
String energyP2P = "add-p2p-attunement-rf-power";
if(IC2Loaded)
{