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(); hooks.loadOCDrivers();
} }
if(Loader.isModLoaded("appliedenergistics2"))
{
hooks.registerAE2P2P();
}
//Packet registrations //Packet registrations
packetHandler.initialize(); packetHandler.initialize();

View file

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

View file

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