Fixed recipe configs
This commit is contained in:
parent
8a93be6ba6
commit
301701353f
4 changed files with 9 additions and 10 deletions
|
@ -140,13 +140,12 @@ public class AnvilRecipe implements Recipe<Container>, UnknownReceipBookCategory
|
||||||
@Override
|
@Override
|
||||||
public NonNullList<Ingredient> getIngredients() {
|
public NonNullList<Ingredient> getIngredients() {
|
||||||
NonNullList<Ingredient> defaultedList = NonNullList.create();
|
NonNullList<Ingredient> defaultedList = NonNullList.create();
|
||||||
defaultedList.add(Ingredient.of(TagAPI.ITEM_HAMMERS.getValues()
|
defaultedList.add(Ingredient.of(TagAPI.ITEM_HAMMERS
|
||||||
.stream()
|
.getValues()
|
||||||
.filter(hammer -> ((TieredItem) hammer).getTier()
|
.stream()
|
||||||
.getLevel() >= toolLevel)
|
.filter(hammer -> ((TieredItem) hammer).getTier().getLevel() >= toolLevel)
|
||||||
.map(ItemStack::new)));
|
.map(ItemStack::new)));
|
||||||
defaultedList.add(input);
|
defaultedList.add(input);
|
||||||
|
|
||||||
return defaultedList;
|
return defaultedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +251,7 @@ public class AnvilRecipe implements Recipe<Container>, UnknownReceipBookCategory
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder checkConfig(PathConfig config) {
|
public Builder checkConfig(PathConfig config) {
|
||||||
exist |= config.getBoolean("anvil", id.getPath(), true);
|
exist &= config.getBoolean("anvil", id.getPath(), true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class FurnaceRecipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
public FurnaceRecipe checkConfig(PathConfig config) {
|
public FurnaceRecipe checkConfig(PathConfig config) {
|
||||||
exist |= config.getBoolean("furnace", id.getPath(), true);
|
exist &= config.getBoolean("furnace", id.getPath(), true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class GridRecipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
public GridRecipe checkConfig(PathConfig config) {
|
public GridRecipe checkConfig(PathConfig config) {
|
||||||
exist |= config.getBoolean("grid", id.getPath(), true);
|
exist &= config.getBoolean("grid", id.getPath(), true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class SmithingTableRecipe {
|
||||||
private SmithingTableRecipe() {}
|
private SmithingTableRecipe() {}
|
||||||
|
|
||||||
public SmithingTableRecipe checkConfig(PathConfig config) {
|
public SmithingTableRecipe checkConfig(PathConfig config) {
|
||||||
exist |= config.getBoolean("smithing", id.getPath(), true);
|
exist &= config.getBoolean("smithing", id.getPath(), true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue