9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2026-01-04 15:31:51 +00:00

Added craftable option to each set piece

This commit is contained in:
Auxilor
2021-02-23 17:35:10 +00:00
parent edcf12578b
commit 705467f37e
5 changed files with 29 additions and 7 deletions

View File

@@ -308,16 +308,18 @@ public class ArmorSet {
private void constructRecipe(@NotNull final ArmorSlot slot,
@NotNull final ItemStack out) {
EcoShapedRecipe.Builder builder = EcoShapedRecipe.builder(PLUGIN, this.getName() + "_" + slot.name().toLowerCase()).setOutput(out);
if (this.getConfig().getBool(slot.name().toLowerCase() + ".craftable")) {
EcoShapedRecipe.Builder builder = EcoShapedRecipe.builder(PLUGIN, this.getName() + "_" + slot.name().toLowerCase()).setOutput(out);
List<String> recipeStrings = this.getConfig().getStrings(slot.name().toLowerCase() + ".recipe");
List<String> recipeStrings = this.getConfig().getStrings(slot.name().toLowerCase() + ".recipe");
for (int i = 0; i < 9; i++) {
builder.setRecipePart(i, RecipeParts.lookup(recipeStrings.get(i)));
for (int i = 0; i < 9; i++) {
builder.setRecipePart(i, RecipeParts.lookup(recipeStrings.get(i)));
}
EcoShapedRecipe recipe = builder.build();
recipe.register();
}
EcoShapedRecipe recipe = builder.build();
recipe.register();
}
/**

View File

@@ -49,6 +49,7 @@ helmet:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- ender_eye
- ender_eye
@@ -81,6 +82,7 @@ chestplate:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- ender_eye
- ender_eye
@@ -111,6 +113,7 @@ elytra:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- ender_eye
- ender_eye
@@ -143,6 +146,7 @@ leggings:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- ender_eye
- ender_eye
@@ -175,6 +179,7 @@ boots:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- ender_eye
- ender_eye

View File

@@ -51,6 +51,7 @@ helmet:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- diamond_pickaxe
@@ -83,6 +84,7 @@ chestplate:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- diamond_pickaxe
@@ -113,6 +115,7 @@ elytra:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- diamond_pickaxe
@@ -145,6 +148,7 @@ leggings:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- diamond_pickaxe
@@ -177,6 +181,7 @@ boots:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- diamond_pickaxe

View File

@@ -45,6 +45,7 @@ helmet:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- nether_star
@@ -76,6 +77,7 @@ chestplate:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- nether_star
@@ -105,6 +107,7 @@ elytra:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- nether_star
@@ -136,6 +139,7 @@ leggings:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- nether_star
@@ -167,6 +171,7 @@ boots:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- nether_star

View File

@@ -49,6 +49,7 @@ helmet:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- diamond
- redstone
@@ -80,6 +81,7 @@ chestplate:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- diamond
- air
@@ -109,6 +111,7 @@ elytra:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- redstone
@@ -140,6 +143,7 @@ leggings:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- diamond
- redstone
@@ -172,6 +176,7 @@ boots:
- ""
- "&fTier: %tier%"
- "&8&oUpgrade with an Upgrade Crystal"
craftable: true
recipe:
- air
- air