Skip to content

Commit

Permalink
Fixed recipe configs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulevsGitch committed Nov 30, 2021
1 parent 8a93be6 commit 3017013
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
13 changes: 6 additions & 7 deletions src/main/java/ru/bclib/recipes/AnvilRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,12 @@ public int getAnvilLevel() {
@Override
public NonNullList<Ingredient> getIngredients() {
NonNullList<Ingredient> defaultedList = NonNullList.create();
defaultedList.add(Ingredient.of(TagAPI.ITEM_HAMMERS.getValues()
.stream()
.filter(hammer -> ((TieredItem) hammer).getTier()
.getLevel() >= toolLevel)
.map(ItemStack::new)));
defaultedList.add(Ingredient.of(TagAPI.ITEM_HAMMERS
.getValues()
.stream()
.filter(hammer -> ((TieredItem) hammer).getTier().getLevel() >= toolLevel)
.map(ItemStack::new)));
defaultedList.add(input);

return defaultedList;
}

Expand Down Expand Up @@ -252,7 +251,7 @@ public Builder setDamage(int damage) {
}

public Builder checkConfig(PathConfig config) {
exist |= config.getBoolean("anvil", id.getPath(), true);
exist &= config.getBoolean("anvil", id.getPath(), true);
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/bclib/recipes/FurnaceRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static FurnaceRecipe make(String modID, String name, ItemLike input, Item
}

public FurnaceRecipe checkConfig(PathConfig config) {
exist |= config.getBoolean("furnace", id.getPath(), true);
exist &= config.getBoolean("furnace", id.getPath(), true);
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/bclib/recipes/GridRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static GridRecipe make(ResourceLocation id, ItemLike output) {
}

public GridRecipe checkConfig(PathConfig config) {
exist |= config.getBoolean("grid", id.getPath(), true);
exist &= config.getBoolean("grid", id.getPath(), true);
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/bclib/recipes/SmithingTableRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static SmithingTableRecipe create(ResourceLocation id) {
private SmithingTableRecipe() {}

public SmithingTableRecipe checkConfig(PathConfig config) {
exist |= config.getBoolean("smithing", id.getPath(), true);
exist &= config.getBoolean("smithing", id.getPath(), true);
return this;
}

Expand Down

0 comments on commit 3017013

Please sign in to comment.