Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed some recipes if NHCoreMod is present #12

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/main/java/pl/asie/computronics/Computronics.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
Expand Down Expand Up @@ -169,6 +166,8 @@ public Item getTabIconItem() {
}
};

public static boolean isGTNHLoaded;

public boolean isEnabled(String name, boolean def) {
return config.isEnabled(name, def);
}
Expand All @@ -193,6 +192,8 @@ private void registerBlockWithTileEntity(BlockBase block, Class<? extends ItemBl
public void preInit(FMLPreInitializationEvent event) {
log = LogManager.getLogger(Mods.Computronics);

isGTNHLoaded = Loader.isModLoaded("dreamcraft");

config = new Config(event);

storage = new StorageManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,22 @@ public void postInitOC() {
if(robotStation == null || robotStation.getItem() == null) {
robotStation = new ItemStack(Items.ender_pearl, 1, 0);
}
RecipeUtils.addShapedRecipe(new ItemStack(droneStationItem, 1, 0),
" a ", "tst", " c ", 's', robotStation, 'a', "oc:circuitChip1",
'c', "oc:cable", 't', "oc:materialTransistor"
);
if (!Computronics.isGTNHLoaded) {
RecipeUtils.addShapedRecipe(new ItemStack(droneStationItem, 1, 0),
" a ", "tst", " c ", 's', robotStation, 'a', "oc:circuitChip1",
'c', "oc:cable", 't', "oc:materialTransistor"
);
}
ItemStack pipe = GameRegistry.findItemStack(Mods.BuildCraftTransport, "item.buildcraftPipe.pipeitemsquartz", 1);
Object p = pipe;
if(pipe == null || pipe.getItem() == null) {
p = "oc:cable";
}
RecipeUtils.addShapedRecipe(new ItemStack(dockingUpgrade, 1, 0),
" a ", "tst", " c ", 's', new ItemStack(droneStationItem, 1, 0), 'a', "oc:circuitChip1",
'c', p, 't', "oc:materialTransistor"
);
if (!Computronics.isGTNHLoaded) {
RecipeUtils.addShapedRecipe(new ItemStack(dockingUpgrade, 1, 0),
" a ", "tst", " c ", 's', new ItemStack(droneStationItem, 1, 0), 'a', "oc:circuitChip1",
'c', p, 't', "oc:materialTransistor"
);
}
}
}
Loading