Skip to content

Commit

Permalink
Quick fix for openblocks crash
Browse files Browse the repository at this point in the history
  • Loading branch information
tterrag1098 committed Apr 23, 2014
1 parent 95f83bc commit 29b281c
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ public static void init()
{
if (ConfigurationHandler.eloraamBreakersAndDeployers)
{
TweakingRegistry.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockBreaker).blockID, -1, TweakingAction.CHANGED, "Recipe changed to bring back", "RP2-like recipes");
TweakingRegistry.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockPlacer).blockID, -1, TweakingAction.CHANGED, "Recipe changed to bring back", "RP2-like recipes");
if (openblocks.OpenBlocks.Blocks.blockBreaker != null)
TweakingRegistry.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockBreaker).blockID, -1, TweakingAction.CHANGED, "Recipe changed to bring back", "RP2-like recipes");

if (openblocks.OpenBlocks.Blocks.blockPlacer != null)
TweakingRegistry.markItemForRecipeRemoval(((Block) openblocks.OpenBlocks.Blocks.blockPlacer).blockID, -1, TweakingAction.CHANGED, "Recipe changed to bring back", "RP2-like recipes");
}
}

Expand All @@ -28,10 +31,13 @@ public static void addRecipes()
{
if (ConfigurationHandler.eloraamBreakersAndDeployers)
{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockBreaker), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Item.pickaxeIron,
'P', Block.pistonBase, 'R', Item.redstone }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockPlacer), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Block.chest, 'P',
Block.pistonBase, 'R', Item.redstone }));
if (openblocks.OpenBlocks.Blocks.blockBreaker != null)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockBreaker), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Item.pickaxeIron,
'P', Block.pistonBase, 'R', Item.redstone }));

if (openblocks.OpenBlocks.Blocks.blockPlacer != null)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack((openblocks.OpenBlocks.Blocks.blockPlacer), 1), new Object[] { "CAC", "CPC", "CRC", 'C', "cobblestone", 'A', Block.chest, 'P',
Block.pistonBase, 'R', Item.redstone }));
}
}
}

0 comments on commit 29b281c

Please sign in to comment.