2025-11-24 22:52:51 +03:00

32 lines
814 B
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.world.item.crafting;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeInput;
public record SmithingRecipeInput(ItemStack template, ItemStack base, ItemStack addition) implements RecipeInput
{
@Override
public ItemStack getItem(int index) {
return switch (index) {
case 0 -> this.template;
case 1 -> this.base;
case 2 -> this.addition;
default -> throw new IllegalArgumentException("Recipe does not contain slot " + index);
};
}
@Override
public int size() {
return 3;
}
@Override
public boolean isEmpty() {
return this.template.isEmpty() && this.base.isEmpty() && this.addition.isEmpty();
}
}