Skip to content

Commit

Permalink
disable recipes if NHCore is present (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 authored Jan 9, 2022
1 parent 7188486 commit da8543d
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions src/main/java/codechicken/translocator/TranslocatorProxy.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package codechicken.translocator;

import codechicken.nei.api.API;
import cpw.mods.fml.common.Loader;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
Expand Down Expand Up @@ -38,32 +39,33 @@ public void init() {
GameRegistry.registerTileEntity(TileCraftingGrid.class, "craftingGrid");

PacketCustom.assignHandler(TranslocatorSPH.channel, new TranslocatorSPH());
if (!Loader.isModLoaded("dreamcraft")){
GameRegistry.addRecipe(new ItemStack(blockTranslocator, 2, 0),
"rer",
"ipi",
"rgr",
'r', Items.redstone,
'e', Items.ender_pearl,
'i', Items.iron_ingot,
'g', Items.gold_ingot,
'p', Blocks.piston);
GameRegistry.addRecipe(new ItemStack(blockTranslocator, 2, 1),
"rer",
"ipi",
"rlr",
'r', Items.redstone,
'e', Items.ender_pearl,
'i', Items.iron_ingot,
'l', new ItemStack(Items.dye, 1, 4),
'p', Blocks.piston);

GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond),
itemDiamondNugget, itemDiamondNugget, itemDiamondNugget,
itemDiamondNugget, itemDiamondNugget, itemDiamondNugget,
itemDiamondNugget, itemDiamondNugget, itemDiamondNugget);

GameRegistry.addRecipe(new ItemStack(blockTranslocator, 2, 0),
"rer",
"ipi",
"rgr",
'r', Items.redstone,
'e', Items.ender_pearl,
'i', Items.iron_ingot,
'g', Items.gold_ingot,
'p', Blocks.piston);
GameRegistry.addRecipe(new ItemStack(blockTranslocator, 2, 1),
"rer",
"ipi",
"rlr",
'r', Items.redstone,
'e', Items.ender_pearl,
'i', Items.iron_ingot,
'l', new ItemStack(Items.dye, 1, 4),
'p', Blocks.piston);
GameRegistry.addShapelessRecipe(new ItemStack(itemDiamondNugget, 9), Items.diamond);
}
API.hideItem(new ItemStack(blockCraftingGrid));

GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond),
itemDiamondNugget, itemDiamondNugget, itemDiamondNugget,
itemDiamondNugget, itemDiamondNugget, itemDiamondNugget,
itemDiamondNugget, itemDiamondNugget, itemDiamondNugget);

GameRegistry.addShapelessRecipe(new ItemStack(itemDiamondNugget, 9), Items.diamond);
}
}

0 comments on commit da8543d

Please sign in to comment.