Skip to content

Commit

Permalink
Fixed MC not starting up without OC
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed May 14, 2017
1 parent 8e7ab3b commit 64571f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.raoulvdberge.refinedstorage.integration.oc;

import com.raoulvdberge.refinedstorage.proxy.CapabilityNetworkNodeProxy;
import li.cil.oc.api.Driver;
import li.cil.oc.api.driver.DriverBlock;
import li.cil.oc.api.network.ManagedEnvironment;
import net.minecraft.tileentity.TileEntity;
Expand All @@ -20,4 +21,11 @@ public boolean worksWith(World world, BlockPos pos, EnumFacing facing) {
public ManagedEnvironment createEnvironment(World world, BlockPos pos, EnumFacing facing) {
return new EnvironmentNetwork(world.getTileEntity(pos).getCapability(CapabilityNetworkNodeProxy.NETWORK_NODE_PROXY_CAPABILITY, facing).getNode());
}

public static void register() {
Driver.add(new DriverNetwork());

Driver.add(new ConverterCraftingPattern());
Driver.add(new ConverterCraftingTask());
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.raoulvdberge.refinedstorage.integration.oc;

import li.cil.oc.api.Driver;
import net.minecraftforge.fml.common.Loader;

public final class IntegrationOC {
Expand All @@ -9,11 +8,4 @@ public final class IntegrationOC {
public static boolean isLoaded() {
return Loader.isModLoaded(ID);
}

public static void register() {
Driver.add(new DriverNetwork());

Driver.add(new ConverterCraftingPattern());
Driver.add(new ConverterCraftingTask());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.raoulvdberge.refinedstorage.gui.GuiHandler;
import com.raoulvdberge.refinedstorage.integration.craftingtweaks.IntegrationCraftingTweaks;
import com.raoulvdberge.refinedstorage.integration.forgeenergy.ReaderWriterHandlerForgeEnergy;
import com.raoulvdberge.refinedstorage.integration.oc.DriverNetwork;
import com.raoulvdberge.refinedstorage.integration.oc.IntegrationOC;
import com.raoulvdberge.refinedstorage.integration.tesla.IntegrationTesla;
import com.raoulvdberge.refinedstorage.item.*;
Expand Down Expand Up @@ -831,7 +832,7 @@ public void preInit(FMLPreInitializationEvent e) {

public void init(FMLInitializationEvent e) {
if (IntegrationOC.isLoaded()) {
IntegrationOC.register();
DriverNetwork.register();
}
}

Expand Down

0 comments on commit 64571f5

Please sign in to comment.