diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-03-09 23:17:05 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-03-09 23:17:05 +0800 |
| commit | de461fde691f593b85ffeae837b5b419a9abf7cc (patch) | |
| tree | cec6e08c99427eddf9eef5e19d04edca56d3d0d4 /runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java | |
| parent | 64bc9937d6ec04c6d66240a84b4fb345026c0b12 (diff) | |
| download | RoughlyEnoughItems-de461fde691f593b85ffeae837b5b419a9abf7cc.tar.gz RoughlyEnoughItems-de461fde691f593b85ffeae837b5b419a9abf7cc.tar.bz2 RoughlyEnoughItems-de461fde691f593b85ffeae837b5b419a9abf7cc.zip | |
Use AbstractRecipeViewingScreen and remove static from ScreenHelper
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java b/runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java index 938e996bf..4abe7aa01 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/InternalWidgets.java @@ -28,20 +28,20 @@ import com.mojang.blaze3d.vertex.PoseStack; import it.unimi.dsi.fastutil.ints.IntList; import me.shedaniel.math.Rectangle; import me.shedaniel.math.impl.PointHelper; -import me.shedaniel.rei.api.*; -import me.shedaniel.rei.api.registry.display.Display; -import me.shedaniel.rei.api.registry.display.DisplayCategory; +import me.shedaniel.rei.api.ConfigObject; +import me.shedaniel.rei.api.REIHelper; import me.shedaniel.rei.api.gui.widgets.Button; +import me.shedaniel.rei.api.gui.widgets.Widget; +import me.shedaniel.rei.api.gui.widgets.WidgetWithBounds; import me.shedaniel.rei.api.gui.widgets.Widgets; -import me.shedaniel.rei.api.registry.display.DisplayRegistry; +import me.shedaniel.rei.api.registry.display.Display; +import me.shedaniel.rei.api.registry.display.DisplayCategory; import me.shedaniel.rei.api.registry.display.TransferDisplayCategory; import me.shedaniel.rei.api.registry.transfer.TransferHandler; import me.shedaniel.rei.api.registry.transfer.TransferHandlerRegistry; +import me.shedaniel.rei.api.util.CollectionUtils; import me.shedaniel.rei.gui.toast.CopyRecipeIdentifierToast; import me.shedaniel.rei.gui.widget.LateRenderable; -import me.shedaniel.rei.api.gui.widgets.Widget; -import me.shedaniel.rei.api.gui.widgets.WidgetWithBounds; -import me.shedaniel.rei.api.util.CollectionUtils; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.ChatFormatting; @@ -84,10 +84,14 @@ public final class InternalWidgets { e.printStackTrace(); } Minecraft.getInstance().setScreen(containerScreen); - ScreenHelper.getLastOverlay().init(); + REIHelper.getInstance().getOverlay().get().queueReloadOverlay(); }) .onRender((matrices, button) -> { button.setEnabled(false); + if (containerScreen == null) { + button.setTint(0); + return; + } List<String> error = null; int color = 0; visible[0] = false; |
