Skip to content

Commit

Permalink
Merge pull request #9 from combusterf/stair-recipe-conflics
Browse files Browse the repository at this point in the history
De-conflict RC stairs and add some infra for potential others
  • Loading branch information
Dream-Master authored Mar 28, 2022
2 parents a5cb7f1 + 8d6ed28 commit 742ea83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1743,8 +1743,14 @@ public static void applyPatches() {
ModCraftingRecipes.recipe18StoneBrick = new ArrayList<>();
ModCraftingRecipes.recipe18StoneChisel = new ArrayList<>();
for(int i = 0; i < 4; i++) {
int stairsSelected = 3;
if (i == 1) {
// Basalt conflicts with RC stairs, register only one half of the mirror version
stairsSelected = 1;
}

// block
GregtechPatches.addStairs(ModFluffBlocks.stoneStairs[i], LibOreDict.STONE_18_VARIANTS[i]);
GregtechPatches.addStairs(ModFluffBlocks.stoneStairs[i], LibOreDict.STONE_18_VARIANTS[i], stairsSelected);
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 1, i),
"Q", "Q",
'Q', new ItemStack(ModFluffBlocks.stoneSlabs[i]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ public static void addGlassPane(Block paneBlock, Block inputBlock) {
}

public static void addStairs(Block stairsBlock, Object baseBlock) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stairsBlock, 4), " Q", " QQ", "QQQ", 'Q', baseBlock));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stairsBlock, 4), "Q ", "QQ ", "QQQ", 'Q', baseBlock));
addStairs(stairsBlock, baseBlock, 3);
}
public static void addStairs(Block stairsBlock, Object baseBlock, int flags) {
if ((flags & 1) > 0) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stairsBlock, 4), " Q", " QQ", "QQQ", 'Q', baseBlock).setMirrored(false));
if ((flags & 2) > 0) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stairsBlock, 4), "Q ", "QQ ", "QQQ", 'Q', baseBlock).setMirrored(false));
}
}

0 comments on commit 742ea83

Please sign in to comment.