Fixed compiler errors for REI
This commit is contained in:
parent
78cc82932f
commit
108d2bd710
3 changed files with 31 additions and 28 deletions
|
@ -1,26 +1,28 @@
|
||||||
package ru.betterend.integration.rei;
|
package ru.betterend.integration.rei;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import it.unimi.dsi.fastutil.ints.IntList;
|
import it.unimi.dsi.fastutil.ints.IntList;
|
||||||
import me.shedaniel.math.Point;
|
import me.shedaniel.math.Point;
|
||||||
import me.shedaniel.math.Rectangle;
|
import me.shedaniel.math.Rectangle;
|
||||||
import me.shedaniel.rei.api.client.gui.widgets.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.gui.widgets.Widgets;
|
||||||
import me.shedaniel.rei.api.client.registry.display.TransferDisplayCategory;
|
import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
||||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||||
import net.minecraft.client.gui.GuiComponent;
|
import net.minecraft.client.gui.GuiComponent;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
import net.minecraft.network.chat.TranslatableComponent;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
public class REIAlloyingCategory implements DisplayCategory<REIAlloyingDisplay> {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class REIAlloyingCategory implements TransferDisplayCategory<REIAlloyingDisplay> {
|
|
||||||
private final EntryStack ICON;
|
private final EntryStack ICON;
|
||||||
|
|
||||||
REIAlloyingCategory(EntryStack icon) {
|
REIAlloyingCategory(EntryStack icon) {
|
||||||
|
@ -82,7 +84,8 @@ public class REIAlloyingCategory implements TransferDisplayCategory<REIAlloyingD
|
||||||
return widgets;
|
return widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
//TODO: 1.18 REI find replacement
|
||||||
|
//@Override
|
||||||
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIAlloyingDisplay display, IntList redSlots) {
|
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIAlloyingDisplay display, IntList redSlots) {
|
||||||
Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 27);
|
Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 27);
|
||||||
matrices.pushPose();
|
matrices.pushPose();
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
package ru.betterend.integration.rei;
|
package ru.betterend.integration.rei;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import it.unimi.dsi.fastutil.ints.IntList;
|
import it.unimi.dsi.fastutil.ints.IntList;
|
||||||
import me.shedaniel.math.Point;
|
import me.shedaniel.math.Point;
|
||||||
import me.shedaniel.math.Rectangle;
|
import me.shedaniel.math.Rectangle;
|
||||||
import me.shedaniel.rei.api.client.gui.widgets.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.gui.widgets.Widgets;
|
||||||
import me.shedaniel.rei.api.client.registry.display.TransferDisplayCategory;
|
import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
||||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||||
|
@ -18,14 +25,9 @@ import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import ru.betterend.blocks.basis.EndAnvilBlock;
|
import ru.betterend.blocks.basis.EndAnvilBlock;
|
||||||
|
|
||||||
import java.util.Arrays;
|
public class REIAnvilCategory implements DisplayCategory<REIAnvilDisplay> {
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class REIAnvilCategory implements TransferDisplayCategory<REIAnvilDisplay> {
|
|
||||||
private final EntryStack<?>[] ANVILS;
|
private final EntryStack<?>[] ANVILS;
|
||||||
|
|
||||||
REIAnvilCategory(EntryStack<?>[] anvils) {
|
REIAnvilCategory(EntryStack<?>[] anvils) {
|
||||||
|
@ -86,7 +88,8 @@ public class REIAnvilCategory implements TransferDisplayCategory<REIAnvilDisplay
|
||||||
return widgets;
|
return widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
//TODO: 1.18 REI, find replacement
|
||||||
|
//@Override
|
||||||
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIAnvilDisplay display, IntList redSlots) {
|
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIAnvilDisplay display, IntList redSlots) {
|
||||||
Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 27);
|
Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 27);
|
||||||
matrices.pushPose();
|
matrices.pushPose();
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
package ru.betterend.integration.rei;
|
package ru.betterend.integration.rei;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
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.Point;
|
||||||
import me.shedaniel.math.Rectangle;
|
import me.shedaniel.math.Rectangle;
|
||||||
import me.shedaniel.rei.api.client.gui.widgets.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.gui.widgets.Widgets;
|
||||||
import me.shedaniel.rei.api.client.registry.display.TransferDisplayCategory;
|
import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
||||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
import net.minecraft.network.chat.TranslatableComponent;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public class REIInfusionCategory implements DisplayCategory<REIInfusionDisplay> {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class REIInfusionCategory implements TransferDisplayCategory<REIInfusionDisplay> {
|
|
||||||
|
|
||||||
private final static ResourceLocation BACKGROUND = BetterEnd.makeID("textures/gui/rei_infusion.png");
|
private final static ResourceLocation BACKGROUND = BetterEnd.makeID("textures/gui/rei_infusion.png");
|
||||||
private final EntryStack ICON;
|
private final EntryStack ICON;
|
||||||
|
@ -109,7 +109,4 @@ public class REIInfusionCategory implements TransferDisplayCategory<REIInfusionD
|
||||||
public int getDisplayHeight() {
|
public int getDisplayHeight() {
|
||||||
return 104;
|
return 104;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIInfusionDisplay display, IntList redSlots) {}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue