Start migration
This commit is contained in:
parent
6630ce0cab
commit
47ed597358
491 changed files with 12045 additions and 11953 deletions
|
@ -9,23 +9,23 @@ import org.jetbrains.annotations.NotNull;
|
|||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.api.TransferRecipeDisplay;
|
||||
import me.shedaniel.rei.server.ContainerInfo;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import ru.betterend.recipe.builders.AnvilRecipe;
|
||||
|
||||
public class REIAnvilDisplay implements TransferRecipeDisplay {
|
||||
|
||||
|
||||
private final AnvilRecipe recipe;
|
||||
private final List<List<EntryStack>> input;
|
||||
private final List<EntryStack> output;
|
||||
|
||||
|
||||
public REIAnvilDisplay(AnvilRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
this.input = EntryStack.ofIngredients(recipe.getPreviewInputs());
|
||||
this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
|
||||
}
|
||||
|
||||
|
||||
public int getDamage() {
|
||||
return recipe.getDamage();
|
||||
}
|
||||
|
@ -37,9 +37,9 @@ public class REIAnvilDisplay implements TransferRecipeDisplay {
|
|||
public int getAnvilLevel() {
|
||||
return recipe.getAnvilLevel();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull Optional<Identifier> getRecipeLocation() {
|
||||
public @NotNull Optional<ResourceLocation> getRecipeLocation() {
|
||||
return Optional.ofNullable(recipe).map(Recipe::getId);
|
||||
}
|
||||
|
||||
|
@ -47,17 +47,17 @@ public class REIAnvilDisplay implements TransferRecipeDisplay {
|
|||
public @NotNull List<List<EntryStack>> getInputEntries() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getResultingEntries() {
|
||||
return Collections.singletonList(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Identifier getRecipeCategory() {
|
||||
public @NotNull ResourceLocation getRecipeCategory() {
|
||||
return REIPlugin.SMITHING;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getRequiredEntries() {
|
||||
return input;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue