Unknown 6 жил өмнө
parent
commit
203bd245f2
35 өөрчлөгдсөн 216 нэмэгдсэн , 200 устгасан
  1. 2 0
      CHANGELOG.md
  2. 5 5
      gradle.properties
  3. 2 2
      src/main/java/me/shedaniel/rei/api/RecipeCategory.java
  4. 13 13
      src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
  5. 32 30
      src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
  6. 17 19
      src/main/java/me/shedaniel/rei/gui/config/ItemListOrderingEntry.java
  7. 1 3
      src/main/java/me/shedaniel/rei/gui/credits/CreditsEntry.java
  8. 8 6
      src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java
  9. 8 8
      src/main/java/me/shedaniel/rei/gui/credits/CreditsScreen.java
  10. 13 12
      src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java
  11. 4 3
      src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java
  12. 3 3
      src/main/java/me/shedaniel/rei/gui/widget/CraftableToggleButtonWidget.java
  13. 2 2
      src/main/java/me/shedaniel/rei/gui/widget/DraggableWidget.java
  14. 3 3
      src/main/java/me/shedaniel/rei/gui/widget/ItemListOverlay.java
  15. 6 6
      src/main/java/me/shedaniel/rei/gui/widget/ItemSlotWidget.java
  16. 2 2
      src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java
  17. 10 11
      src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java
  18. 4 4
      src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
  19. 4 4
      src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java
  20. 12 13
      src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java
  21. 9 0
      src/main/java/me/shedaniel/rei/listeners/GhostSlotsHooks.java
  22. 0 14
      src/main/java/me/shedaniel/rei/mixin/GhostSlotsHook.java
  23. 6 8
      src/main/java/me/shedaniel/rei/mixin/MixinContainerScreen.java
  24. 1 1
      src/main/java/me/shedaniel/rei/mixin/MixinCraftingTableScreen.java
  25. 1 1
      src/main/java/me/shedaniel/rei/mixin/MixinPlayerInventoryScreen.java
  26. 21 0
      src/main/java/me/shedaniel/rei/mixin/MixinRecipeBookGui.java
  27. 3 3
      src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java
  28. 2 2
      src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java
  29. 3 3
      src/main/java/me/shedaniel/rei/plugin/DefaultCampfireCategory.java
  30. 1 1
      src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java
  31. 10 10
      src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
  32. 3 3
      src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java
  33. 3 3
      src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java
  34. 1 1
      src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingCategory.java
  35. 1 1
      src/main/resources/roughlyenoughitems.client.json

+ 2 - 0
CHANGELOG.md

@@ -1,3 +1,5 @@
+# v2.5.1.74
+- Updated to 19w13a
 # v2.5.0.73
 - Made REI crash better (lmao wut)
 # v2.5.0.72

+ 5 - 5
gradle.properties

@@ -1,9 +1,9 @@
-mod_version=2.5.0.73
-minecraft_version=19w12b
-yarn_version=19w12b.1
-fabric_version=0.2.5.114
+mod_version=2.5.1.74
+minecraft_version=19w13a
+yarn_version=19w13a.3
+fabric_version=0.2.6.117
 fabricloader_version=0.3.7.109
 pluginloader_version=1.14-1.0.6-8
 developermode_version=1.0.3
 jankson_version=1.1.0
-cloth_version=0.1.3.12
+cloth_version=0.1.4.14

+ 2 - 2
src/main/java/me/shedaniel/rei/api/RecipeCategory.java

@@ -28,8 +28,8 @@ public interface RecipeCategory<T extends RecipeDisplay> {
     
     default void drawCategoryBackground(Rectangle bounds, int mouseX, int mouseY, float delta) {
         new RecipeBaseWidget(bounds).render();
-        DrawableHelper.drawRect(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, RecipeViewingScreen.SUB_COLOR.getRGB());
-        DrawableHelper.drawRect(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, RecipeViewingScreen.SUB_COLOR.getRGB());
+        DrawableHelper.fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, RecipeViewingScreen.SUB_COLOR.getRGB());
+        DrawableHelper.fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, RecipeViewingScreen.SUB_COLOR.getRGB());
     }
     
     default DisplaySettings getDisplaySettings() {

+ 13 - 13
src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java

@@ -77,7 +77,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
             }
             
             @Override
-            public void onFocusChanged(boolean boolean_1) {
+            public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
             }
         });
         widgets.add(buttonRight = new ButtonWidget(rectangle.x + rectangle.width - 18, rectangle.y + 5, 16, 16, new TranslatableTextComponent("text.rei.right_arrow")) {
@@ -95,7 +95,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
             }
             
             @Override
-            public void onFocusChanged(boolean boolean_1) {
+            public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
             }
         });
         if (setPage)
@@ -103,7 +103,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
         widgets.add(new ButtonWidget(RoughlyEnoughItemsCore.getConfigManager().getConfig().mirrorItemPanel ? window.getScaledWidth() - 30 : 10, 10, 20, 20, "") {
             @Override
             public void onPressed() {
-                if (Screen.isShiftPressed()) {
+                if (Screen.hasShiftDown()) {
                     ClientHelper.setCheating(!ClientHelper.isCheating());
                     return;
                 }
@@ -115,10 +115,10 @@ public class ContainerScreenOverlay extends ScreenComponent {
                 super.render(mouseX, mouseY, partialTicks);
                 GuiLighting.disable();
                 if (ClientHelper.isCheating())
-                    drawRect(getBounds().x, getBounds().y, getBounds().x + 20, getBounds().y + 20, new Color(255, 0, 0, 42).getRGB());
+                    fill(getBounds().x, getBounds().y, getBounds().x + 20, getBounds().y + 20, new Color(255, 0, 0, 42).getRGB());
                 MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
-                drawTexturedRect(getBounds().x + 3, getBounds().y + 3, 0, 0, 14, 14);
+                blit(getBounds().x + 3, getBounds().y + 3, 0, 0, 14, 14);
             }
             
             @Override
@@ -133,7 +133,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
             }
             
             @Override
-            public void onFocusChanged(boolean boolean_1) {
+            public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
             }
         });
         if (RoughlyEnoughItemsCore.getConfigManager().getConfig().showUtilsButtons) {
@@ -155,7 +155,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
                 }
                 
                 @Override
-                public void onFocusChanged(boolean boolean_1) {
+                public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
                 }
             });
             widgets.add(new ButtonWidget(RoughlyEnoughItemsCore.getConfigManager().getConfig().mirrorItemPanel ? window.getScaledWidth() - 80 : 60, 10, 20, 20, "") {
@@ -170,7 +170,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
                     GuiLighting.disable();
                     MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
                     GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
-                    drawTexturedRect(getBounds().x + 3, getBounds().y + 3, getCurrentWeather().getId() * 14, 14, 14, 14);
+                    blit(getBounds().x + 3, getBounds().y + 3, getCurrentWeather().getId() * 14, 14, 14, 14);
                 }
                 
                 @Override
@@ -179,7 +179,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
                 }
                 
                 @Override
-                public void onFocusChanged(boolean boolean_1) {
+                public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
                 }
             });
         }
@@ -203,7 +203,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
             }
             
             @Override
-            public void onFocusChanged(boolean boolean_1) {
+            public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
             }
         });
         if (ScreenHelper.searchField == null)
@@ -327,7 +327,7 @@ public class ContainerScreenOverlay extends ScreenComponent {
         if (!(currentScreen instanceof RecipeViewingScreen) || !((RecipeViewingScreen) currentScreen).choosePageActivated)
             QUEUED_TOOLTIPS.stream().filter(queuedTooltip -> queuedTooltip != null).forEach(queuedTooltip -> {
                 GlStateManager.translatef(0, 0, 600);
-                MinecraftClient.getInstance().currentScreen.drawTooltip(queuedTooltip.getText(), queuedTooltip.getLocation().x, queuedTooltip.getLocation().y);
+                MinecraftClient.getInstance().currentScreen.renderTooltip(queuedTooltip.getText(), queuedTooltip.getLocation().x, queuedTooltip.getLocation().y);
                 GlStateManager.translatef(0, 0, -600);
             });
         QUEUED_TOOLTIPS.clear();
@@ -442,14 +442,14 @@ public class ContainerScreenOverlay extends ScreenComponent {
     public boolean charTyped(char char_1, int int_1) {
         if (!ScreenHelper.isOverlayVisible())
             return false;
-        for(InputListener listener : getInputListeners())
+        for(InputListener listener : children())
             if (listener.charTyped(char_1, int_1))
                 return true;
         return super.charTyped(char_1, int_1);
     }
     
     @Override
-    public List<? extends InputListener> getInputListeners() {
+    public List<? extends InputListener> children() {
         return widgets;
     }
     

+ 32 - 30
src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java

@@ -78,19 +78,18 @@ public class RecipeViewingScreen extends Screen {
     public boolean keyPressed(int int_1, int int_2, int int_3) {
         if (int_1 == 256 && choosePageActivated) {
             choosePageActivated = false;
-            onInitialized();
+            init();
             return true;
         }
-        if ((int_1 == 256 || this.client.options.keyInventory.matchesKey(int_1, int_2)) && this.doesEscapeKeyClose()) {
+        if ((int_1 == 256 || this.minecraft.options.keyInventory.matchesKey(int_1, int_2)) && this.shouldCloseOnEsc()) {
             MinecraftClient.getInstance().openScreen(ScreenHelper.getLastContainerScreen());
             ScreenHelper.getLastOverlay().onInitialized();
             return true;
         }
         if (int_1 == 258) {
-            if (isShiftPressed())
-                this.focusPrevious();
-            else
-                this.focusNext();
+            boolean boolean_1 = !hasShiftDown();
+            if (!this.method_20087(boolean_1))
+                this.method_20087(boolean_1);
             return true;
         }
         if (choosePageActivated) {
@@ -98,6 +97,9 @@ public class RecipeViewingScreen extends Screen {
                 return true;
             return false;
         }
+        for(Widget widget : widgets)
+            if (widget.keyPressed(int_1, int_2, int_3))
+                return true;
         return super.keyPressed(int_1, int_2, int_3);
     }
     
@@ -107,9 +109,9 @@ public class RecipeViewingScreen extends Screen {
     }
     
     @Override
-    public void onInitialized() {
-        super.onInitialized();
-        this.listeners.clear();
+    public void init() {
+        super.init();
+        this.children.clear();
         this.tabs.clear();
         this.widgets.clear();
         this.largestWidth = window.getScaledWidth() - 100;
@@ -129,7 +131,7 @@ public class RecipeViewingScreen extends Screen {
                 selectedCategory = categories.get(currentCategoryIndex);
                 categoryPages = MathHelper.floor(currentCategoryIndex / 6d);
                 page = 0;
-                RecipeViewingScreen.this.onInitialized();
+                RecipeViewingScreen.this.init();
             }
             
             @Override
@@ -164,7 +166,7 @@ public class RecipeViewingScreen extends Screen {
                 selectedCategory = categories.get(currentCategoryIndex);
                 categoryPages = MathHelper.floor(currentCategoryIndex / 6d);
                 page = 0;
-                RecipeViewingScreen.this.onInitialized();
+                RecipeViewingScreen.this.init();
             }
             
             @Override
@@ -181,7 +183,7 @@ public class RecipeViewingScreen extends Screen {
                 page--;
                 if (page < 0)
                     page = getTotalPages(selectedCategory) - 1;
-                RecipeViewingScreen.this.onInitialized();
+                RecipeViewingScreen.this.init();
             }
             
             @Override
@@ -204,7 +206,7 @@ public class RecipeViewingScreen extends Screen {
             public void onLabelClicked() {
                 MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F));
                 RecipeViewingScreen.this.choosePageActivated = true;
-                RecipeViewingScreen.this.onInitialized();
+                RecipeViewingScreen.this.init();
             }
         });
         widgets.add(recipeNext = new ButtonWidget((int) bounds.getMaxX() - 17, (int) bounds.getY() + 21, 12, 12, new TranslatableTextComponent("text.rei.right_arrow")) {
@@ -213,7 +215,7 @@ public class RecipeViewingScreen extends Screen {
                 page++;
                 if (page >= getTotalPages(selectedCategory))
                     page = 0;
-                RecipeViewingScreen.this.onInitialized();
+                RecipeViewingScreen.this.init();
             }
             
             @Override
@@ -238,7 +240,7 @@ public class RecipeViewingScreen extends Screen {
                                 return false;
                             selectedCategory = categories.get(getId() + categoryPages * 6);
                             page = 0;
-                            RecipeViewingScreen.this.onInitialized();
+                            RecipeViewingScreen.this.init();
                             return true;
                         }
                         return false;
@@ -265,9 +267,9 @@ public class RecipeViewingScreen extends Screen {
         else
             recipeChoosePageWidget = null;
         
-        listeners.addAll(tabs);
-        listeners.add(ScreenHelper.getLastOverlay(true, false));
-        listeners.addAll(widgets);
+        children.addAll(tabs);
+        children.add(ScreenHelper.getLastOverlay(true, false));
+        children.addAll(widgets);
     }
     
     public List<Widget> getWidgets() {
@@ -309,13 +311,13 @@ public class RecipeViewingScreen extends Screen {
     
     @Override
     public void render(int mouseX, int mouseY, float delta) {
-        this.drawGradientRect(0, 0, this.screenWidth, this.screenHeight, -1072689136, -804253680);
+        this.fillGradient(0, 0, this.width, this.height, -1072689136, -804253680);
         if (selectedCategory != null)
             selectedCategory.drawCategoryBackground(bounds, mouseX, mouseY, delta);
         else {
             new RecipeBaseWidget(bounds).render();
-            drawRect(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, SUB_COLOR.getRGB());
-            drawRect(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, SUB_COLOR.getRGB());
+            fill(bounds.x + 17, bounds.y + 5, bounds.x + bounds.width - 17, bounds.y + 17, SUB_COLOR.getRGB());
+            fill(bounds.x + 17, bounds.y + 21, bounds.x + bounds.width - 17, bounds.y + 33, SUB_COLOR.getRGB());
         }
         tabs.stream().filter(tabWidget -> {
             return !tabWidget.isSelected();
@@ -331,9 +333,9 @@ public class RecipeViewingScreen extends Screen {
         tabs.stream().filter(TabWidget::isSelected).forEach(tabWidget -> tabWidget.render(mouseX, mouseY, delta));
         ScreenHelper.getLastOverlay().drawOverlay(mouseX, mouseY, delta);
         if (choosePageActivated) {
-            zOffset = 500.0f;
-            this.drawGradientRect(0, 0, this.screenWidth, this.screenHeight, -1072689136, -804253680);
-            zOffset = 0.0f;
+            blitOffset = 500.0f;
+            this.fillGradient(0, 0, this.width, this.height, -1072689136, -804253680);
+            blitOffset = 0.0f;
             recipeChoosePageWidget.render(mouseX, mouseY, delta);
         }
     }
@@ -353,7 +355,7 @@ public class RecipeViewingScreen extends Screen {
                 return true;
             return false;
         }
-        for(InputListener listener : listeners)
+        for(InputListener listener : children())
             if (listener.charTyped(char_1, int_1))
                 return true;
         return super.charTyped(char_1, int_1);
@@ -381,7 +383,7 @@ public class RecipeViewingScreen extends Screen {
     
     @Override
     public boolean mouseScrolled(double i, double j, double amount) {
-        for(InputListener listener : listeners)
+        for(InputListener listener : children())
             if (listener.mouseScrolled(i, j, amount))
                 return true;
         if (getBounds().contains(ClientUtils.getMouseLocation())) {
@@ -408,14 +410,14 @@ public class RecipeViewingScreen extends Screen {
                 return false;
             } else {
                 choosePageActivated = false;
-                onInitialized();
+                init();
                 return false;
             }
-        for(InputListener entry : getInputListeners())
+        for(InputListener entry : children())
             if (entry.mouseClicked(double_1, double_2, int_1)) {
-                focusOn(entry);
+                method_20084(entry);
                 if (int_1 == 0)
-                    setActive(true);
+                    setDragging(true);
                 return true;
             }
         return false;

+ 17 - 19
src/main/java/me/shedaniel/rei/gui/config/ItemListOrderingEntry.java

@@ -2,7 +2,6 @@ package me.shedaniel.rei.gui.config;
 
 import com.google.common.collect.Lists;
 import javafx.util.Pair;
-import me.shedaniel.cloth.api.ClientUtils;
 import me.shedaniel.cloth.gui.ClothConfigScreen.ListEntry;
 import me.shedaniel.cloth.gui.ClothConfigScreen.ListWidget;
 import me.shedaniel.rei.RoughlyEnoughItemsCore;
@@ -13,7 +12,6 @@ import net.minecraft.client.gui.widget.ButtonWidget;
 import net.minecraft.client.resource.language.I18n;
 import net.minecraft.client.util.Window;
 
-import java.awt.*;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Optional;
@@ -36,11 +34,11 @@ public class ItemListOrderingEntry extends ListEntry {
                 currentAscending = !currentAscending;
             }
             ItemListOrderingEntry.this.value.set(new Pair<>(ItemListOrdering.values()[index], currentAscending));
-            ((ListWidget) ItemListOrderingEntry.this.getParent()).getScreen().setEdited(true);
+            ((ListWidget) ItemListOrderingEntry.this.parent).getScreen().setEdited(true);
         });
         this.resetButton = new ButtonWidget(0, 0, MinecraftClient.getInstance().textRenderer.getStringWidth(I18n.translate("text.cloth.reset_value")) + 6, 20, I18n.translate("text.cloth.reset_value"), (widget) -> {
             this.value.set((Pair) getDefaultValue().get());
-            ((ListWidget) this.getParent()).getScreen().setEdited(true);
+            ((ListWidget) this.parent).getScreen().setEdited(true);
         });
         this.widgets = Lists.newArrayList(this.buttonWidget, this.resetButton);
     }
@@ -54,26 +52,26 @@ public class ItemListOrderingEntry extends ListEntry {
         return Optional.of(new Pair<>(ItemListOrdering.registry, true));
     }
     
-    public void draw(int entryWidth, int height, int i3, int i4, boolean isSelected, float delta) {
+    @Override
+    public void draw(int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean isSelected, float delta) {
         Window window = MinecraftClient.getInstance().window;
-        Point mouse = ClientUtils.getMouseLocation();
         this.resetButton.active = this.getDefaultValue().isPresent() && (((Pair<ItemListOrdering, Boolean>) this.getDefaultValue().get()).getKey() != this.value.get().getKey() || ((Pair<ItemListOrdering, Boolean>) this.getDefaultValue().get()).getValue().booleanValue() != this.value.get().getValue().booleanValue());
-        this.resetButton.y = this.getY();
-        this.buttonWidget.y = this.getY();
+        this.resetButton.y = y;
+        this.buttonWidget.y = y;
         this.buttonWidget.setMessage(I18n.translate("text.rei.config.list_ordering_button", I18n.translate(value.get().getKey().getNameTranslationKey()), I18n.translate(value.get().getValue() ? "ordering.rei.ascending" : "ordering.rei.descending")));
         if (MinecraftClient.getInstance().textRenderer.isRightToLeft()) {
-            MinecraftClient.getInstance().textRenderer.drawWithShadow(I18n.translate(this.getFieldName(), new Object[0]), (float) (window.getScaledWidth() - this.getX() - MinecraftClient.getInstance().textRenderer.getStringWidth(I18n.translate(this.getFieldName(), new Object[0]))), (float) (this.getY() + 5), 16777215);
-            this.resetButton.x = this.getX();
-            this.buttonWidget.x = this.getX() + this.resetButton.getWidth() + 2;
+            MinecraftClient.getInstance().textRenderer.drawWithShadow(I18n.translate(this.getFieldName(), new Object[0]), (float) (window.getScaledWidth() - x - MinecraftClient.getInstance().textRenderer.getStringWidth(I18n.translate(this.getFieldName(), new Object[0]))), (float) (y + 5), 16777215);
+            this.resetButton.x = x;
+            this.buttonWidget.x = x + this.resetButton.getWidth() + 2;
             this.buttonWidget.setWidth(150 - this.resetButton.getWidth() - 2);
         } else {
-            MinecraftClient.getInstance().textRenderer.drawWithShadow(I18n.translate(this.getFieldName(), new Object[0]), (float) this.getX(), (float) (this.getY() + 5), 16777215);
-            this.resetButton.x = window.getScaledWidth() - this.getX() - this.resetButton.getWidth();
-            this.buttonWidget.x = window.getScaledWidth() - this.getX() - 150;
+            MinecraftClient.getInstance().textRenderer.drawWithShadow(I18n.translate(this.getFieldName(), new Object[0]), (float) x, (float) (y + 5), 16777215);
+            this.resetButton.x = window.getScaledWidth() - x - this.resetButton.getWidth();
+            this.buttonWidget.x = window.getScaledWidth() - x - 150;
             this.buttonWidget.setWidth(150 - this.resetButton.getWidth() - 2);
         }
-        this.buttonWidget.render(mouse.x, mouse.y, delta);
-        this.resetButton.render(mouse.x, mouse.y, delta);
+        this.buttonWidget.render(mouseX, mouseY, delta);
+        this.resetButton.render(mouseX, mouseY, delta);
     }
     
     public String getYesNoText(boolean bool) {
@@ -81,15 +79,15 @@ public class ItemListOrderingEntry extends ListEntry {
     }
     
     @Override
-    public List<? extends InputListener> getInputListeners() {
+    public List<? extends InputListener> children() {
         return widgets;
     }
     
-    public boolean isActive() {
+    public boolean isDragging() {
         return this.buttonWidget.isHovered() || this.resetButton.isHovered();
     }
     
-    public void setActive(boolean b) {
+    public void setDragging(boolean b) {
     }
     
     public InputListener getFocused() {

+ 1 - 3
src/main/java/me/shedaniel/rei/gui/credits/CreditsEntry.java

@@ -13,9 +13,7 @@ public class CreditsEntry extends EntryListWidget.Entry<CreditsEntry> {
     }
     
     @Override
-    public void draw(int entryWidth, int height, int i3, int i4, boolean isSelected, float delta) {
-        int x = getX();
-        int y = getY();
+    public void draw(int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean isSelected, float delta) {
         MinecraftClient.getInstance().textRenderer.drawWithShadow(textComponent.getFormattedText(), x + 5, y + 5, -1);
     }
     

+ 8 - 6
src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java

@@ -7,7 +7,7 @@ public class CreditsEntryListWidget extends EntryListWidget<CreditsEntry> {
     
     public CreditsEntryListWidget(MinecraftClient client, int width, int height, int startY, int endY, int entryHeight) {
         super(client, width, height, startY, endY, entryHeight);
-        setRenderSelection(false); //toggleShowSelection
+        field_19091 = false; // showSelection
     }
     
     public void creditsClearEntries() {
@@ -15,7 +15,7 @@ public class CreditsEntryListWidget extends EntryListWidget<CreditsEntry> {
     }
     
     private CreditsEntry getEntry(int int_1) {
-        return this.getInputListeners().get(int_1);
+        return this.children().get(int_1);
     }
     
     public void creditsAddEntry(CreditsEntry entry) {
@@ -23,13 +23,15 @@ public class CreditsEntryListWidget extends EntryListWidget<CreditsEntry> {
     }
     
     @Override
-    public int getEntryWidth() {
-        return width - 80;
+    // getRowWidth
+    public int method_20053() {
+        return field_19083 - 80; // width
     }
     
     @Override
-    protected int getScrollbarPosition() {
-        return width - 40;
+    // getScrollbarPosition
+    protected int method_20078() {
+        return field_19083 - 40; // width
     }
     
 }

+ 8 - 8
src/main/java/me/shedaniel/rei/gui/credits/CreditsScreen.java

@@ -20,8 +20,8 @@ public class CreditsScreen extends Screen {
     
     @Override
     public boolean keyPressed(int int_1, int int_2, int int_3) {
-        if (int_1 == 256 && this.doesEscapeKeyClose()) {
-            this.client.openScreen(parent);
+        if (int_1 == 256 && this.shouldCloseOnEsc()) {
+            this.minecraft.openScreen(parent);
             if (parent instanceof ContainerScreen)
                 ScreenHelper.getLastOverlay().onInitialized();
             return true;
@@ -30,16 +30,16 @@ public class CreditsScreen extends Screen {
     }
     
     @Override
-    protected void onInitialized() {
-        listeners.add(entryListWidget = new CreditsEntryListWidget(client, screenWidth, screenHeight, 32, screenHeight - 32, 12));
+    protected void init() {
+        children.add(entryListWidget = new CreditsEntryListWidget(minecraft, width, height, 32, height - 32, 12));
         entryListWidget.creditsClearEntries();
         for(String line : I18n.translate("text.rei.credit.text").split("\n"))
             entryListWidget.creditsAddEntry(new CreditsEntry(new StringTextComponent(line)));
         entryListWidget.creditsAddEntry(new CreditsEntry(new StringTextComponent("")));
-        listeners.add(buttonDone = new ButtonWidget(screenWidth / 2 - 100, screenHeight - 26, 200, 20, I18n.translate("gui.done")) {
+        children.add(buttonDone = new ButtonWidget(width / 2 - 100, height - 26, 200, 20, I18n.translate("gui.done")) {
             @Override
             public void onPressed() {
-                CreditsScreen.this.client.openScreen(parent);
+                CreditsScreen.this.minecraft.openScreen(parent);
                 ScreenHelper.getLastOverlay().onInitialized();
             }
         });
@@ -54,9 +54,9 @@ public class CreditsScreen extends Screen {
     
     @Override
     public void render(int int_1, int int_2, float float_1) {
-        this.drawTextureBackground(0);
+        this.renderDirtBackground(0);
         this.entryListWidget.render(int_1, int_2, float_1);
-        this.drawStringCentered(this.fontRenderer, I18n.translate("text.rei.credits"), this.screenWidth / 2, 16, 16777215);
+        this.drawCenteredString(this.font, I18n.translate("text.rei.credits"), this.width / 2, 16, 16777215);
         super.render(int_1, int_2, float_1);
     }
     

+ 13 - 12
src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java

@@ -71,18 +71,18 @@ public abstract class ButtonWidget extends HighlightableWidget {
             GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
             GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
             //Four Corners
-            this.drawTexturedRect(x, y, 0, 46 + textureOffset * 20, 4, 4);
-            this.drawTexturedRect(x + width - 4, y, 196, 46 + textureOffset * 20, 4, 4);
-            this.drawTexturedRect(x, y + height - 4, 0, 62 + textureOffset * 20, 4, 4);
-            this.drawTexturedRect(x + width - 4, y + height - 4, 196, 62 + textureOffset * 20, 4, 4);
+            this.blit(x, y, 0, 46 + textureOffset * 20, 4, 4);
+            this.blit(x + width - 4, y, 196, 46 + textureOffset * 20, 4, 4);
+            this.blit(x, y + height - 4, 0, 62 + textureOffset * 20, 4, 4);
+            this.blit(x + width - 4, y + height - 4, 196, 62 + textureOffset * 20, 4, 4);
             
             //Sides
-            this.drawTexturedRect(x + 4, y, 4, 46 + textureOffset * 20, width - 8, 4);
-            this.drawTexturedRect(x + 4, y + height - 4, 4, 62 + textureOffset * 20, width - 8, 4);
+            this.blit(x + 4, y, 4, 46 + textureOffset * 20, width - 8, 4);
+            this.blit(x + 4, y + height - 4, 4, 62 + textureOffset * 20, width - 8, 4);
             
             for(int i = y + 4; i < y + height - 4; i += 4) {
-                this.drawTexturedRect(x, i, 0, 50 + textureOffset * 20, width / 2, MathHelper.clamp(y + height - 4 - i, 0, 4));
-                this.drawTexturedRect(x + width / 2, i, 200 - width / 2, 50 + textureOffset * 20, width / 2, MathHelper.clamp(y + height - 4 - i, 0, 4));
+                this.blit(x, i, 0, 50 + textureOffset * 20, width / 2, MathHelper.clamp(y + height - 4 - i, 0, 4));
+                this.blit(x + width / 2, i, 200 - width / 2, 50 + textureOffset * 20, width / 2, MathHelper.clamp(y + height - 4 - i, 0, 4));
             }
             
             int colour = 14737632;
@@ -92,7 +92,7 @@ public abstract class ButtonWidget extends HighlightableWidget {
                 colour = 16777120;
             }
             
-            this.drawStringCentered(textRenderer, this.text, x + width / 2, y + (height - 8) / 2, colour);
+            this.drawCenteredString(textRenderer, this.text, x + width / 2, y + (height - 8) / 2, colour);
             
             if (getTooltips().isPresent())
                 if (isHighlighted(mouseX, mouseY))
@@ -112,12 +112,13 @@ public abstract class ButtonWidget extends HighlightableWidget {
     }
     
     @Override
-    public void onFocusChanged(boolean boolean_1) {
-        focused = boolean_1;
+    public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
+        if (boolean_2)
+            focused = boolean_1;
     }
     
     @Override
-    public List<? extends InputListener> getInputListeners() {
+    public List<? extends InputListener> children() {
         return Collections.emptyList();
     }
     

+ 4 - 3
src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java

@@ -16,7 +16,7 @@ public abstract class ClickableLabelWidget extends LabelWidget {
         int colour = -1;
         if (isHovered(mouseX, mouseY))
             colour = hoveredColor;
-        drawStringCentered(textRenderer, (isHovered(mouseX, mouseY) ? "§n" : "") + text, x, y, colour);
+        drawCenteredString(textRenderer, (isHovered(mouseX, mouseY) ? "§n" : "") + text, x, y, colour);
     }
     
     @Override
@@ -48,8 +48,9 @@ public abstract class ClickableLabelWidget extends LabelWidget {
     }
     
     @Override
-    public void onFocusChanged(boolean boolean_1) {
-        focused = boolean_1;
+    public void onFocusChanged(boolean boolean_1, boolean boolean_2) {
+        if (boolean_2)
+            focused = boolean_1;
     }
     
     public abstract void onLabelClicked();

+ 3 - 3
src/main/java/me/shedaniel/rei/gui/widget/CraftableToggleButtonWidget.java

@@ -39,9 +39,9 @@ public abstract class CraftableToggleButtonWidget extends ButtonWidget {
         GuiLighting.disable();
         MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
         GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
-        this.zOffset = 100f;
-        this.drawTexturedRect(getBounds().x, getBounds().y, (56 + (RoughlyEnoughItemsCore.getConfigManager().isCraftableOnlyEnabled() ? 0 : 20)), 202, 20, 20);
-        this.zOffset = 0f;
+        this.blitOffset = 100f;
+        this.blit(getBounds().x, getBounds().y, (56 + (RoughlyEnoughItemsCore.getConfigManager().isCraftableOnlyEnabled() ? 0 : 20)), 202, 20, 20);
+        this.blitOffset = 0f;
         if (getBounds().contains(mouseX, mouseY))
             ScreenHelper.getLastOverlay().addTooltip(QueuedTooltip.create(I18n.translate(RoughlyEnoughItemsCore.getConfigManager().isCraftableOnlyEnabled() ? "text.rei.showing_craftable" : "text.rei.showing_all")));
     }

+ 2 - 2
src/main/java/me/shedaniel/rei/gui/widget/DraggableWidget.java

@@ -51,7 +51,7 @@ public abstract class DraggableWidget extends HighlightableWidget {
             }
             return true;
         }
-        for(InputListener listener : getInputListeners())
+        for(InputListener listener : children())
             if (listener.mouseDragged(double_1, double_2, int_1, double_3, double_4))
                 return true;
         return false;
@@ -67,7 +67,7 @@ public abstract class DraggableWidget extends HighlightableWidget {
                 onMouseReleaseMidPoint(getMidPoint());
                 return true;
             }
-        for(InputListener listener : getInputListeners())
+        for(InputListener listener : children())
             if (listener.mouseReleased(double_1, double_2, int_1))
                 return true;
         return false;

+ 3 - 3
src/main/java/me/shedaniel/rei/gui/widget/ItemListOverlay.java

@@ -42,7 +42,7 @@ public class ItemListOverlay extends Widget {
     public static List<String> tryGetItemStackToolTip(ItemStack itemStack) {
         if (!searchBlacklisted.contains(itemStack.getItem()))
             try {
-                return MinecraftClient.getInstance().currentScreen.getStackTooltip(itemStack);
+                return MinecraftClient.getInstance().currentScreen.getTooltipFromItem(itemStack);
             } catch (Throwable e) {
                 e.printStackTrace();
                 searchBlacklisted.add(itemStack.getItem());
@@ -252,7 +252,7 @@ public class ItemListOverlay extends Widget {
             }
             if (!player.inventory.getCursorStack().isEmpty() && MinecraftClient.getInstance().isInSingleplayer())
                 return false;
-            for(Widget widget : getInputListeners())
+            for(Widget widget : children())
                 if (widget.mouseClicked(double_1, double_2, int_1))
                     return true;
         }
@@ -260,7 +260,7 @@ public class ItemListOverlay extends Widget {
     }
     
     @Override
-    public List<Widget> getInputListeners() {
+    public List<Widget> children() {
         return widgets;
     }
     

+ 6 - 6
src/main/java/me/shedaniel/rei/gui/widget/ItemSlotWidget.java

@@ -46,7 +46,7 @@ public class ItemSlotWidget extends HighlightableWidget {
     }
     
     @Override
-    public List<? extends InputListener> getInputListeners() {
+    public List<? extends InputListener> children() {
         return Collections.emptyList();
     }
     
@@ -63,13 +63,13 @@ public class ItemSlotWidget extends HighlightableWidget {
         final ItemStack itemStack = getCurrentStack();
         if (drawBackground) {
             MinecraftClient.getInstance().getTextureManager().bindTexture(RECIPE_GUI);
-            drawTexturedRect(this.x - 1, this.y - 1, 0, 222, 18, 18);
+            blit(this.x - 1, this.y - 1, 0, 222, 18, 18);
         }
         if (drawHighlightedBackground && isHighlighted(mouseX, mouseY)) {
             GlStateManager.disableLighting();
             GlStateManager.disableDepthTest();
             GlStateManager.colorMask(true, true, true, false);
-            drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
+            fill(x, y, x + 16, y + 16, -2130706433);
             GlStateManager.colorMask(true, true, true, true);
             GlStateManager.enableLighting();
             GlStateManager.enableDepthTest();
@@ -131,9 +131,9 @@ public class ItemSlotWidget extends HighlightableWidget {
             return false;
         if (getBounds().contains(mouseX, mouseY))
             if (button == 0)
-                return ClientHelper.executeRecipeKeyBind(getCurrentStack().copy());
+                return ClientHelper.executeRecipeKeyBind(getCurrentStack());
             else if (button == 1)
-                return ClientHelper.executeUsageKeyBind(getCurrentStack().copy());
+                return ClientHelper.executeUsageKeyBind(getCurrentStack());
         return false;
     }
     
@@ -143,7 +143,7 @@ public class ItemSlotWidget extends HighlightableWidget {
             return false;
         if (getBounds().contains(ClientUtils.getMouseLocation()))
             if (ClientHelper.RECIPE.matchesKey(int_1, int_2))
-                return ClientHelper.executeRecipeKeyBind(getCurrentStack().copy());
+                return ClientHelper.executeRecipeKeyBind(getCurrentStack());
             else if (ClientHelper.USAGE.matchesKey(int_1, int_2))
                 return ClientHelper.executeUsageKeyBind(getCurrentStack());
         return false;

+ 2 - 2
src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java

@@ -29,13 +29,13 @@ public class LabelWidget extends HighlightableWidget {
     }
     
     @Override
-    public List<? extends InputListener> getInputListeners() {
+    public List<? extends InputListener> children() {
         return Collections.emptyList();
     }
     
     @Override
     public void render(int mouseX, int mouseY, float partialTicks) {
-        drawStringCentered(textRenderer, text, x, y, -1);
+        drawCenteredString(textRenderer, text, x, y, -1);
     }
     
 }

+ 10 - 11
src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java

@@ -2,7 +2,6 @@ package me.shedaniel.rei.gui.widget;
 
 import com.mojang.blaze3d.platform.GlStateManager;
 import net.minecraft.client.MinecraftClient;
-import net.minecraft.client.gui.DrawableHelper;
 import net.minecraft.client.render.GuiLighting;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.math.MathHelper;
@@ -28,7 +27,7 @@ public class RecipeBaseWidget extends HighlightableWidget {
     }
     
     @Override
-    public List<Widget> getInputListeners() {
+    public List<Widget> children() {
         return Collections.emptyList();
     }
     
@@ -41,24 +40,24 @@ public class RecipeBaseWidget extends HighlightableWidget {
         GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
         GuiLighting.disable();
         MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
-        drawTexturedRect(bounds.x, bounds.y, 106, 190, bounds.width / 2, bounds.height / 2);
-        drawTexturedRect(bounds.x + bounds.width / 2, bounds.y, 256 - bounds.width / 2, 190, bounds.width / 2, bounds.height / 2);
-        drawTexturedRect(bounds.x, bounds.y + bounds.height / 2, 106, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2);
-        drawTexturedRect(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2, 256 - bounds.width / 2, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2);
+        blit(bounds.x, bounds.y, 106, 190, bounds.width / 2, bounds.height / 2);
+        blit(bounds.x + bounds.width / 2, bounds.y, 256 - bounds.width / 2, 190, bounds.width / 2, bounds.height / 2);
+        blit(bounds.x, bounds.y + bounds.height / 2, 106, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2);
+        blit(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2, 256 - bounds.width / 2, 190 + 66 - bounds.height / 2, bounds.width / 2, bounds.height / 2);
         if (bounds.height > 40)
             for(int i = 20; i < bounds.height - 20; i += MathHelper.clamp(20, 0, bounds.height - 20 - i)) {
                 int height = MathHelper.clamp(20, 0, bounds.height - 20 - i);
-                drawTexturedRect(bounds.x, bounds.y + i, 106, 230, bounds.width / 2, height);
-                drawTexturedRect(bounds.x + bounds.width / 2, bounds.y + i, 256 - bounds.width / 2, 210, bounds.width / 2, height);
+                blit(bounds.x, bounds.y + i, 106, 230, bounds.width / 2, height);
+                blit(bounds.x + bounds.width / 2, bounds.y + i, 256 - bounds.width / 2, 210, bounds.width / 2, height);
             }
         if (bounds.width > 40)
             for(int i = 20; i < bounds.width - 20; i += MathHelper.clamp(40, 0, bounds.width - 20 - i)) {
                 int width = MathHelper.clamp(40, 0, bounds.width - 20 - i);
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
-                drawTexturedRect(bounds.x + i, bounds.y, 113, 190, width, MathHelper.clamp(4, 0, bounds.height / 2));
-                drawTexturedRect(bounds.x + i, bounds.y + bounds.height - 4, 113, 252, width, MathHelper.clamp(4, 0, bounds.height / 2));
-                DrawableHelper.drawRect(bounds.x + i, bounds.y + 4, bounds.x + i + width, bounds.y + bounds.height - 4, INNER_COLOR.getRGB());
+                blit(bounds.x + i, bounds.y, 113, 190, width, MathHelper.clamp(4, 0, bounds.height / 2));
+                blit(bounds.x + i, bounds.y + bounds.height - 4, 113, 252, width, MathHelper.clamp(4, 0, bounds.height / 2));
+                fill(bounds.x + i, bounds.y + 4, bounds.x + i + width, bounds.y + bounds.height - 4, INNER_COLOR.getRGB());
             }
     }
     

+ 4 - 4
src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java

@@ -84,7 +84,7 @@ public class RecipeChoosePageWidget extends DraggableWidget {
         this.widgets.add(base2 = new RecipeBaseWidget(bounds));
         this.widgets.add(new Widget() {
             @Override
-            public List<Widget> getInputListeners() {
+            public List<Widget> children() {
                 return Collections.emptyList();
             }
             
@@ -118,7 +118,7 @@ public class RecipeChoosePageWidget extends DraggableWidget {
             public void onPressed() {
                 recipeViewingScreen.page = MathHelper.clamp(getIntFromString(textFieldWidget.getText()).orElse(0) - 1, 0, recipeViewingScreen.getTotalPages(recipeViewingScreen.getSelectedCategory()) - 1);
                 recipeViewingScreen.choosePageActivated = false;
-                recipeViewingScreen.onInitialized();
+                recipeViewingScreen.init();
             }
         });
         textFieldWidget.setFocused(true);
@@ -130,7 +130,7 @@ public class RecipeChoosePageWidget extends DraggableWidget {
     }
     
     @Override
-    public List<Widget> getInputListeners() {
+    public List<Widget> children() {
         return widgets;
     }
     
@@ -157,7 +157,7 @@ public class RecipeChoosePageWidget extends DraggableWidget {
         if (int_1 == 335 || int_1 == 257) {
             recipeViewingScreen.page = MathHelper.clamp(getIntFromString(textFieldWidget.getText()).orElse(0) - 1, 0, recipeViewingScreen.getTotalPages(recipeViewingScreen.getSelectedCategory()) - 1);
             recipeViewingScreen.choosePageActivated = false;
-            recipeViewingScreen.onInitialized();
+            recipeViewingScreen.init();
             return true;
         }
         for(Widget widget : widgets)

+ 4 - 4
src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java

@@ -61,7 +61,7 @@ public class TabWidget extends HighlightableWidget {
     }
     
     @Override
-    public List<Widget> getInputListeners() {
+    public List<Widget> children() {
         return Collections.emptyList();
     }
     
@@ -73,15 +73,15 @@ public class TabWidget extends HighlightableWidget {
             GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
             GuiLighting.disable();
             MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
-            this.drawTexturedRect(bounds.x, bounds.y + 2, selected ? 28 : 0, 192, 28, (selected ? 30 : 27));
-            this.zOffset = 100.0F;
+            this.blit(bounds.x, bounds.y + 2, selected ? 28 : 0, 192, 28, (selected ? 30 : 27));
+            this.blitOffset = 100.0F;
             this.itemRenderer.zOffset = 100.0F;
             GuiLighting.enableForItems();
             this.itemRenderer.renderGuiItem(getItemStack(), l, i1);
             this.itemRenderer.renderGuiItemOverlay(MinecraftClient.getInstance().textRenderer, getItemStack(), l, i1);
             GlStateManager.disableLighting();
             this.itemRenderer.zOffset = 0.0F;
-            this.zOffset = 0.0F;
+            this.blitOffset = 0.0F;
             if (isHighlighted(mouseX, mouseY))
                 drawTooltip();
         }

+ 12 - 13
src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java

@@ -5,7 +5,6 @@ import com.mojang.blaze3d.platform.GlStateManager;
 import net.minecraft.SharedConstants;
 import net.minecraft.client.MinecraftClient;
 import net.minecraft.client.font.TextRenderer;
-import net.minecraft.client.gui.DrawableHelper;
 import net.minecraft.client.gui.Screen;
 import net.minecraft.client.render.BufferBuilder;
 import net.minecraft.client.render.Tessellator;
@@ -157,7 +156,7 @@ public class TextFieldWidget extends HighlightableWidget {
     }
     
     private void method_16873(int int_1) {
-        if (Screen.isControlPressed()) {
+        if (Screen.hasControlDown()) {
             this.method_1877(int_1);
         } else {
             this.method_1878(int_1);
@@ -265,21 +264,21 @@ public class TextFieldWidget extends HighlightableWidget {
     
     public boolean keyPressed(int int_1, int int_2, int int_3) {
         if (this.isVisible() && this.isFocused()) {
-            this.field_17037 = Screen.isShiftPressed();
-            if (Screen.isSelectAllShortcutPressed(int_1)) {
+            this.field_17037 = Screen.hasShiftDown();
+            if (Screen.isSelectAll(int_1)) {
                 this.method_1872();
                 this.method_1884(0);
                 return true;
-            } else if (Screen.isCopyShortcutPressed(int_1)) {
+            } else if (Screen.isCopy(int_1)) {
                 MinecraftClient.getInstance().keyboard.setClipboard(this.getSelectedText());
                 return true;
-            } else if (Screen.isPasteShortcutPressed(int_1)) {
+            } else if (Screen.isPaste(int_1)) {
                 if (this.editable) {
                     this.addText(MinecraftClient.getInstance().keyboard.getClipboard());
                 }
                 
                 return true;
-            } else if (Screen.isCutShortcutPressed(int_1)) {
+            } else if (Screen.isCut(int_1)) {
                 MinecraftClient.getInstance().keyboard.setClipboard(this.getSelectedText());
                 if (this.editable) {
                     this.addText("");
@@ -308,7 +307,7 @@ public class TextFieldWidget extends HighlightableWidget {
                         
                         return true;
                     case 262:
-                        if (Screen.isControlPressed()) {
+                        if (Screen.hasControlDown()) {
                             this.method_1883(this.method_1853(1));
                         } else {
                             this.moveCursor(1);
@@ -316,7 +315,7 @@ public class TextFieldWidget extends HighlightableWidget {
                         
                         return true;
                     case 263:
-                        if (Screen.isControlPressed()) {
+                        if (Screen.hasControlDown()) {
                             this.method_1883(this.method_1853(-1));
                         } else {
                             this.moveCursor(-1);
@@ -354,7 +353,7 @@ public class TextFieldWidget extends HighlightableWidget {
     }
     
     @Override
-    public List<Widget> getInputListeners() {
+    public List<Widget> children() {
         return Collections.emptyList();
     }
     
@@ -385,8 +384,8 @@ public class TextFieldWidget extends HighlightableWidget {
     public void render(int int_1, int int_2, float float_1) {
         if (this.isVisible()) {
             if (this.hasBorder()) {
-                drawRect(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, -6250336);
-                drawRect(this.bounds.x, this.bounds.y, this.bounds.x + this.bounds.width, this.bounds.y + this.bounds.height, -16777216);
+                fill(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, -6250336);
+                fill(this.bounds.x, this.bounds.y, this.bounds.x + this.bounds.width, this.bounds.y + this.bounds.height, -16777216);
             }
             
             int color = this.editable ? this.editableColor : this.notEditableColor;
@@ -432,7 +431,7 @@ public class TextFieldWidget extends HighlightableWidget {
                     var10002 = int_9 + 1;
                     var10003 = int_7 + 1;
                     this.textRenderer.getClass();
-                    DrawableHelper.drawRect(int_9, var10001, var10002, var10003 + 9, -3092272);
+                    fill(int_9, var10001, var10002, var10003 + 9, -3092272);
                 } else {
                     this.textRenderer.drawWithShadow("_", (float) int_9, (float) int_7, color);
                 }

+ 9 - 0
src/main/java/me/shedaniel/rei/listeners/GhostSlotsHooks.java

@@ -0,0 +1,9 @@
+package me.shedaniel.rei.listeners;
+
+import net.minecraft.client.gui.widget.RecipeBookGhostSlots;
+
+public interface GhostSlotsHooks {
+    
+    RecipeBookGhostSlots rei_getGhostSlots();
+    
+}

+ 0 - 14
src/main/java/me/shedaniel/rei/mixin/GhostSlotsHook.java

@@ -1,14 +0,0 @@
-package me.shedaniel.rei.mixin;
-
-import net.minecraft.client.gui.recipebook.RecipeBookGui;
-import net.minecraft.client.gui.widget.RecipeBookGhostSlots;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
-
-@Mixin(RecipeBookGui.class)
-public interface GhostSlotsHook {
-    
-    @Accessor("ghostSlots")
-    RecipeBookGhostSlots rei_getGhostSlots();
-    
-}

+ 6 - 8
src/main/java/me/shedaniel/rei/mixin/MixinContainerScreen.java

@@ -24,9 +24,9 @@ public class MixinContainerScreen extends Screen implements ContainerScreenHooks
     @Shadow
     protected int top;
     @Shadow
-    protected int width;
+    protected int containerWidth;
     @Shadow
-    protected int height;
+    protected int containerHeight;
     @Shadow
     protected Slot focusedSlot;
     
@@ -46,12 +46,12 @@ public class MixinContainerScreen extends Screen implements ContainerScreenHooks
     
     @Override
     public int rei_getContainerWidth() {
-        return width;
+        return containerWidth;
     }
     
     @Override
     public int rei_getContainerHeight() {
-        return height;
+        return containerHeight;
     }
     
     @Override
@@ -75,11 +75,9 @@ public class MixinContainerScreen extends Screen implements ContainerScreenHooks
     // TODO: Make this use an event when Cloth mixin issues are fixed
     @Override
     public boolean charTyped(char char_1, int int_1) {
-        if (!(MinecraftClient.getInstance().currentScreen instanceof CreativePlayerInventoryScreen)) {
-            if (ScreenHelper.getLastOverlay().charTyped(char_1, int_1)) {
+        if (!(MinecraftClient.getInstance().currentScreen instanceof CreativePlayerInventoryScreen))
+            if (ScreenHelper.getLastOverlay().charTyped(char_1, int_1))
                 return true;
-            }
-        }
         return super.charTyped(char_1, int_1);
     }
     

+ 1 - 1
src/main/java/me/shedaniel/rei/mixin/MixinCraftingTableScreen.java

@@ -33,7 +33,7 @@ public abstract class MixinCraftingTableScreen extends ContainerScreen {
     @Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true, remap = false)
     public void mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> ci) {
         if (recipeBookGui.mouseClicked(mouseX, mouseY, button)) {
-            focusOn(recipeBookGui);
+            method_20084(recipeBookGui);
             ci.setReturnValue(true);
             ci.cancel();
         }

+ 1 - 1
src/main/java/me/shedaniel/rei/mixin/MixinPlayerInventoryScreen.java

@@ -34,7 +34,7 @@ public abstract class MixinPlayerInventoryScreen extends AbstractPlayerInventory
     @Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true, remap = false)
     public void mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> ci) {
         if (recipeBook.mouseClicked(mouseX, mouseY, button)) {
-            focusOn(recipeBook);
+            method_20084(recipeBook);
             ci.setReturnValue(true);
             ci.cancel();
         }

+ 21 - 0
src/main/java/me/shedaniel/rei/mixin/MixinRecipeBookGui.java

@@ -0,0 +1,21 @@
+package me.shedaniel.rei.mixin;
+
+import me.shedaniel.rei.listeners.GhostSlotsHooks;
+import net.minecraft.client.gui.recipebook.RecipeBookGui;
+import net.minecraft.client.gui.widget.RecipeBookGhostSlots;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+
+@Mixin(RecipeBookGui.class)
+public class MixinRecipeBookGui implements GhostSlotsHooks {
+    
+    @Shadow
+    @Final
+    protected RecipeBookGhostSlots ghostSlots;
+    
+    public RecipeBookGhostSlots rei_getGhostSlots() {
+        return ghostSlots;
+    }
+    
+}

+ 3 - 3
src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java

@@ -49,11 +49,11 @@ public class DefaultBlastingCategory implements RecipeCategory<DefaultBlastingDi
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 54, 82, 54);
+                blit(startPoint.x, startPoint.y, 0, 54, 82, 54);
                 int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f);
-                drawTexturedRect(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height);
+                blit(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height);
                 int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f);
-                drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
+                blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
             }
         }));
         List<List<ItemStack>> input = recipeDisplay.getInput();

+ 2 - 2
src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java

@@ -50,9 +50,9 @@ public class DefaultBrewingCategory implements RecipeCategory<DefaultBrewingDisp
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 108, 103, 59);
+                blit(startPoint.x, startPoint.y, 0, 108, 103, 59);
                 int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 18d) / 1f);
-                drawTexturedRect(startPoint.x + 44, startPoint.y + 28, 103, 163, width, 4);
+                blit(startPoint.x + 44, startPoint.y + 28, 103, 163, width, 4);
             }
         }));
         widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 1, Arrays.asList(new ItemStack(Items.BLAZE_POWDER)), false, true, true));

+ 3 - 3
src/main/java/me/shedaniel/rei/plugin/DefaultCampfireCategory.java

@@ -48,11 +48,11 @@ public class DefaultCampfireCategory implements RecipeCategory<DefaultCampfireDi
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 167, 82, 54);
+                blit(startPoint.x, startPoint.y, 0, 167, 82, 54);
                 int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f);
-                drawTexturedRect(startPoint.x + 2, startPoint.y + 31 + (14 - height), 82, 77 + (14 - height), 14, height);
+                blit(startPoint.x + 2, startPoint.y + 31 + (14 - height), 82, 77 + (14 - height), 14, height);
                 int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f);
-                drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
+                blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
                 String text = I18n.translate("category.rei.campfire.time", MathHelper.floor(recipeDisplaySupplier.get().getCookTime() / 20d));
                 int length = MinecraftClient.getInstance().textRenderer.getStringWidth(text);
                 MinecraftClient.getInstance().textRenderer.draw(text, bounds.x + bounds.width - length - 5, startPoint.y + 54 - 8, 4210752);

+ 1 - 1
src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java

@@ -48,7 +48,7 @@ public class DefaultCraftingCategory implements RecipeCategory<DefaultCraftingDi
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 0, 116, 54);
+                blit(startPoint.x, startPoint.y, 0, 0, 116, 54);
             }
         }));
         List<List<ItemStack>> input = recipeDisplaySupplier.get().getInput();

+ 10 - 10
src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java

@@ -3,7 +3,7 @@ package me.shedaniel.rei.plugin;
 import com.google.common.collect.Lists;
 import me.shedaniel.rei.RoughlyEnoughItemsCore;
 import me.shedaniel.rei.api.*;
-import me.shedaniel.rei.mixin.GhostSlotsHook;
+import me.shedaniel.rei.listeners.GhostSlotsHooks;
 import net.minecraft.client.MinecraftClient;
 import net.minecraft.client.gui.Screen;
 import net.minecraft.client.gui.container.BlastFurnaceScreen;
@@ -137,12 +137,12 @@ public class DefaultPlugin implements REIPlugin {
                 if (!recipe.getRecipe().isPresent())
                     return false;
                 if (screen.getClass().isAssignableFrom(CraftingTableScreen.class))
-                    ((GhostSlotsHook) (((CraftingTableScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
+                    ((GhostSlotsHooks) (((CraftingTableScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
                 else if (screen.getClass().isAssignableFrom(PlayerInventoryScreen.class))
-                    ((GhostSlotsHook) (((PlayerInventoryScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
+                    ((GhostSlotsHooks) (((PlayerInventoryScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
                 else
                     return false;
-                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed());
+                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown());
                 return true;
             }
             
@@ -162,10 +162,10 @@ public class DefaultPlugin implements REIPlugin {
                 if (!recipe.getRecipe().isPresent())
                     return false;
                 if (screen instanceof FurnaceScreen)
-                    ((GhostSlotsHook) (((FurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
+                    ((GhostSlotsHooks) (((FurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
                 else
                     return false;
-                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed());
+                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown());
                 return true;
             }
             
@@ -185,10 +185,10 @@ public class DefaultPlugin implements REIPlugin {
                 if (!recipe.getRecipe().isPresent())
                     return false;
                 if (screen instanceof SmokerScreen)
-                    ((GhostSlotsHook) (((SmokerScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
+                    ((GhostSlotsHooks) (((SmokerScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
                 else
                     return false;
-                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed());
+                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown());
                 return true;
             }
             
@@ -213,10 +213,10 @@ public class DefaultPlugin implements REIPlugin {
                 if (!recipe.getRecipe().isPresent())
                     return false;
                 if (screen instanceof BlastFurnaceScreen)
-                    ((GhostSlotsHook) (((BlastFurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
+                    ((GhostSlotsHooks) (((BlastFurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset();
                 else
                     return false;
-                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed());
+                MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown());
                 return true;
             }
         });

+ 3 - 3
src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java

@@ -48,11 +48,11 @@ public class DefaultSmeltingCategory implements RecipeCategory<DefaultSmeltingDi
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 54, 82, 54);
+                blit(startPoint.x, startPoint.y, 0, 54, 82, 54);
                 int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f);
-                drawTexturedRect(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height);
+                blit(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height);
                 int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f);
-                drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
+                blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
             }
         }));
         List<List<ItemStack>> input = recipeDisplaySupplier.get().getInput();

+ 3 - 3
src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java

@@ -48,11 +48,11 @@ public class DefaultSmokingCategory implements RecipeCategory<DefaultSmokingDisp
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 54, 82, 54);
+                blit(startPoint.x, startPoint.y, 0, 54, 82, 54);
                 int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f);
-                drawTexturedRect(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height);
+                blit(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height);
                 int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f);
-                drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
+                blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17);
             }
         }));
         List<List<ItemStack>> input = recipeDisplaySupplier.get().getInput();

+ 1 - 1
src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingCategory.java

@@ -47,7 +47,7 @@ public class DefaultStoneCuttingCategory implements RecipeCategory<DefaultStoneC
                 GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                 GuiLighting.disable();
                 MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE);
-                drawTexturedRect(startPoint.x, startPoint.y, 0, 221, 82, 26);
+                blit(startPoint.x, startPoint.y, 0, 221, 82, 26);
             }
         }));
         widgets.add(new ItemSlotWidget(startPoint.x + 4, startPoint.y + 5, recipeDisplaySupplier.get().getInput().get(0), true, true, true));

+ 1 - 1
src/main/resources/roughlyenoughitems.client.json

@@ -10,7 +10,7 @@
     "MixinCreativePlayerInventoryScreen",
     "MixinBrewingRecipeRegistry",
     "MixinTabGetter",
-    "GhostSlotsHook"
+    "MixinRecipeBookGui"
   ],
   "injectors": {
     "defaultRequire": 1