New ores recipes & smelter light fix
This commit is contained in:
parent
2591cb1555
commit
43e127bf75
7 changed files with 33 additions and 17 deletions
|
@ -1,23 +1,31 @@
|
|||
package ru.betterend.recipe;
|
||||
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import ru.betterend.recipe.builders.AlloyingRecipe;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.registry.EndTags;
|
||||
|
||||
public class AlloyingRecipes {
|
||||
public static void register() {
|
||||
AlloyingRecipe.Builder.create("additional_iron")
|
||||
.setInput(Blocks.IRON_ORE, Blocks.IRON_ORE)
|
||||
.setInput(EndTags.ALLOYING_IRON, EndTags.ALLOYING_IRON)
|
||||
.setOutput(Items.IRON_INGOT, 3)
|
||||
.setExpiriense(2.1F)
|
||||
.build();
|
||||
AlloyingRecipe.Builder.create("additional_gold")
|
||||
.setInput(Blocks.GOLD_ORE, Blocks.GOLD_ORE)
|
||||
.setInput(EndTags.ALLOYING_GOLD, EndTags.ALLOYING_GOLD)
|
||||
.setOutput(Items.GOLD_INGOT, 3)
|
||||
.setExpiriense(3F)
|
||||
.build();
|
||||
AlloyingRecipe.Builder.create("additional_gold")
|
||||
.setInput(EndTags.ALLOYING_COPPER, EndTags.ALLOYING_COPPER)
|
||||
.setOutput(Items.COPPER_INGOT, 3)
|
||||
.setExpiriense(3F)
|
||||
.build();
|
||||
AlloyingRecipe.Builder.create("additional_netherite")
|
||||
.setInput(Blocks.ANCIENT_DEBRIS, Blocks.ANCIENT_DEBRIS)
|
||||
.setOutput(Items.NETHERITE_SCRAP, 3)
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer;
|
|||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.Level;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.recipes.BCLRecipeManager;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.config.Configs;
|
||||
|
@ -98,7 +99,7 @@ public class AnvilRecipe implements Recipe<Container>, BetterEndRecipe {
|
|||
|
||||
public boolean matches(Container craftingInventory) {
|
||||
ItemStack hammer = craftingInventory.getItem(1);
|
||||
if (hammer.isEmpty() || !EndTags.HAMMERS.contains(hammer.getItem())) {
|
||||
if (hammer.isEmpty() || !TagAPI.HAMMERS.contains(hammer.getItem())) {
|
||||
return false;
|
||||
}
|
||||
ItemStack material = craftingInventory.getItem(0);
|
||||
|
@ -124,7 +125,7 @@ public class AnvilRecipe implements Recipe<Container>, BetterEndRecipe {
|
|||
@Override
|
||||
public NonNullList<Ingredient> getIngredients() {
|
||||
NonNullList<Ingredient> defaultedList = NonNullList.create();
|
||||
defaultedList.add(Ingredient.of(EndTags.HAMMERS.getValues().stream().filter(hammer ->
|
||||
defaultedList.add(Ingredient.of(TagAPI.HAMMERS.getValues().stream().filter(hammer ->
|
||||
((TieredItem) hammer).getTier().getLevel() >= toolLevel).map(ItemStack::new)));
|
||||
defaultedList.add(input);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue