Updated Tag API and tag constants
This commit is contained in:
parent
7ab5377a03
commit
db082ef1be
35 changed files with 308 additions and 385 deletions
|
@ -116,7 +116,7 @@ public class AnvilRecipe implements Recipe<Container>, UnknownReceipBookCategory
|
|||
|
||||
public boolean matches(Container craftingInventory) {
|
||||
ItemStack hammer = craftingInventory.getItem(1);
|
||||
if (hammer.isEmpty() || !TagAPI.ITEM_HAMMERS.contains(hammer.getItem())) {
|
||||
if (hammer.isEmpty() || !TagAPI.COMMON_ITEM_HAMMERS.contains(hammer.getItem())) {
|
||||
return false;
|
||||
}
|
||||
ItemStack material = craftingInventory.getItem(0);
|
||||
|
@ -140,7 +140,7 @@ public class AnvilRecipe implements Recipe<Container>, UnknownReceipBookCategory
|
|||
@Override
|
||||
public NonNullList<Ingredient> getIngredients() {
|
||||
NonNullList<Ingredient> defaultedList = NonNullList.create();
|
||||
defaultedList.add(Ingredient.of(TagAPI.ITEM_HAMMERS
|
||||
defaultedList.add(Ingredient.of(TagAPI.COMMON_ITEM_HAMMERS
|
||||
.getValues()
|
||||
.stream()
|
||||
.filter(hammer -> ((TieredItem) hammer).getTier().getLevel() >= toolLevel)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue