Skip to content

Commit

Permalink
feat: add new crafting recipes for rails and powered rails (#126)
Browse files Browse the repository at this point in the history
- Updated the crafting recipe for rails so it yields 64 rails per craft.
- Updated the crafting recipe for powered rails so it yields 32 powered rails per craft.
- Updated the `registerAllCraftingRecipes` method to include the new recipes.
  • Loading branch information
Xavbeat03 authored Sep 22, 2024
1 parent 6dc3fc3 commit 672fe9d
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,29 @@ public static void pinkPetalsRecipe() {
AlathraExtras.getInstance().getServer().addRecipe(pinkPetalsRecipe);
}

public static void railsRecipe() {
ItemStack rails = new ItemStack(Material.RAIL, 64);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "railsRecipe");
ShapedRecipe railsRecipe = new ShapedRecipe(key, rails);
railsRecipe.shape("I I", "ISI", "I I");
railsRecipe.setIngredient('I', Material.IRON_INGOT);
railsRecipe.setIngredient('S', Material.STICK);
AlathraExtras.getInstance().getServer().addRecipe(railsRecipe);
}

public static void poweredRailsRecipe() {
ItemStack poweredRails = new ItemStack(Material.POWERED_RAIL, 24);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "poweredRailsRecipe");
ShapedRecipe poweredRailsRecipe = new ShapedRecipe(key, poweredRails);
poweredRailsRecipe.shape("G G", "GSG", "GRG");
poweredRailsRecipe.setIngredient('G', Material.GOLD_INGOT);
poweredRailsRecipe.setIngredient('S', Material.STICK);
poweredRailsRecipe.setIngredient('R', Material.REDSTONE);
AlathraExtras.getInstance().getServer().addRecipe(poweredRailsRecipe);
}

public static void stonesToGravel(int a) {
for (int b = 0; b <= a; b++) {
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
Expand Down Expand Up @@ -674,5 +697,7 @@ public static void registerAllCraftingRecipes() {
mustacheRecipe();
crownRecipe();
wreathRecipe();
railsRecipe();
poweredRailsRecipe();
}
}

0 comments on commit 672fe9d

Please sign in to comment.