Continued work on **rei**
This commit is contained in:
parent
aa1b0d87bb
commit
49386dc7e1
7 changed files with 120 additions and 165 deletions
|
@ -27,7 +27,7 @@ public class REIAlloyingCategory implements TransferDisplayCategory<REIAlloyingD
|
|||
|
||||
@Override
|
||||
public @NotNull CategoryIdentifier getCategoryIdentifier() {
|
||||
return AlloyingRecipe.ID;
|
||||
return REIPlugin.ALLOYING;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,11 +76,6 @@ public class REIAlloyingCategory implements TransferDisplayCategory<REIAlloyingD
|
|||
matrices.popPose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DisplayRenderer getDisplayRenderer(REIAlloyingDisplay recipe) {
|
||||
return SimpleDisplayRenderer.from(recipe.getInputEntries(), recipe.getOutputEntries());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDisplayHeight() {
|
||||
return 49;
|
||||
|
|
|
@ -28,8 +28,6 @@ public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDi
|
|||
private Recipe<?> recipe;
|
||||
private float xp;
|
||||
private double smeltTime;
|
||||
|
||||
|
||||
|
||||
public REIAlloyingDisplay(AlloyingRecipe recipe) {
|
||||
super(
|
||||
|
@ -62,7 +60,7 @@ public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDi
|
|||
|
||||
@Override
|
||||
public CategoryIdentifier<?> getCategoryIdentifier() {
|
||||
return AlloyingRecipe.ID;
|
||||
return REIPlugin.ALLOYING;
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
|
|
@ -1,49 +1,47 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.api.TransferRecipeCategory;
|
||||
import me.shedaniel.rei.api.widgets.Widgets;
|
||||
import me.shedaniel.rei.gui.entries.RecipeEntry;
|
||||
import me.shedaniel.rei.gui.entries.SimpleRecipeEntry;
|
||||
import me.shedaniel.rei.gui.widget.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
|
||||
import me.shedaniel.rei.api.client.registry.display.TransferDisplayCategory;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import net.minecraft.client.gui.GuiComponent;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import ru.betterend.blocks.basis.EndAnvilBlock;
|
||||
import ru.betterend.util.LangUtil;
|
||||
|
||||
public class REIAnvilCategory implements TransferRecipeCategory<REIAnvilDisplay> {
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class REIAnvilCategory implements TransferDisplayCategory<REIAnvilDisplay> {
|
||||
|
||||
@Override
|
||||
public @NotNull ResourceLocation getIdentifier() {
|
||||
public @NotNull CategoryIdentifier getCategoryIdentifier() {
|
||||
return REIPlugin.SMITHING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getCategoryName() {
|
||||
return LangUtil.translate(Blocks.ANVIL.getDescriptionId());
|
||||
public @NotNull Component getTitle() {
|
||||
return new TranslatableComponent(Blocks.ANVIL.getDescriptionId());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull EntryStack getLogo() {
|
||||
public @NotNull EntryStack getIcon() {
|
||||
return REIPlugin.ANVILS[0];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull List<Widget> setupDisplay(REIAnvilDisplay display, Rectangle bounds) {
|
||||
|
@ -53,23 +51,23 @@ public class REIAnvilCategory implements TransferRecipeCategory<REIAnvilDisplay>
|
|||
int x = startPoint.x + 10;
|
||||
int y = startPoint.y;
|
||||
widgets.add(Widgets.createResultSlotBackground(new Point(x + 61, y + 5)));
|
||||
List<List<EntryStack>> inputEntries = display.getInputEntries();
|
||||
List<EntryStack> materials = inputEntries.get(1);
|
||||
List<EntryIngredient> inputEntries = display.getInputEntries();
|
||||
EntryIngredient materials = inputEntries.get(1);
|
||||
int anvilLevel = display.getAnvilLevel();
|
||||
List<EntryStack> anvils = Arrays.stream(REIPlugin.ANVILS).filter(anvil -> {
|
||||
Block block = ((BlockItem) anvil.getItem()).getBlock();
|
||||
Collection<EntryStack<?>> anvils = Arrays.stream(REIPlugin.ANVILS).filter(anvil -> {
|
||||
Block block = ((BlockItem) anvil.getValue()).getBlock();
|
||||
if (block instanceof EndAnvilBlock) {
|
||||
return ((EndAnvilBlock) block).getCraftingLevel() >= anvilLevel;
|
||||
}
|
||||
return anvilLevel == 1;
|
||||
}).collect(Collectors.toList());
|
||||
materials.forEach(entryStack -> entryStack.setAmount(display.getInputCount()));
|
||||
//materials.forEach(entryStack -> entryStack.setAmount(display.getInputCount()));
|
||||
widgets.add(Widgets.createArrow(new Point(x + 24, y + 4)));
|
||||
widgets.add(Widgets.createLabel(new Point(bounds.x + bounds.width - 7, bounds.y + bounds.height - 15),
|
||||
new TranslatableComponent("category.rei.damage.amount&dmg", display.getDamage())).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
widgets.add(Widgets.createSlot(new Point(x - 20, y + 4)).entries(materials).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 1, y + 4)).entries(inputEntries.get(0)).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 61, y + 5)).entries(display.getResultingEntries().get(0)).disableBackground().markOutput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 61, y + 5)).entries(display.getOutputEntries().get(0)).disableBackground().markOutput());
|
||||
widgets.add(Widgets.createSlot(new Point(x - 9, y + 25)).entries(anvils));
|
||||
|
||||
return widgets;
|
||||
|
@ -88,11 +86,6 @@ public class REIAnvilCategory implements TransferRecipeCategory<REIAnvilDisplay>
|
|||
matrices.popPose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull RecipeEntry getSimpleRenderer(REIAnvilDisplay recipe) {
|
||||
return SimpleRecipeEntry.from(Collections.singletonList(recipe.getInputEntries().get(0)), recipe.getResultingEntries());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDisplayHeight() {
|
||||
return 60;
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.api.TransferRecipeDisplay;
|
||||
import me.shedaniel.rei.server.ContainerInfo;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
|
||||
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
|
||||
import me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import ru.betterend.recipe.builders.AnvilRecipe;
|
||||
|
||||
public class REIAnvilDisplay implements TransferRecipeDisplay {
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
|
||||
public class REIAnvilDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
|
||||
|
||||
private final AnvilRecipe recipe;
|
||||
private final List<List<EntryStack>> input;
|
||||
private final List<EntryStack> output;
|
||||
|
||||
public REIAnvilDisplay(AnvilRecipe recipe) {
|
||||
super(
|
||||
EntryIngredients.ofIngredients(recipe.getIngredients()),
|
||||
Collections.singletonList(EntryIngredients.of(recipe.getResultItem()))
|
||||
);
|
||||
this.recipe = recipe;
|
||||
this.input = EntryStack.ofIngredients(recipe.getIngredients());
|
||||
this.output = Collections.singletonList(EntryStack.create(recipe.getResultItem()));
|
||||
}
|
||||
|
||||
public int getDamage() {
|
||||
|
@ -37,31 +35,21 @@ public class REIAnvilDisplay implements TransferRecipeDisplay {
|
|||
public int getAnvilLevel() {
|
||||
return recipe.getAnvilLevel();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull Optional<ResourceLocation> getRecipeLocation() {
|
||||
public @NotNull Optional<ResourceLocation> getDisplayLocation() {
|
||||
return Optional.ofNullable(recipe).map(Recipe::getId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getInputEntries() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getResultingEntries() {
|
||||
return Collections.singletonList(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ResourceLocation getRecipeCategory() {
|
||||
public CategoryIdentifier<?> getCategoryIdentifier() {
|
||||
return REIPlugin.SMITHING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getRequiredEntries() {
|
||||
return input;
|
||||
}
|
||||
// @Override
|
||||
// public @NotNull List<List<EntryStack>> getRequiredEntries() {
|
||||
// return input;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public int getWidth() {
|
||||
|
@ -73,9 +61,9 @@ public class REIAnvilDisplay implements TransferRecipeDisplay {
|
|||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<List<EntryStack>> getOrganisedInputEntries(ContainerInfo<AbstractContainerMenu> containerInfo,
|
||||
AbstractContainerMenu container) {
|
||||
return input;
|
||||
}
|
||||
// @Override
|
||||
// public List<List<EntryStack>> getOrganisedInputEntries(ContainerInfo<AbstractContainerMenu> containerInfo,
|
||||
// AbstractContainerMenu container) {
|
||||
// return input;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,59 +1,55 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.api.TransferRecipeCategory;
|
||||
import me.shedaniel.rei.api.widgets.Widgets;
|
||||
import me.shedaniel.rei.gui.entries.RecipeEntry;
|
||||
import me.shedaniel.rei.gui.entries.SimpleRecipeEntry;
|
||||
import me.shedaniel.rei.gui.widget.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
|
||||
import me.shedaniel.rei.api.client.gui.SimpleDisplayRenderer;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
|
||||
import me.shedaniel.rei.api.client.registry.display.TransferDisplayCategory;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.recipe.builders.InfusionRecipe;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.LangUtil;
|
||||
|
||||
public class REIInfusionCategory implements TransferRecipeCategory<REIInfusionDisplay> {
|
||||
import java.util.List;
|
||||
|
||||
public class REIInfusionCategory implements TransferDisplayCategory<REIInfusionDisplay> {
|
||||
|
||||
private final static ResourceLocation BACKGROUND = BetterEnd.makeID("textures/gui/rei_infusion.png");
|
||||
|
||||
@Override
|
||||
public @NotNull ResourceLocation getIdentifier() {
|
||||
return InfusionRecipe.ID;
|
||||
public @NotNull CategoryIdentifier getCategoryIdentifier() {
|
||||
return REIPlugin.INFUSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getCategoryName() {
|
||||
return LangUtil.translate(EndBlocks.INFUSION_PEDESTAL.getDescriptionId());
|
||||
public @NotNull Component getTitle() {
|
||||
return new TranslatableComponent(EndBlocks.INFUSION_PEDESTAL.getDescriptionId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull EntryStack getLogo() {
|
||||
public @NotNull EntryStack getIcon() {
|
||||
return REIPlugin.INFUSION_RITUAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull RecipeEntry getSimpleRenderer(REIInfusionDisplay recipe) {
|
||||
return SimpleRecipeEntry.from(recipe.getInputEntries(), recipe.getResultingEntries());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull List<Widget> setupDisplay(REIInfusionDisplay display, Rectangle bounds) {
|
||||
Point centerPoint = new Point(bounds.getCenterX() - 34, bounds.getCenterY() - 2);
|
||||
List<Widget> widgets = Lists.newArrayList();
|
||||
widgets.add(Widgets.createRecipeBase(bounds));
|
||||
List<List<EntryStack>> inputEntries = display.getInputEntries();
|
||||
List<List<EntryStack>> outputEntries = display.getResultingEntries();
|
||||
List<EntryIngredient> inputEntries = display.getInputEntries();
|
||||
List<EntryIngredient> outputEntries = display.getOutputEntries();
|
||||
widgets.add(Widgets.createTexturedWidget(BACKGROUND, bounds.x, bounds.y, 0, 0, 150, 104, 150, 104));
|
||||
widgets.add(Widgets.createSlot(centerPoint).entries(inputEntries.get(0)).disableBackground().markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(centerPoint.x, centerPoint.y - 28)).entries(inputEntries.get(1)).disableBackground().markInput());
|
||||
|
@ -69,13 +65,14 @@ public class REIInfusionCategory implements TransferRecipeCategory<REIInfusionDi
|
|||
.noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
return widgets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds,
|
||||
REIInfusionDisplay display, IntList redSlots) {}
|
||||
|
||||
@Override
|
||||
public int getDisplayHeight() {
|
||||
return 104;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIInfusionDisplay display, IntList redSlots) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,38 +1,29 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.api.TransferRecipeDisplay;
|
||||
import me.shedaniel.rei.server.ContainerInfo;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
|
||||
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
|
||||
import me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import ru.betterend.recipe.builders.AlloyingRecipe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import ru.betterend.recipe.builders.InfusionRecipe;
|
||||
|
||||
public class REIInfusionDisplay implements TransferRecipeDisplay {
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
|
||||
public class REIInfusionDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
|
||||
|
||||
private final InfusionRecipe recipe;
|
||||
private final List<List<EntryStack>> input;
|
||||
private final List<EntryStack> output;
|
||||
private final int time;
|
||||
|
||||
public REIInfusionDisplay(InfusionRecipe recipe) {
|
||||
super(
|
||||
EntryIngredients.ofIngredients(recipe.getIngredients()),
|
||||
Collections.singletonList(EntryIngredients.of(recipe.getResultItem()))
|
||||
);
|
||||
this.recipe = recipe;
|
||||
this.input = Lists.newArrayList();
|
||||
this.output = Collections.singletonList(EntryStack.create(recipe.getResultItem()));
|
||||
this.time = recipe.getInfusionTime();
|
||||
|
||||
recipe.getIngredients().forEach(ingredient -> {
|
||||
input.add(EntryStack.ofIngredient(ingredient));
|
||||
});
|
||||
}
|
||||
|
||||
public int getInfusionTime() {
|
||||
|
@ -40,29 +31,19 @@ public class REIInfusionDisplay implements TransferRecipeDisplay {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Optional<ResourceLocation> getRecipeLocation() {
|
||||
public @NotNull Optional<ResourceLocation> getDisplayLocation() {
|
||||
return Optional.ofNullable(recipe).map(Recipe::getId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getInputEntries() {
|
||||
return this.input;
|
||||
public CategoryIdentifier<?> getCategoryIdentifier() {
|
||||
return REIPlugin.INFUSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getResultingEntries() {
|
||||
return Collections.singletonList(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ResourceLocation getRecipeCategory() {
|
||||
return AlloyingRecipe.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<List<EntryStack>> getRequiredEntries() {
|
||||
return this.input;
|
||||
}
|
||||
// @Override
|
||||
// public @NotNull List<List<EntryStack>> getRequiredEntries() {
|
||||
// return this.input;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public int getWidth() {
|
||||
|
@ -74,8 +55,8 @@ public class REIInfusionDisplay implements TransferRecipeDisplay {
|
|||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<List<EntryStack>> getOrganisedInputEntries(ContainerInfo<AbstractContainerMenu> containerInfo, AbstractContainerMenu container) {
|
||||
return this.input;
|
||||
}
|
||||
// @Override
|
||||
// public List<List<EntryStack>> getOrganisedInputEntries(ContainerInfo<AbstractContainerMenu> containerInfo, AbstractContainerMenu container) {
|
||||
// return this.input;
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.api.RecipeHelper;
|
||||
import me.shedaniel.rei.api.plugins.REIPluginV0;
|
||||
import me.shedaniel.rei.api.client.plugins.REIClientPlugin;
|
||||
import me.shedaniel.rei.api.client.registry.category.CategoryRegistry;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import me.shedaniel.rei.plugin.DefaultPlugin;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
@ -23,14 +21,18 @@ import ru.betterend.recipe.builders.AnvilRecipe;
|
|||
import ru.betterend.recipe.builders.InfusionRecipe;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
//https://github.com/shedaniel/RoughlyEnoughItems/blob/6.x-1.17/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/DefaultClientPlugin.java
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class REIPlugin implements REIPluginV0 {
|
||||
public class REIPlugin implements REIClientPlugin {
|
||||
|
||||
public final static ResourceLocation PLUGIN_ID = BetterEnd.makeID("rei_plugin");
|
||||
public final static ResourceLocation ALLOYING_FUEL = BetterEnd.makeID("alloying_fuel");
|
||||
public final static ResourceLocation ALLOYING = AlloyingRecipe.ID;
|
||||
public final static ResourceLocation SMITHING = AnvilRecipe.ID;
|
||||
public final static ResourceLocation INFUSION = InfusionRecipe.ID;
|
||||
public final static CategoryIdentifier ALLOYING_FUEL = CategoryIdentifier.of(BetterEnd.MOD_ID, "alloying_fuel");
|
||||
public final static CategoryIdentifier ALLOYING = AlloyingRecipe.ID;
|
||||
public final static CategoryIdentifier SMITHING = CategoryIdentifier.of(BetterEnd.MOD_ID, AnvilRecipe.ID.getPath());
|
||||
public final static CategoryIdentifier INFUSION = InfusionRecipe.ID;
|
||||
|
||||
public final static EntryStack END_STONE_SMELTER = EntryStack.create(EndBlocks.END_STONE_SMELTER);
|
||||
public final static EntryStack INFUSION_RITUAL = EntryStack.create(EndBlocks.INFUSION_PEDESTAL);
|
||||
|
@ -69,12 +71,13 @@ public class REIPlugin implements REIPluginV0 {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerPluginCategories(RecipeHelper recipeHelper) {
|
||||
recipeHelper.registerCategories(
|
||||
public void registerCategories(CategoryRegistry registry) {
|
||||
registry.add(
|
||||
new REIAlloyingFuelCategory(),
|
||||
new REIAlloyingCategory(),
|
||||
new REIInfusionCategory(),
|
||||
new REIAnvilCategory());
|
||||
new REIAnvilCategory()
|
||||
);
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue