Make sure REI does compile (deactivated some code for the moment!)
This commit is contained in:
parent
49386dc7e1
commit
072e8b47db
4 changed files with 33 additions and 39 deletions
|
@ -54,7 +54,7 @@ public class REIAnvilCategory implements TransferDisplayCategory<REIAnvilDisplay
|
|||
List<EntryIngredient> inputEntries = display.getInputEntries();
|
||||
EntryIngredient materials = inputEntries.get(1);
|
||||
int anvilLevel = display.getAnvilLevel();
|
||||
Collection<EntryStack<?>> anvils = Arrays.stream(REIPlugin.ANVILS).filter(anvil -> {
|
||||
List anvils = Arrays.stream(REIPlugin.ANVILS).filter(anvil -> {
|
||||
Block block = ((BlockItem) anvil.getValue()).getBlock();
|
||||
if (block instanceof EndAnvilBlock) {
|
||||
return ((EndAnvilBlock) block).getCraftingLevel() >= anvilLevel;
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import me.shedaniel.rei.plugin.containers.CraftingContainerInfoWrapper;
|
||||
import me.shedaniel.rei.server.ContainerInfoHandler;
|
||||
import ru.betterend.client.gui.EndStoneSmelterScreenHandler;
|
||||
import ru.betterend.recipe.builders.AlloyingRecipe;
|
||||
|
||||
public class REIContainer implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
ContainerInfoHandler.registerContainerInfo(AlloyingRecipe.ID, CraftingContainerInfoWrapper.create(EndStoneSmelterScreenHandler.class));
|
||||
//ContainerInfoHandler.registerContainerInfo(AlloyingRecipe.ID, CraftingContainerInfoWrapper.create(EndStoneSmelterScreenHandler.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@ 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.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;
|
||||
|
@ -18,7 +16,6 @@ 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 java.util.List;
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package ru.betterend.integration.rei;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.rei.api.RecipeHelper;
|
||||
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 me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import me.shedaniel.rei.api.common.util.EntryStacks;
|
||||
import me.shedaniel.rei.impl.ClientInternals;
|
||||
import me.shedaniel.rei.plugin.common.DefaultPlugin;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.impl.content.registry.FuelRegistryImpl;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.BlastingRecipe;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import ru.bclib.blocks.BaseFurnaceBlock;
|
||||
import ru.betterend.BetterEnd;
|
||||
|
@ -22,6 +22,7 @@ import ru.betterend.recipe.builders.InfusionRecipe;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
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
|
||||
|
@ -34,17 +35,21 @@ public class REIPlugin implements REIClientPlugin {
|
|||
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);
|
||||
public final static EntryStack END_STONE_SMELTER = EntryStacks.of(EndBlocks.END_STONE_SMELTER);
|
||||
public final static EntryStack INFUSION_RITUAL = EntryStacks.of(EndBlocks.INFUSION_PEDESTAL);
|
||||
public final static EntryStack[] FURNACES;
|
||||
public final static EntryStack[] ANVILS;
|
||||
|
||||
@Override
|
||||
public ResourceLocation getPluginIdentifier() {
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
//@Override
|
||||
//public ResourceLocation getPluginIdentifier() {
|
||||
// return PLUGIN_ID;
|
||||
//}
|
||||
|
||||
//public REIPlugin() {
|
||||
// ClientInternals.attachInstance((Supplier<Object>) () -> this, PLUGIN_ID);
|
||||
//}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public void registerRecipeDisplays(RecipeHelper recipeHelper) {
|
||||
recipeHelper.registerRecipes(ALLOYING, AlloyingRecipe.class, REIAlloyingDisplay::new);
|
||||
recipeHelper.registerRecipes(ALLOYING, BlastingRecipe.class, REIAlloyingDisplay::new);
|
||||
|
@ -52,23 +57,10 @@ public class REIPlugin implements REIClientPlugin {
|
|||
recipeHelper.registerRecipes(INFUSION, InfusionRecipe.class, REIInfusionDisplay::new);
|
||||
FuelRegistryImpl.INSTANCE.getFuelTimes().forEach((item, time) -> {
|
||||
if (time >= 2000) {
|
||||
recipeHelper.registerDisplay(new REIAlloyingFuelDisplay(EntryStack.create(item), time));
|
||||
recipeHelper.registerDisplay(new REIAlloyingFuelDisplay(EntryStack.of(item), time));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOthers(RecipeHelper recipeHelper) {
|
||||
recipeHelper.registerWorkingStations(ALLOYING_FUEL, END_STONE_SMELTER);
|
||||
recipeHelper.registerWorkingStations(ALLOYING, END_STONE_SMELTER);
|
||||
recipeHelper.registerWorkingStations(INFUSION, INFUSION_RITUAL);
|
||||
recipeHelper.registerWorkingStations(SMITHING, ANVILS);
|
||||
recipeHelper.removeAutoCraftButton(ALLOYING_FUEL);
|
||||
recipeHelper.removeAutoCraftButton(SMITHING);
|
||||
|
||||
recipeHelper.registerWorkingStations(DefaultPlugin.SMELTING, FURNACES);
|
||||
recipeHelper.registerWorkingStations(DefaultPlugin.FUEL, FURNACES);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void registerCategories(CategoryRegistry registry) {
|
||||
|
@ -78,14 +70,24 @@ public class REIPlugin implements REIClientPlugin {
|
|||
new REIInfusionCategory(),
|
||||
new REIAnvilCategory()
|
||||
);
|
||||
|
||||
registry.addWorkstations(ALLOYING_FUEL, END_STONE_SMELTER);
|
||||
registry.addWorkstations(ALLOYING, END_STONE_SMELTER);
|
||||
registry.addWorkstations(INFUSION, INFUSION_RITUAL);
|
||||
registry.addWorkstations(SMITHING, ANVILS);
|
||||
registry.removePlusButton(ALLOYING_FUEL);
|
||||
registry.removePlusButton(SMITHING);
|
||||
|
||||
registry.addWorkstations(DefaultPlugin.SMELTING, FURNACES);
|
||||
registry.addWorkstations(DefaultPlugin.FUEL, FURNACES);
|
||||
}
|
||||
|
||||
static {
|
||||
List<EntryStack> anvils = Lists.newArrayList(EntryStack.ofItems(EndBlocks.getModBlocks().stream()
|
||||
List<EntryStack> anvils = Lists.newArrayList(EntryIngredients.ofItems(EndBlocks.getModBlocks().stream()
|
||||
.filter(EndAnvilBlock.class::isInstance).collect(Collectors.toList())));
|
||||
anvils.add(0, EntryStack.create(Blocks.ANVIL));
|
||||
anvils.add(0, EntryStacks.of(Blocks.ANVIL));
|
||||
ANVILS = anvils.toArray(new EntryStack[0]);
|
||||
FURNACES = Lists.newArrayList(EntryStack.ofItems(EndBlocks.getModBlocks().stream()
|
||||
FURNACES = Lists.newArrayList(EntryIngredients.ofItems(EndBlocks.getModBlocks().stream()
|
||||
.filter(BaseFurnaceBlock.class::isInstance).collect(Collectors.toList())))
|
||||
.toArray(new EntryStack[0]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue