shedaniel 5 年之前
父节点
当前提交
e7b347a576
共有 33 个文件被更改,包括 310 次插入190 次删除
  1. 6 3
      build.gradle
  2. 6 7
      gradle.properties
  3. 7 2
      src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java
  4. 1 0
      src/main/java/me/shedaniel/rei/api/ClientHelper.java
  5. 1 1
      src/main/java/me/shedaniel/rei/api/ConfigManager.java
  6. 11 0
      src/main/java/me/shedaniel/rei/api/ConfigObject.java
  7. 1 1
      src/main/java/me/shedaniel/rei/api/DisplayHelper.java
  8. 1 0
      src/main/java/me/shedaniel/rei/api/EntryRegistry.java
  9. 7 13
      src/main/java/me/shedaniel/rei/api/RecipeHelper.java
  10. 16 16
      src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java
  11. 2 2
      src/main/java/me/shedaniel/rei/gui/OverlaySearchField.java
  12. 1 1
      src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java
  13. 12 12
      src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java
  14. 19 10
      src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
  15. 3 25
      src/main/java/me/shedaniel/rei/gui/widget/AutoCraftingButtonWidget.java
  16. 36 31
      src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java
  17. 37 16
      src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java
  18. 3 3
      src/main/java/me/shedaniel/rei/gui/widget/CraftableToggleButtonWidget.java
  19. 14 6
      src/main/java/me/shedaniel/rei/gui/widget/EntryListWidget.java
  20. 51 8
      src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java
  21. 1 1
      src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java
  22. 6 1
      src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java
  23. 5 5
      src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java
  24. 40 2
      src/main/java/me/shedaniel/rei/impl/OldConfigObjectImpl.java
  25. 7 13
      src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
  26. 9 3
      src/main/java/me/shedaniel/rei/impl/ScreenHelper.java
  27. 2 2
      src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
  28. 1 0
      src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java
  29. 0 5
      src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java
  30. 3 1
      src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
  31. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/en_us.json
  32. 二进制
      src/main/resources/assets/roughlyenoughitems/textures/gui/button.png
  33. 二进制
      src/main/resources/assets/roughlyenoughitems/textures/gui/button_dark.png

+ 6 - 3
build.gradle

@@ -34,7 +34,7 @@ license {
 repositories {
     maven { url "https://tehnut.info/maven/" }
     maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
-    maven { url "https://minecraft.curseforge.com/api/maven" }
+    maven { url "https://dl.bintray.com/shedaniel/autoconfig1u/" }
 }
 
 processResources {
@@ -59,7 +59,7 @@ dependencies {
         transitive = false
     }
     modApi "me.zeroeightsix:fiber:0.6.0-7"
-    modApi "blue.endless:jankson:${project.jankson_version}"
+    modApi("me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig1u}")
     if (includeDep) {
         include("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
             transitive = false
@@ -70,6 +70,9 @@ dependencies {
         include("me.shedaniel.cloth:fiber2cloth:1.2.1") {
             transitive = false
         }
+        include("me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig1u}") {
+            transitive = false
+        }
         include "me.zeroeightsix:fiber:0.6.0-7"
     }
     modImplementation "io.github.prospector:modmenu:${modmenu_version}"
@@ -87,7 +90,7 @@ task remapMavenJar(type: net.fabricmc.loom.task.RemapJarTask, dependsOn: jar) {
     classifier = "maven"
     afterEvaluate {
         input = file("${project.buildDir}/libs/${archivesBaseName}-${version}-dev.jar")
-//        archiveName = "${archivesBaseName}-${version}-maven.jar"
+        archiveName = "${archivesBaseName}-${version}-maven.jar"
         addNestedDependencies = false
     }
 }

+ 6 - 7
gradle.properties

@@ -1,10 +1,9 @@
-mod_version=3.2.8-unstable
-minecraft_version=19w45a
-yarn_version=19w45a+build.2
-fabricloader_version=0.6.3+build.168
-jankson_version=1.1.0
+mod_version=3.2.9-unstable
+minecraft_version=1.15-pre1
+yarn_version=1.15-pre1+build.3
+fabricloader_version=0.7.1+build.173
 cloth_events_version=1.0.1-unstable.201911010702
 cloth_config_version=2.4-unstable.201911031154
 modmenu_version=1.7.15-unstable.19w42a+build.11
-fabric_api=0.4.10+build.259-1.15
-
+fabric_api=0.4.13+build.263-1.15
+autoconfig1u=1.1.0

+ 7 - 2
src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java

@@ -10,6 +10,7 @@ import com.google.common.collect.Maps;
 import me.shedaniel.cloth.hooks.ClothClientHooks;
 import me.shedaniel.math.impl.PointHelper;
 import me.shedaniel.rei.api.*;
+import me.shedaniel.rei.api.annotations.Internal;
 import me.shedaniel.rei.api.plugins.REIPluginV0;
 import me.shedaniel.rei.gui.ContainerScreenOverlay;
 import me.shedaniel.rei.gui.widget.EntryListWidget;
@@ -53,11 +54,16 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicLong;
 
+@Internal
 public class RoughlyEnoughItemsCore implements ClientModInitializer {
     
+    @Internal
     public static final Logger LOGGER;
+    @SuppressWarnings("deprecation")
     private static final RecipeHelper RECIPE_HELPER = new RecipeHelperImpl();
+    @SuppressWarnings("deprecation")
     private static final EntryRegistry ENTRY_REGISTRY = new EntryRegistryImpl();
+    @SuppressWarnings("deprecation")
     private static final DisplayHelper DISPLAY_HELPER = new DisplayHelperImpl();
     private static final Map<Identifier, REIPluginEntry> plugins = Maps.newHashMap();
     private static final ExecutorService SYNC_RECIPES = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, "REI-SyncRecipes"));
@@ -207,6 +213,7 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer {
         }
     }
     
+    @SuppressWarnings("deprecation")
     private void registerClothEvents() {
         final Identifier recipeButtonTex = new Identifier("textures/gui/recipe_button.png");
         AtomicLong lastSync = new AtomicLong(-1);
@@ -217,10 +224,8 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer {
             }
             lastSync.set(System.currentTimeMillis());
             if (ConfigManager.getInstance().getConfig().doesRegisterRecipesInAnotherThread()) {
-                //noinspection deprecation
                 CompletableFuture.runAsync(() -> ((RecipeHelperImpl) RecipeHelper.getInstance()).recipesLoaded(recipeManager), SYNC_RECIPES);
             } else {
-                //noinspection deprecation
                 ((RecipeHelperImpl) RecipeHelper.getInstance()).recipesLoaded(recipeManager);
             }
         });

+ 1 - 0
src/main/java/me/shedaniel/rei/api/ClientHelper.java

@@ -18,6 +18,7 @@ public interface ClientHelper {
     /**
      * @return the api instance of {@link ClientHelperImpl}
      */
+    @SuppressWarnings("deprecation")
     static ClientHelper getInstance() {
         return ClientHelperImpl.instance;
     }

+ 1 - 1
src/main/java/me/shedaniel/rei/api/ConfigManager.java

@@ -13,8 +13,8 @@ import java.io.IOException;
 
 public interface ConfigManager {
     
+    @SuppressWarnings("deprecation")
     static ConfigManager getInstance() {
-        //noinspection deprecation
         return RoughlyEnoughItemsCore.getConfigManager();
     }
     

+ 11 - 0
src/main/java/me/shedaniel/rei/api/ConfigObject.java

@@ -10,6 +10,7 @@ import me.shedaniel.rei.gui.config.ItemListOrdering;
 import me.shedaniel.rei.gui.config.RecipeScreenType;
 import me.shedaniel.rei.gui.config.SearchFieldLocation;
 import me.zeroeightsix.fiber.tree.ConfigNode;
+import me.zeroeightsix.fiber.tree.ConfigValue;
 import me.zeroeightsix.fiber.tree.Node;
 
 public interface ConfigObject {
@@ -18,6 +19,16 @@ public interface ConfigObject {
     
     ConfigNode getConfigNode();
     
+    ConfigValue<Boolean> getOverlayVisibleNode();
+    
+    boolean isLighterButtonHover();
+    
+    void setLighterButtonHover(boolean lighterButtonHover);
+    
+    boolean isOverlayVisible();
+    
+    void setOverlayVisible(boolean overlayVisible);
+    
     boolean isCheating();
     
     void setCheating(boolean cheating);

+ 1 - 1
src/main/java/me/shedaniel/rei/api/DisplayHelper.java

@@ -16,8 +16,8 @@ import static net.minecraft.util.ActionResult.PASS;
 
 public interface DisplayHelper {
     
+    @SuppressWarnings("deprecation")
     static DisplayHelper getInstance() {
-        //noinspection deprecation
         return RoughlyEnoughItemsCore.getDisplayHelper();
     }
     

+ 1 - 0
src/main/java/me/shedaniel/rei/api/EntryRegistry.java

@@ -14,6 +14,7 @@ import java.util.List;
 
 public interface EntryRegistry {
     
+    @SuppressWarnings("deprecation")
     static EntryRegistry getInstance() {
         return RoughlyEnoughItemsCore.getEntryRegistry();
     }

+ 7 - 13
src/main/java/me/shedaniel/rei/api/RecipeHelper.java

@@ -20,8 +20,8 @@ import java.util.function.Predicate;
 
 public interface RecipeHelper {
     
+    @SuppressWarnings("deprecation")
     static RecipeHelper getInstance() {
-        //noinspection deprecation
         return RoughlyEnoughItemsCore.getRecipeHelper();
     }
     
@@ -115,15 +115,15 @@ public interface RecipeHelper {
     Map<RecipeCategory<?>, List<RecipeDisplay>> getUsagesFor(EntryStack stack);
     
     /**
-     * Gets the optional of the speed crafting button area from a category
+     * Gets the optional of the auto crafting button area from a category
      *
      * @param category the category of the display
-     * @return the optional of speed crafting button area
+     * @return the optional of auto crafting button area
      */
     Optional<ButtonAreaSupplier> getAutoCraftButtonArea(RecipeCategory<?> category);
     
     /**
-     * Registers a speed crafting button area
+     * Registers a auto crafting button area
      *
      * @param category  the category of the button area
      * @param rectangle the button area
@@ -131,21 +131,14 @@ public interface RecipeHelper {
     void registerAutoCraftButtonArea(Identifier category, ButtonAreaSupplier rectangle);
     
     /**
-     * Removes the speed crafting button
+     * Removes the auto crafting button
      *
      * @param category the category of the button
      */
-    default void removeSpeedCraftButton(Identifier category) {
+    default void removeAutoCraftButton(Identifier category) {
         registerAutoCraftButtonArea(category, bounds -> null);
     }
     
-    /**
-     * @param category the category of the button area
-     * @deprecated Not required anymore
-     */
-    @Deprecated
-    void registerDefaultSpeedCraftButtonArea(Identifier category);
-    
     /**
      * Gets the map of all recipes visible to the player
      *
@@ -222,3 +215,4 @@ public interface RecipeHelper {
     }
     
 }
+

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

@@ -34,7 +34,6 @@ import net.minecraft.client.world.ClientWorld;
 import net.minecraft.container.Slot;
 import net.minecraft.item.ItemStack;
 import net.minecraft.sound.SoundEvents;
-import net.minecraft.text.TranslatableText;
 import net.minecraft.util.ActionResult;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.math.MathHelper;
@@ -73,7 +72,7 @@ public class ContainerScreenOverlay extends Widget {
         MatrixStack matrixStack_1 = new MatrixStack();
         VertexConsumerProvider.Immediate immediate = VertexConsumerProvider.immediate(Tessellator.getInstance().getBuffer());
         matrixStack_1.translate(0.0D, 0.0D, getBlitOffset());
-        Matrix4f matrix4f_1 = matrixStack_1.method_23760().method_23761();
+        Matrix4f matrix4f_1 = matrixStack_1.peek().getModel();
         for (int lineIndex = 0; lineIndex < tooltipLines.size(); lineIndex++) {
             font.draw(tooltipLines.get(lineIndex), x, currentY, -1, true, matrix4f_1, immediate, false, 0, 15728880);
             currentY += lineIndex == 0 ? 12 : 10;
@@ -100,6 +99,7 @@ public class ContainerScreenOverlay extends Widget {
         init(false);
     }
     
+    @SuppressWarnings("deprecation")
     public void init(boolean setPage) {
         this.shouldReInit = false;
         //Update Variables
@@ -112,7 +112,7 @@ public class ContainerScreenOverlay extends Widget {
         entryListWidget.updateList(boundsHandler, boundsHandler.getItemListArea(rectangle), page, searchTerm, false);
         
         if (!ConfigManager.getInstance().getConfig().isEntryListWidgetScrolled()) {
-            widgets.add(buttonLeft = new ButtonWidget(rectangle.x, rectangle.y + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 5, 16, 16, new TranslatableText("text.rei.left_arrow")) {
+            widgets.add(buttonLeft = new ButtonWidget(new Rectangle(rectangle.x, rectangle.y + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 5, 16, 16), I18n.translate("text.rei.left_arrow")) {
                 @Override
                 public void onPressed() {
                     page--;
@@ -136,7 +136,7 @@ public class ContainerScreenOverlay extends Widget {
                     return isNotInExclusionZones(mouseX, mouseY) && super.containsMouse(mouseX, mouseY);
                 }
             });
-            widgets.add(buttonRight = new ButtonWidget(rectangle.x + rectangle.width - 18, rectangle.y + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 5, 16, 16, new TranslatableText("text.rei.right_arrow")) {
+            widgets.add(buttonRight = new ButtonWidget(new Rectangle(rectangle.x + rectangle.width - 18, rectangle.y + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 5, 16, 16), I18n.translate("text.rei.right_arrow")) {
                 @Override
                 public void onPressed() {
                     page++;
@@ -164,8 +164,8 @@ public class ContainerScreenOverlay extends Widget {
         
         if (setPage)
             page = MathHelper.clamp(page, 0, getTotalPage());
-        
-        widgets.add(new ButtonWidget(ConfigManager.getInstance().getConfig().isLeftHandSidePanel() ? window.getScaledWidth() - 30 : 10, 10, 20, 20, "") {
+    
+        widgets.add(new ButtonWidget(new Rectangle(ConfigManager.getInstance().getConfig().isLeftHandSidePanel() ? window.getScaledWidth() - 30 : 10, 10, 20, 20), "") {
             @Override
             public void onPressed() {
                 if (Screen.hasShiftDown()) {
@@ -179,15 +179,16 @@ public class ContainerScreenOverlay extends Widget {
             public void render(int mouseX, int mouseY, float delta) {
                 super.render(mouseX, mouseY, delta);
                 GuiLighting.disable();
+                Rectangle bounds = getBounds();
                 if (ClientHelper.getInstance().isCheating() && RoughlyEnoughItemsCore.hasOperatorPermission()) {
                     if (RoughlyEnoughItemsCore.hasPermissionToUsePackets())
-                        fill(getBounds().x, getBounds().y, getBounds().x + 20, getBounds().y + 20, 721354752);
+                        fill(bounds.x + 1, bounds.y+ 1, bounds.getMaxX() - 1, bounds.getMaxY() - 1, 721354752);
                     else
-                        fill(getBounds().x, getBounds().y, getBounds().x + 20, getBounds().y + 20, 1476440063);
+                        fill(bounds.x+ 1, bounds.y+ 1, bounds.getMaxX() - 1, bounds.getMaxY() - 1, 1476440063);
                 }
                 MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
                 RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
-                blit(getBounds().x + 3, getBounds().y + 3, 0, 0, 14, 14);
+                blit(bounds.x + 3, bounds.y + 3, 0, 0, 14, 14);
             }
             
             @Override
@@ -216,7 +217,7 @@ public class ContainerScreenOverlay extends Widget {
             }
         });
         if (ConfigManager.getInstance().getConfig().doesShowUtilsButtons()) {
-            widgets.add(new ButtonWidget(ConfigManager.getInstance().getConfig().isLeftHandSidePanel() ? window.getScaledWidth() - 55 : 35, 10, 20, 20, "") {
+            widgets.add(new ButtonWidget(new Rectangle(ConfigManager.getInstance().getConfig().isLeftHandSidePanel() ? window.getScaledWidth() - 55 : 35, 10, 20, 20), "") {
                 @Override
                 public void onPressed() {
                     MinecraftClient.getInstance().player.sendChatMessage(ConfigManager.getInstance().getConfig().getGamemodeCommand().replaceAll("\\{gamemode}", getNextGameMode(Screen.hasShiftDown()).getName()));
@@ -224,7 +225,7 @@ public class ContainerScreenOverlay extends Widget {
                 
                 @Override
                 public void render(int mouseX, int mouseY, float delta) {
-                    text = getGameModeShortText(getCurrentGameMode());
+                    setText(getGameModeShortText(getCurrentGameMode()));
                     super.render(mouseX, mouseY, delta);
                 }
                 
@@ -245,7 +246,7 @@ public class ContainerScreenOverlay extends Widget {
             });
             int xxx = ConfigManager.getInstance().getConfig().isLeftHandSidePanel() ? window.getScaledWidth() - 30 : 10;
             for (Weather weather : Weather.values()) {
-                widgets.add(new ButtonWidget(xxx, 35, 20, 20, "") {
+                widgets.add(new ButtonWidget(new Rectangle(xxx, 35, 20, 20), "") {
                     @Override
                     public void onPressed() {
                         MinecraftClient.getInstance().player.sendChatMessage(ConfigManager.getInstance().getConfig().getWeatherCommand().replaceAll("\\{weather}", weather.name().toLowerCase(Locale.ROOT)));
@@ -279,11 +280,11 @@ public class ContainerScreenOverlay extends Widget {
             }
         }
         if (!ConfigManager.getInstance().getConfig().isEntryListWidgetScrolled()) {
-            widgets.add(new ClickableLabelWidget(rectangle.x + (rectangle.width / 2), rectangle.y + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 10, "", getTotalPage() > 0) {
+            widgets.add(new ClickableLabelWidget(new Point(rectangle.x + (rectangle.width / 2), rectangle.y + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + 10), "") {
                 @Override
                 public void render(int mouseX, int mouseY, float delta) {
                     page = MathHelper.clamp(page, 0, getTotalPage());
-                    this.text = String.format("%s/%s", page + 1, getTotalPage() + 1);
+                    setText(String.format("%s/%s", page + 1, getTotalPage() + 1));
                     super.render(mouseX, mouseY, delta);
                 }
                 
@@ -303,11 +304,10 @@ public class ContainerScreenOverlay extends Widget {
                 public boolean changeFocus(boolean boolean_1) {
                     return false;
                 }
-            });
+            }.clickable(getTotalPage() > 0));
             buttonLeft.enabled = buttonRight.enabled = getTotalPage() > 0;
         }
         if (ScreenHelper.getSearchField() == null) {
-            //noinspection deprecation
             ScreenHelper.setSearchField(new OverlaySearchField(0, 0, 0, 0));
         }
         ScreenHelper.getSearchField().getBounds().setBounds(getTextFieldArea());

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

@@ -30,7 +30,7 @@ public class OverlaySearchField extends TextFieldWidget {
     public void laterRender(int int_1, int int_2, float float_1) {
         GuiLighting.disable();
         RenderSystem.disableDepthTest();
-        setEditableColor(ContainerScreenOverlay.getEntryListWidget().children().isEmpty() && !getText().isEmpty() ? 16733525 : isSearching ? -1313241 : 14737632);
+        setEditableColor(ContainerScreenOverlay.getEntryListWidget().children().isEmpty() && !getText().isEmpty() ? 16733525 : isSearching ? -852212 : 14737632);
         setSuggestion(!isFocused() && getText().isEmpty() ? I18n.translate("text.rei.search.field.suggestion") : null);
         super.render(int_1, int_2, float_1);
         RenderSystem.enableDepthTest();
@@ -41,7 +41,7 @@ public class OverlaySearchField extends TextFieldWidget {
         if (!isSearching)
             super.renderBorder();
         else if (this.hasBorder()) {
-            fill(this.getBounds().x - 1, this.getBounds().y - 1, this.getBounds().x + this.getBounds().width + 1, this.getBounds().y + this.getBounds().height + 1, -1313241);
+            fill(this.getBounds().x - 1, this.getBounds().y - 1, this.getBounds().x + this.getBounds().width + 1, this.getBounds().y + this.getBounds().height + 1, -852212);
             fill(this.getBounds().x, this.getBounds().y, this.getBounds().x + this.getBounds().width, this.getBounds().y + this.getBounds().height, -16777216);
         }
     }

+ 1 - 1
src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java

@@ -51,7 +51,7 @@ public class PreRecipeViewingScreen extends Screen {
     protected void init() {
         this.children.clear();
         this.widgets.clear();
-        this.widgets.add(new ButtonWidget(width / 2 - 100, height - 40, 200, 20, I18n.translate("text.rei.select")) {
+        this.widgets.add(new ButtonWidget(new Rectangle(width / 2 - 100, height - 40, 200, 20), I18n.translate("text.rei.select")) {
             @Override
             public void onPressed() {
                 ConfigManager.getInstance().getConfig().setRecipeScreenType(original ? RecipeScreenType.ORIGINAL : RecipeScreenType.VILLAGER);

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

@@ -7,6 +7,7 @@ package me.shedaniel.rei.gui;
 
 import com.google.common.collect.Lists;
 import com.mojang.blaze3d.systems.RenderSystem;
+import me.shedaniel.math.api.Point;
 import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.math.impl.PointHelper;
 import me.shedaniel.rei.api.*;
@@ -22,7 +23,6 @@ import net.minecraft.client.sound.PositionedSoundInstance;
 import net.minecraft.client.util.Window;
 import net.minecraft.sound.SoundEvents;
 import net.minecraft.text.LiteralText;
-import net.minecraft.text.TranslatableText;
 import net.minecraft.util.Formatting;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.math.MathHelper;
@@ -129,7 +129,7 @@ public class RecipeViewingScreen extends Screen {
         this.page = MathHelper.clamp(page, 0, getTotalPages(selectedCategory) - 1);
         
         ButtonWidget w, w2;
-        this.widgets.add(w = new ButtonWidget(bounds.x + 2, bounds.y - 16, 10, 10, new TranslatableText("text.rei.left_arrow")) {
+        this.widgets.add(w = new ButtonWidget(new Rectangle(bounds.x + 2, bounds.y - 16, 10, 10), I18n.translate("text.rei.left_arrow")) {
             @Override
             public void onPressed() {
                 categoryPages--;
@@ -138,7 +138,7 @@ public class RecipeViewingScreen extends Screen {
                 RecipeViewingScreen.this.init();
             }
         });
-        this.widgets.add(w2 = new ButtonWidget(bounds.x + bounds.width - 12, bounds.y - 16, 10, 10, new TranslatableText("text.rei.right_arrow")) {
+        this.widgets.add(w2 = new ButtonWidget(new Rectangle(bounds.x + bounds.width - 12, bounds.y - 16, 10, 10), I18n.translate("text.rei.right_arrow")) {
             @Override
             public void onPressed() {
                 categoryPages++;
@@ -148,7 +148,7 @@ public class RecipeViewingScreen extends Screen {
             }
         });
         w.enabled = w2.enabled = categories.size() > TABS_PER_PAGE;
-        widgets.add(categoryBack = new ButtonWidget(bounds.getX() + 5, bounds.getY() + 5, 12, 12, new TranslatableText("text.rei.left_arrow")) {
+        widgets.add(categoryBack = new ButtonWidget(new Rectangle(bounds.getX() + 5, bounds.getY() + 5, 12, 12), I18n.translate("text.rei.left_arrow")) {
             @Override
             public void onPressed() {
                 int currentCategoryIndex = categories.indexOf(selectedCategory);
@@ -166,10 +166,10 @@ public class RecipeViewingScreen extends Screen {
                 return Optional.ofNullable(I18n.translate("text.rei.previous_category"));
             }
         });
-        widgets.add(new ClickableLabelWidget(bounds.getCenterX(), bounds.getY() + 7, "") {
+        widgets.add(new ClickableLabelWidget(new Point(bounds.getCenterX(), bounds.getY() + 7), "") {
             @Override
             public void render(int mouseX, int mouseY, float delta) {
-                this.text = selectedCategory.getCategoryName();
+                setText(selectedCategory.getCategoryName());
                 super.render(mouseX, mouseY, delta);
             }
             
@@ -184,7 +184,7 @@ public class RecipeViewingScreen extends Screen {
                 ClientHelper.getInstance().executeViewAllRecipesKeyBind();
             }
         });
-        widgets.add(categoryNext = new ButtonWidget(bounds.getMaxX() - 17, bounds.getY() + 5, 12, 12, new TranslatableText("text.rei.right_arrow")) {
+        widgets.add(categoryNext = new ButtonWidget(new Rectangle(bounds.getMaxX() - 17, bounds.getY() + 5, 12, 12), I18n.translate("text.rei.right_arrow")) {
             @Override
             public void onPressed() {
                 int currentCategoryIndex = categories.indexOf(selectedCategory);
@@ -205,7 +205,7 @@ public class RecipeViewingScreen extends Screen {
         categoryBack.enabled = categories.size() > 1;
         categoryNext.enabled = categories.size() > 1;
         
-        widgets.add(recipeBack = new ButtonWidget(bounds.getX() + 5, bounds.getY() + 21, 12, 12, new TranslatableText("text.rei.left_arrow")) {
+        widgets.add(recipeBack = new ButtonWidget(new Rectangle(bounds.getX() + 5, bounds.getY() + 21, 12, 12), I18n.translate("text.rei.left_arrow")) {
             @Override
             public void onPressed() {
                 page--;
@@ -219,10 +219,10 @@ public class RecipeViewingScreen extends Screen {
                 return Optional.ofNullable(I18n.translate("text.rei.previous_page"));
             }
         });
-        widgets.add(new ClickableLabelWidget(bounds.getCenterX(), bounds.getY() + 23, "", categoriesMap.get(selectedCategory).size() > getRecipesPerPageByHeight()) {
+        widgets.add(new ClickableLabelWidget(new Point(bounds.getCenterX(), bounds.getY() + 23), "") {
             @Override
             public void render(int mouseX, int mouseY, float delta) {
-                this.text = String.format("%d/%d", page + 1, getTotalPages(selectedCategory));
+                setText(String.format("%d/%d", page + 1, getTotalPages(selectedCategory)));
                 super.render(mouseX, mouseY, delta);
             }
             
@@ -237,8 +237,8 @@ public class RecipeViewingScreen extends Screen {
                 RecipeViewingScreen.this.choosePageActivated = true;
                 RecipeViewingScreen.this.init();
             }
-        });
-        widgets.add(recipeNext = new ButtonWidget(bounds.getMaxX() - 17, bounds.getY() + 21, 12, 12, new TranslatableText("text.rei.right_arrow")) {
+        }.clickable(categoriesMap.get(selectedCategory).size() > getRecipesPerPageByHeight()));
+        widgets.add(recipeNext = new ButtonWidget(new Rectangle(bounds.getMaxX() - 17, bounds.getY() + 21, 12, 12), I18n.translate("text.rei.right_arrow")) {
             @Override
             public void onPressed() {
                 page++;

+ 19 - 10
src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java

@@ -12,6 +12,7 @@ import me.shedaniel.clothconfig2.ClothConfigInitializer;
 import me.shedaniel.clothconfig2.api.ScissorsHandler;
 import me.shedaniel.clothconfig2.gui.widget.DynamicNewSmoothScrollingEntryListWidget.Interpolation;
 import me.shedaniel.clothconfig2.gui.widget.DynamicNewSmoothScrollingEntryListWidget.Precision;
+import me.shedaniel.math.api.Point;
 import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.math.impl.PointHelper;
 import me.shedaniel.rei.api.*;
@@ -138,7 +139,7 @@ public class VillagerRecipeViewingScreen extends Screen {
             int finalIndex = index;
             RecipeEntry recipeEntry;
             recipeRenderers.add(recipeEntry = category.getSimpleRenderer(recipeDisplay));
-            buttonWidgets.add(new ButtonWidget(bounds.x + 5, 0, recipeEntry.getWidth(), recipeEntry.getHeight(), "") {
+            buttonWidgets.add(new ButtonWidget(new Rectangle(bounds.x + 5, 0, recipeEntry.getWidth(), recipeEntry.getHeight()), "") {
                 @Override
                 public void onPressed() {
                     selectedRecipeIndex = finalIndex;
@@ -192,7 +193,7 @@ public class VillagerRecipeViewingScreen extends Screen {
             }
         }
         ButtonWidget w, w2;
-        this.widgets.add(w = new ButtonWidget(bounds.x + 2, bounds.y - 16, 10, 10, new TranslatableText("text.rei.left_arrow")) {
+        this.widgets.add(w = new ButtonWidget(new Rectangle(bounds.x + 2, bounds.y - 16, 10, 10), new TranslatableText("text.rei.left_arrow")) {
             @Override
             public void onPressed() {
                 tabsPage--;
@@ -201,7 +202,7 @@ public class VillagerRecipeViewingScreen extends Screen {
                 VillagerRecipeViewingScreen.this.init();
             }
         });
-        this.widgets.add(w2 = new ButtonWidget(bounds.x + bounds.width - 12, bounds.y - 16, 10, 10, new TranslatableText("text.rei.right_arrow")) {
+        this.widgets.add(w2 = new ButtonWidget(new Rectangle(bounds.x + bounds.width - 12, bounds.y - 16, 10, 10), new TranslatableText("text.rei.right_arrow")) {
             @Override
             public void onPressed() {
                 tabsPage++;
@@ -212,7 +213,7 @@ public class VillagerRecipeViewingScreen extends Screen {
         });
         w.enabled = w2.enabled = categories.size() > TABS_PER_PAGE;
         
-        this.widgets.add(new ClickableLabelWidget(bounds.x + 4 + scrollListBounds.width / 2, bounds.y + 6, categories.get(selectedCategoryIndex).getCategoryName()) {
+        this.widgets.add(new ClickableLabelWidget(new Point(bounds.x + 4 + scrollListBounds.width / 2, bounds.y + 6), categories.get(selectedCategoryIndex).getCategoryName()) {
             @Override
             public void onLabelClicked() {
                 MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F));
@@ -382,7 +383,10 @@ public class VillagerRecipeViewingScreen extends Screen {
             height -= Math.min((scroll < 0 ? (int) -scroll : scroll > getMaxScroll() ? (int) scroll - getMaxScroll() : 0), height * .95);
             height = Math.max(10, height);
             int minY = (int) Math.min(Math.max((int) scroll * (scrollListBounds.height - 2 - height) / getMaxScroll() + scrollListBounds.y + 1, scrollListBounds.y + 1), scrollListBounds.getMaxY() - 1 - height);
-            double scrollbarPositionMinX = scrollListBounds.getMaxX() - 6, scrollbarPositionMaxX = scrollListBounds.getMaxX() - 2;
+            int scrollbarPositionMinX = scrollListBounds.getMaxX() - 6, scrollbarPositionMaxX = scrollListBounds.getMaxX() - 1;
+            boolean hovered = (new Rectangle(scrollbarPositionMinX, minY, scrollbarPositionMaxX - scrollbarPositionMinX, height)).contains(PointHelper.fromMouse());
+            float bottomC = (hovered ? .67f : .5f) * (ScreenHelper.isDarkModeEnabled() ? 0.8f : 1f);
+            float topC = (hovered ? .87f : .67f) * (ScreenHelper.isDarkModeEnabled() ? 0.8f : 1f);
             GuiLighting.disable();
             RenderSystem.disableTexture();
             RenderSystem.enableBlend();
@@ -390,11 +394,16 @@ public class VillagerRecipeViewingScreen extends Screen {
             RenderSystem.blendFuncSeparate(770, 771, 1, 0);
             RenderSystem.shadeModel(7425);
             buffer.begin(7, VertexFormats.POSITION_COLOR);
-            float b = ScreenHelper.isDarkModeEnabled() ? 0.37f : 1f;
-            buffer.vertex(scrollbarPositionMinX, minY + height, 800).color(b, b, b, scrollBarAlpha).next();
-            buffer.vertex(scrollbarPositionMaxX, minY + height, 800).color(b, b, b, scrollBarAlpha).next();
-            buffer.vertex(scrollbarPositionMaxX, minY, 800).color(b, b, b, scrollBarAlpha).next();
-            buffer.vertex(scrollbarPositionMinX, minY, 800).color(b, b, b, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMinX, minY + height, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMaxX, minY + height, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMaxX, minY, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMinX, minY, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+            tessellator.draw();
+            buffer.begin(7, VertexFormats.POSITION_COLOR);
+            buffer.vertex(scrollbarPositionMinX, minY + height - 1, 800).color(topC, topC, topC, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMaxX - 1, minY + height - 1, 800).color(topC, topC, topC, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMaxX - 1, minY, 800).color(topC, topC, topC, scrollBarAlpha).next();
+            buffer.vertex(scrollbarPositionMinX, minY, 800).color(topC, topC, topC, scrollBarAlpha).next();
             tessellator.draw();
             RenderSystem.shadeModel(7424);
             RenderSystem.disableBlend();

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

@@ -6,7 +6,6 @@
 package me.shedaniel.rei.gui.widget;
 
 import com.google.common.collect.Lists;
-import com.mojang.blaze3d.systems.RenderSystem;
 import it.unimi.dsi.fastutil.ints.IntList;
 import me.shedaniel.math.api.Point;
 import me.shedaniel.math.api.Rectangle;
@@ -20,7 +19,6 @@ import net.minecraft.client.resource.language.I18n;
 import net.minecraft.util.Formatting;
 import net.minecraft.util.Identifier;
 import net.minecraft.util.Lazy;
-import net.minecraft.util.math.MathHelper;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -127,27 +125,7 @@ public class AutoCraftingButtonWidget extends ButtonWidget {
             }
         }
         int x = getBounds().x, y = getBounds().y, width = getBounds().width, height = getBounds().height;
-        minecraft.getTextureManager().bindTexture(ScreenHelper.isDarkModeEnabled() ? BUTTON_LOCATION_DARK : BUTTON_LOCATION);
-        RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
-        int textureOffset = this.getTextureId(isHovered(mouseX, mouseY));
-        RenderSystem.enableBlend();
-        RenderSystem.blendFuncSeparate(770, 771, 1, 0);
-        RenderSystem.blendFunc(770, 771);
-        //Four Corners
-        blit(x, y, 0, textureOffset * 80, 4, 4);
-        blit(x + width - 4, y, 252, textureOffset * 80, 4, 4);
-        blit(x, y + height - 4, 0, textureOffset * 80 + 76, 4, 4);
-        blit(x + width - 4, y + height - 4, 252, textureOffset * 80 + 76, 4, 4);
-        
-        //Sides
-        blit(x + 4, y, 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4);
-        blit(x + 4, y + height - 4, 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4);
-        blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4);
-        blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4);
-        for (int i = y + 4; i < y + height - 4; i += 76) {
-            blit(x, i, 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76));
-            blit(x + MathHelper.ceil(width / 2f), i, 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76));
-        }
+        renderBackground(x, y, width, height, this.getTextureId(isHovered(mouseX, mouseY)));
         
         int colour = 14737632;
         if (!this.visible) {
@@ -157,7 +135,7 @@ public class AutoCraftingButtonWidget extends ButtonWidget {
         }
         
         fillGradient(x, y, x + width, y + height, color, color);
-        this.drawCenteredString(font, text, x + width / 2, y + (height - 8) / 2, colour);
+        this.drawCenteredString(font, getText(), x + width / 2, y + (height - 8) / 2, colour);
         
         if (getTooltips().isPresent())
             if (!focused && containsMouse(mouseX, mouseY))
@@ -168,7 +146,7 @@ public class AutoCraftingButtonWidget extends ButtonWidget {
     
     @Override
     protected int getTextureId(boolean boolean_1) {
-        return !visible ? 0 : boolean_1 && enabled ? 2 : 1;
+        return !visible ? 0 : boolean_1 && enabled ? (ConfigManager.getInstance().getConfig().isLighterButtonHover() ? 4 : 3) : 1;
     }
     
     @Override

+ 36 - 31
src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java

@@ -8,6 +8,7 @@ package me.shedaniel.rei.gui.widget;
 import com.mojang.blaze3d.systems.RenderSystem;
 import me.shedaniel.math.api.Point;
 import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.rei.api.ConfigManager;
 import me.shedaniel.rei.impl.ScreenHelper;
 import net.minecraft.client.gui.Element;
 import net.minecraft.client.sound.PositionedSoundInstance;
@@ -18,37 +19,38 @@ import net.minecraft.util.math.MathHelper;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 import java.util.Optional;
 
 public abstract class ButtonWidget extends WidgetWithBounds {
     
-    public static final Identifier BUTTON_LOCATION = new Identifier("roughlyenoughitems", "textures/gui/button.png");
-    public static final Identifier BUTTON_LOCATION_DARK = new Identifier("roughlyenoughitems", "textures/gui/button_dark.png");
-    public String text;
+    protected static final Identifier BUTTON_LOCATION = new Identifier("roughlyenoughitems", "textures/gui/button.png");
+    protected static final Identifier BUTTON_LOCATION_DARK = new Identifier("roughlyenoughitems", "textures/gui/button_dark.png");
     public boolean enabled;
     public boolean focused;
+    private String text;
     private Rectangle bounds;
     
     public ButtonWidget(Rectangle rectangle, Text text) {
-        this(rectangle, text.asFormattedString());
+        this(rectangle, Objects.requireNonNull(text).asFormattedString());
     }
     
     public ButtonWidget(Rectangle rectangle, String text) {
-        this.bounds = rectangle;
+        this.bounds = Objects.requireNonNull(rectangle);
         this.enabled = true;
-        this.text = text;
+        this.text = Objects.requireNonNull(text);
     }
     
-    public ButtonWidget(int x, int y, int width, int height, String text) {
-        this(new Rectangle(x, y, width, height), text);
+    public Rectangle getBounds() {
+        return bounds;
     }
     
-    public ButtonWidget(int x, int y, int width, int height, Text text) {
-        this(new Rectangle(x, y, width, height), text);
+    public String getText() {
+        return text;
     }
     
-    public Rectangle getBounds() {
-        return bounds;
+    public void setText(String text) {
+        this.text = text;
     }
     
     protected int getTextureId(boolean boolean_1) {
@@ -56,45 +58,48 @@ public abstract class ButtonWidget extends WidgetWithBounds {
         if (!this.enabled) {
             int_1 = 0;
         } else if (boolean_1) {
-            int_1 = 2;
+            int_1 = ConfigManager.getInstance().getConfig().isLighterButtonHover() ? 4 : 3; // 2 is the old blue highlight, 3 is the 1.15 outline, 4 is the 1.15 online + light hover
         }
         
         return int_1;
     }
     
-    @Override
-    public void render(int mouseX, int mouseY, float delta) {
-        int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height;
+    protected void renderBackground(int x, int y, int width, int height, int textureOffset) {
         minecraft.getTextureManager().bindTexture(ScreenHelper.isDarkModeEnabled() ? BUTTON_LOCATION_DARK : BUTTON_LOCATION);
         RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
-        int textureOffset = this.getTextureId(isHovered(mouseX, mouseY));
         RenderSystem.enableBlend();
         RenderSystem.blendFuncSeparate(770, 771, 1, 0);
         RenderSystem.blendFunc(770, 771);
         //Four Corners
-        blit(x, y, 0, textureOffset * 80, 4, 4);
-        blit(x + width - 4, y, 252, textureOffset * 80, 4, 4);
-        blit(x, y + height - 4, 0, textureOffset * 80 + 76, 4, 4);
-        blit(x + width - 4, y + height - 4, 252, textureOffset * 80 + 76, 4, 4);
+        blit(x, y, getBlitOffset(), 0, textureOffset * 80, 4, 4, 512, 256);
+        blit(x + width - 4, y, getBlitOffset(), 252, textureOffset * 80, 4, 4, 512, 256);
+        blit(x, y + height - 4, getBlitOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256);
+        blit(x + width - 4, y + height - 4, getBlitOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256);
         
         //Sides
-        blit(x + 4, y, 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4);
-        blit(x + 4, y + height - 4, 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4);
-        blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4);
-        blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4);
+        blit(x + 4, y, getBlitOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256);
+        blit(x + 4, y + height - 4, getBlitOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256);
+        blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getBlitOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256);
+        blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getBlitOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256);
         for (int i = y + 4; i < y + height - 4; i += 76) {
-            blit(x, i, 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76));
-            blit(x + MathHelper.ceil(width / 2f), i, 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76));
+            blit(x, i, getBlitOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256);
+            blit(x + MathHelper.ceil(width / 2f), i, getBlitOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256);
         }
+    }
+    
+    @Override
+    public void render(int mouseX, int mouseY, float delta) {
+        int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height;
+        renderBackground(x, y, width, height, this.getTextureId(isHovered(mouseX, mouseY)));
         
-        int colour = 14737632;
+        int color = 14737632;
         if (!this.enabled) {
-            colour = 10526880;
+            color = 10526880;
         } else if (isHovered(mouseX, mouseY)) {
-            colour = 16777120;
+            color = 16777120;
         }
         
-        this.drawCenteredString(font, text, x + width / 2, y + (height - 8) / 2, colour);
+        this.drawCenteredString(font, getText(), x + width / 2, y + (height - 8) / 2, color);
         
         if (getTooltips().isPresent())
             if (!focused && containsMouse(mouseX, mouseY))

+ 37 - 16
src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java

@@ -13,17 +13,28 @@ import java.util.Optional;
 public abstract class ClickableLabelWidget extends LabelWidget {
     
     public boolean focused;
-    public boolean clickable;
-    public int hoveredColor;
+    private boolean clickable = true;
+    private int hoveredColor;
     
+    @Deprecated
     public ClickableLabelWidget(int x, int y, String text, boolean clickable) {
-        super(x, y, text);
-        this.clickable = clickable;
-        this.hoveredColor = ScreenHelper.isDarkModeEnabled() ? -1 : 0xFF66FFCC;
+        this(new Point(x, y), text, clickable);
     }
     
+    @Deprecated
     public ClickableLabelWidget(int x, int y, String text) {
-        this(x, y, text, true);
+        this(new Point(x, y), text, true);
+    }
+    
+    @Deprecated
+    public ClickableLabelWidget(Point point, String text, boolean clickable) {
+        this(point, text);
+        clickable(clickable);
+    }
+    
+    public ClickableLabelWidget(Point point, String text) {
+        super(point, text);
+        this.hoveredColor = ScreenHelper.isDarkModeEnabled() ? -1 : 0xFF66FFCC;
     }
     
     public LabelWidget hoveredColor(int hoveredColor) {
@@ -31,21 +42,31 @@ public abstract class ClickableLabelWidget extends LabelWidget {
         return this;
     }
     
+    public LabelWidget clickable(boolean clickable) {
+        this.clickable = clickable;
+        return this;
+    }
+    
+    public boolean isClickable() {
+        return clickable;
+    }
+    
     @Override
     public void render(int mouseX, int mouseY, float delta) {
         int color = getDefaultColor();
-        if (clickable && isHovered(mouseX, mouseY))
+        if (isClickable() && isHovered(mouseX, mouseY))
             color = getHoveredColor();
-        int width = font.getStringWidth(text);
+        Point pos = getPosition();
+        int width = font.getStringWidth(getText());
         if (isHasShadows())
-            font.drawWithShadow(text, x - width / 2, y, color);
+            font.drawWithShadow(getText(), pos.x - width / 2, pos.y, color);
         else
-            font.draw(text, x - width / 2, y, color);
-        if (clickable && getTooltips().isPresent())
+            font.draw(getText(), pos.x - width / 2, pos.y, color);
+        if (isClickable() && getTooltips().isPresent())
             if (!focused && containsMouse(mouseX, mouseY))
                 ScreenHelper.getLastOverlay().addTooltip(QueuedTooltip.create(getTooltips().get().split("\n")));
             else if (focused)
-                ScreenHelper.getLastOverlay().addTooltip(QueuedTooltip.create(new Point(x, y), getTooltips().get().split("\n")));
+                ScreenHelper.getLastOverlay().addTooltip(QueuedTooltip.create(pos, getTooltips().get().split("\n")));
     }
     
     public int getHoveredColor() {
@@ -54,7 +75,7 @@ public abstract class ClickableLabelWidget extends LabelWidget {
     
     @Override
     public boolean mouseClicked(double mouseX, double mouseY, int button) {
-        if (button == 0 && clickable && containsMouse(mouseX, mouseY)) {
+        if (button == 0 && isClickable() && containsMouse(mouseX, mouseY)) {
             onLabelClicked();
             return true;
         }
@@ -67,7 +88,7 @@ public abstract class ClickableLabelWidget extends LabelWidget {
     
     @Override
     public boolean keyPressed(int int_1, int int_2, int int_3) {
-        if (!clickable || !focused)
+        if (!isClickable() || !focused)
             return false;
         if (int_1 != 257 && int_1 != 32 && int_1 != 335)
             return false;
@@ -77,14 +98,14 @@ public abstract class ClickableLabelWidget extends LabelWidget {
     
     @Override
     public boolean changeFocus(boolean boolean_1) {
-        if (!clickable)
+        if (!isClickable())
             return false;
         this.focused = !this.focused;
         return true;
     }
     
     public boolean isHovered(int mouseX, int mouseY) {
-        return clickable && (containsMouse(mouseX, mouseY) || focused);
+        return isClickable() && (containsMouse(mouseX, mouseY) || focused);
     }
     
     public abstract void onLabelClicked();

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

@@ -36,16 +36,16 @@ public abstract class CraftableToggleButtonWidget extends ButtonWidget {
         GuiLighting.disable();
         super.render(mouseX, mouseY, delta);
         
-        //        GuiLighting.enableForItems();
         this.itemRenderer.zOffset = getBlitOffset();
-        this.itemRenderer.renderGuiItem(new ItemStack(Blocks.CRAFTING_TABLE), getBounds().x + 2, getBounds().y + 2);
+        Rectangle bounds = getBounds();
+        this.itemRenderer.renderGuiItem(new ItemStack(Blocks.CRAFTING_TABLE), bounds.x + 2, bounds.y + 2);
         this.itemRenderer.zOffset = 0.0F;
         GuiLighting.disable();
         MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
         RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
         int color = ConfigManager.getInstance().isCraftableOnlyEnabled() ? 939579655 : 956235776;
         setBlitOffset(getBlitOffset() + 10);
-        this.fillGradient(getBounds().x, getBounds().y, getBounds().x + getBounds().width, getBounds().y + getBounds().height, color, color);
+        this.fillGradient(bounds.x + 1, bounds.y + 1, bounds.getMaxX() - 1, bounds.getMaxY() - 1, color, color);
         setBlitOffset(0);
     }
     

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

@@ -313,7 +313,10 @@ public class EntryListWidget extends Widget {
                 scrollBarHeight = MathHelper.clamp(scrollBarHeight, 32, rectangle.height - 8);
                 scrollBarHeight = (int) ((double) scrollBarHeight - Math.min((double) (this.scroll < 0.0D ? (int) (-this.scroll) : (this.scroll > (double) this.getMaxScroll() ? (int) this.scroll - this.getMaxScroll() : 0)), (double) scrollBarHeight * 0.75D));
                 int minY = (int) Math.min(Math.max((int) this.getScroll() * (rectangle.height - scrollBarHeight) / maxScroll + rectangle.y, rectangle.y), rectangle.getMaxY() - scrollBarHeight);
-                double scrollbarPositionMinX = rectangle.getMaxX() - 6, scrollbarPositionMaxX = rectangle.getMaxX() - 1;
+                int scrollbarPositionMinX = rectangle.getMaxX() - 5, scrollbarPositionMaxX = rectangle.getMaxX();
+                boolean hovered = (new Rectangle(scrollbarPositionMinX, minY, scrollbarPositionMaxX - scrollbarPositionMinX, scrollBarHeight)).contains(PointHelper.fromMouse());
+                float bottomC = (hovered ? .67f : .5f) * (ScreenHelper.isDarkModeEnabled() ? 0.8f : 1f);
+                float topC = (hovered ? .87f : .67f) * (ScreenHelper.isDarkModeEnabled() ? 0.8f : 1f);
                 GuiLighting.disable();
                 RenderSystem.disableTexture();
                 RenderSystem.enableBlend();
@@ -321,11 +324,16 @@ public class EntryListWidget extends Widget {
                 RenderSystem.blendFuncSeparate(770, 771, 1, 0);
                 RenderSystem.shadeModel(7425);
                 buffer.begin(7, VertexFormats.POSITION_COLOR);
-                float b = ScreenHelper.isDarkModeEnabled() ? 0.8f : 1f;
-                buffer.vertex(scrollbarPositionMinX, minY + scrollBarHeight, 1000D).color(b, b, b, scrollBarAlpha).next();
-                buffer.vertex(scrollbarPositionMaxX, minY + scrollBarHeight, 1000D).color(b, b, b, scrollBarAlpha).next();
-                buffer.vertex(scrollbarPositionMaxX, minY, 1000D).color(b, b, b, scrollBarAlpha).next();
-                buffer.vertex(scrollbarPositionMinX, minY, 1000D).color(b, b, b, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMinX, minY + scrollBarHeight, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMaxX, minY + scrollBarHeight, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMaxX, minY, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMinX, minY, 800).color(bottomC, bottomC, bottomC, scrollBarAlpha).next();
+                tessellator.draw();
+                buffer.begin(7, VertexFormats.POSITION_COLOR);
+                buffer.vertex(scrollbarPositionMinX, minY + scrollBarHeight - 1, 800).color(topC, topC, topC, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMaxX - 1, minY + scrollBarHeight - 1, 800).color(topC, topC, topC, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMaxX - 1, minY, 800).color(topC, topC, topC, scrollBarAlpha).next();
+                buffer.vertex(scrollbarPositionMinX, minY, 800).color(topC, topC, topC, scrollBarAlpha).next();
                 tessellator.draw();
                 RenderSystem.shadeModel(7424);
                 RenderSystem.disableBlend();

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

@@ -5,6 +5,7 @@
 
 package me.shedaniel.rei.gui.widget;
 
+import me.shedaniel.math.api.Point;
 import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.rei.impl.ScreenHelper;
 import net.minecraft.client.gui.Element;
@@ -14,19 +15,36 @@ import java.util.List;
 
 public class LabelWidget extends WidgetWithBounds {
     
-    public int x;
-    public int y;
-    public String text;
+    private Point pos;
+    private String text;
     private int defaultColor;
     private boolean hasShadows = true;
+    private boolean centered = true;
     
+    @Deprecated
     public LabelWidget(int x, int y, String text) {
-        this.x = x;
-        this.y = y;
+        this(new Point(x, y), text);
+    }
+    
+    public LabelWidget(Point point, String text) {
+        this.pos = point;
         this.text = text;
         this.defaultColor = ScreenHelper.isDarkModeEnabled() ? 0xFFBBBBBB : -1;
     }
     
+    public boolean isCentered() {
+        return centered;
+    }
+    
+    public void setCentered(boolean centered) {
+        this.centered = centered;
+    }
+    
+    public LabelWidget centered() {
+        setCentered(true);
+        return this;
+    }
+    
     public boolean isHasShadows() {
         return hasShadows;
     }
@@ -35,6 +53,11 @@ public class LabelWidget extends WidgetWithBounds {
         this.hasShadows = hasShadows;
     }
     
+    public LabelWidget noShadow() {
+        setHasShadows(false);
+        return this;
+    }
+    
     public int getDefaultColor() {
         return defaultColor;
     }
@@ -43,6 +66,24 @@ public class LabelWidget extends WidgetWithBounds {
         this.defaultColor = defaultColor;
     }
     
+    public Point getPosition() {
+        return pos;
+    }
+    
+    public LabelWidget setPosition(Point position) {
+        this.pos = position;
+        return this;
+    }
+    
+    public String getText() {
+        return text;
+    }
+    
+    public LabelWidget setText(String text) {
+        this.text = text;
+        return this;
+    }
+    
     public LabelWidget color(int defaultColor) {
         this.defaultColor = defaultColor;
         return this;
@@ -51,7 +92,8 @@ public class LabelWidget extends WidgetWithBounds {
     @Override
     public Rectangle getBounds() {
         int width = font.getStringWidth(text);
-        return new Rectangle(x - width / 2 - 1, y - 5, width + 2, 14);
+        Point pos = getPosition();
+        return new Rectangle(pos.x - width / 2 - 1, pos.y - 5, width + 2, 14);
     }
     
     @Override
@@ -62,9 +104,10 @@ public class LabelWidget extends WidgetWithBounds {
     @Override
     public void render(int mouseX, int mouseY, float delta) {
         int width = font.getStringWidth(text);
+        Point pos = getPosition();
         if (hasShadows)
-            font.drawWithShadow(text, x - width / 2, y, defaultColor);
-        else font.draw(text, x - width / 2, y, defaultColor);
+            font.drawWithShadow(text, pos.x - width / 2, pos.y, defaultColor);
+        else font.draw(text, pos.x - width / 2, pos.y, defaultColor);
     }
     
 }

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

@@ -116,7 +116,7 @@ public class RecipeChoosePageWidget extends DraggableWidget {
             return stringBuilder_1.toString();
         };
         textFieldWidget.setText(String.valueOf(currentPage + 1));
-        widgets.add(btnDone = new ButtonWidget(bounds.x + bounds.width - 45, bounds.y + bounds.height + 3, 40, 20, I18n.translate("gui.done")) {
+        widgets.add(btnDone = new ButtonWidget(new Rectangle(bounds.x + bounds.width - 45, bounds.y + bounds.height + 3, 40, 20), I18n.translate("gui.done")) {
             @Override
             public void onPressed() {
                 recipeViewingScreen.page = MathHelper.clamp(getIntFromString(textFieldWidget.getText()).orElse(0) - 1, 0, recipeViewingScreen.getTotalPages(recipeViewingScreen.getSelectedCategory()) - 1);

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

@@ -9,6 +9,8 @@ import com.google.common.base.Predicates;
 import com.mojang.blaze3d.platform.GlStateManager;
 import com.mojang.blaze3d.systems.RenderSystem;
 import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.impl.PointHelper;
+import me.shedaniel.rei.impl.ScreenHelper;
 import net.minecraft.SharedConstants;
 import net.minecraft.client.gui.screen.Screen;
 import net.minecraft.client.render.BufferBuilder;
@@ -387,7 +389,10 @@ public class TextFieldWidget extends WidgetWithBounds implements Tickable {
     
     public void renderBorder() {
         if (this.hasBorder()) {
-            fill(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, -6250336);
+            if (containsMouse(PointHelper.fromMouse()) || focused)
+                fill(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, ScreenHelper.isDarkModeEnabled() ? 0xffffbb4d : -1);
+            else
+                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);
         }
     }

+ 5 - 5
src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java

@@ -46,7 +46,7 @@ public class ConfigManagerImpl implements ConfigManager {
         configFile.getParentFile().mkdirs();
         if (!configFile.exists() && !configFile.createNewFile()) {
             RoughlyEnoughItemsCore.LOGGER.error("[REI] Failed to save config! Overwriting with default config.");
-            config = new ConfigObjectImpl();
+            config = new OldConfigObjectImpl();
             return;
         }
         try {
@@ -54,7 +54,7 @@ public class ConfigManagerImpl implements ConfigManager {
         } catch (Exception e) {
             e.printStackTrace();
             RoughlyEnoughItemsCore.LOGGER.error("[REI] Failed to save config! Overwriting with default config.");
-            config = new ConfigObjectImpl();
+            config = new OldConfigObjectImpl();
             return;
         }
     }
@@ -64,13 +64,13 @@ public class ConfigManagerImpl implements ConfigManager {
         configFile.getParentFile().mkdirs();
         if (!configFile.exists() || !configFile.canRead()) {
             RoughlyEnoughItemsCore.LOGGER.warn("[REI] Config not found! Creating one.");
-            config = new ConfigObjectImpl();
+            config = new OldConfigObjectImpl();
             saveConfig();
             return;
         }
         boolean failed = false;
         try {
-            config = new ConfigObjectImpl();
+            config = new OldConfigObjectImpl();
             new JanksonSettings().deserialize(config.getConfigNode(), Files.newInputStream(configFile.toPath()));
         } catch (Exception e) {
             e.printStackTrace();
@@ -78,7 +78,7 @@ public class ConfigManagerImpl implements ConfigManager {
         }
         if (failed || config == null) {
             RoughlyEnoughItemsCore.LOGGER.error("[REI] Failed to load config! Overwriting with default config.");
-            config = new ConfigObjectImpl();
+            config = new OldConfigObjectImpl();
         }
         saveConfig();
     }

+ 40 - 2
src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java → src/main/java/me/shedaniel/rei/impl/OldConfigObjectImpl.java

@@ -15,7 +15,7 @@ import me.zeroeightsix.fiber.tree.Node;
 
 @Deprecated
 @Internal
-public class ConfigObjectImpl implements ConfigObject {
+public class OldConfigObjectImpl implements ConfigObject {
     
     public ConfigNode configNode = new ConfigNode();
     
@@ -139,6 +139,13 @@ public class ConfigObjectImpl implements ConfigObject {
             .withName("disableRecipeBook")
             .build();
     
+    private ConfigValue<Boolean> lighterButtonHover = ConfigValue.builder(Boolean.class)
+            .withParent(appearance)
+            .withDefaultValue(true)
+            .withComment("Declares whether REI should lighten the button if hovered.")
+            .withName("lighterButtonHover")
+            .build();
+    
     private ConfigValue<Boolean> fixTabCloseContainer = ConfigValue.builder(Boolean.class)
             .withParent(modules)
             .withDefaultValue(false)
@@ -192,7 +199,13 @@ public class ConfigObjectImpl implements ConfigObject {
             .withName("scrollingEntryListWidget")
             .build();
     
-    public ConfigObjectImpl() throws FiberException {
+    private ConfigValue<Boolean> overlayVisible = ConfigValue.builder(Boolean.class)
+            .withParent(general)
+            .withDefaultValue(true)
+            .withName("overlayVisible")
+            .build();
+    
+    public OldConfigObjectImpl() throws FiberException {
     
     }
     
@@ -206,6 +219,31 @@ public class ConfigObjectImpl implements ConfigObject {
         return configNode;
     }
     
+    @Override
+    public ConfigValue<Boolean> getOverlayVisibleNode() {
+        return overlayVisible;
+    }
+    
+    @Override
+    public boolean isLighterButtonHover() {
+        return this.lighterButtonHover.getValue();
+    }
+    
+    @Override
+    public void setLighterButtonHover(boolean lighterButtonHover) {
+        this.lighterButtonHover.setValue(lighterButtonHover);
+    }
+    
+    @Override
+    public boolean isOverlayVisible() {
+        return this.overlayVisible.getValue();
+    }
+    
+    @Override
+    public void setOverlayVisible(boolean overlayVisible) {
+        this.overlayVisible.setValue(overlayVisible);
+    }
+    
     @Override
     public boolean isCheating() {
         return cheating.getValue();

+ 7 - 13
src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java

@@ -52,7 +52,7 @@ public class RecipeHelperImpl implements RecipeHelper {
     private final AtomicInteger recipeCount = new AtomicInteger();
     private final Map<Identifier, List<RecipeDisplay>> recipeCategoryListMap = Maps.newHashMap();
     private final List<RecipeCategory<?>> categories = Lists.newArrayList();
-    private final Map<Identifier, ButtonAreaSupplier> speedCraftAreaSupplierMap = Maps.newHashMap();
+    private final Map<Identifier, ButtonAreaSupplier> autoCraftAreaSupplierMap = Maps.newHashMap();
     private final Map<Identifier, List<List<EntryStack>>> categoryWorkingStations = Maps.newHashMap();
     private final List<DisplayVisibilityHandler> displayVisibilityHandlers = Lists.newArrayList();
     private final List<LiveRecipeGenerator<RecipeDisplay>> liveRecipeGenerators = Lists.newArrayList();
@@ -202,24 +202,18 @@ public class RecipeHelperImpl implements RecipeHelper {
     
     @Override
     public Optional<ButtonAreaSupplier> getAutoCraftButtonArea(RecipeCategory<?> category) {
-        if (!speedCraftAreaSupplierMap.containsKey(category.getIdentifier()))
+        if (!autoCraftAreaSupplierMap.containsKey(category.getIdentifier()))
             return Optional.ofNullable(bounds -> new Rectangle(bounds.getMaxX() - 16, bounds.getMaxY() - 16, 10, 10));
-        return Optional.ofNullable(speedCraftAreaSupplierMap.get(category.getIdentifier()));
+        return Optional.ofNullable(autoCraftAreaSupplierMap.get(category.getIdentifier()));
     }
     
     @Override
     public void registerAutoCraftButtonArea(Identifier category, ButtonAreaSupplier rectangle) {
         if (rectangle == null) {
-            if (speedCraftAreaSupplierMap.containsKey(category))
-                speedCraftAreaSupplierMap.remove(category);
+            if (autoCraftAreaSupplierMap.containsKey(category))
+                autoCraftAreaSupplierMap.remove(category);
         } else
-            speedCraftAreaSupplierMap.put(category, rectangle);
-    }
-    
-    @SuppressWarnings("deprecation")
-    @Override
-    public void registerDefaultSpeedCraftButtonArea(Identifier category) {
-        registerAutoCraftButtonArea(category, bounds -> new Rectangle(bounds.getMaxX() - 16, bounds.getMaxY() - 16, 10, 10));
+            autoCraftAreaSupplierMap.put(category, rectangle);
     }
     
     @SuppressWarnings("deprecation")
@@ -229,7 +223,7 @@ public class RecipeHelperImpl implements RecipeHelper {
         this.recipeManager = recipeManager;
         this.recipeCategoryListMap.clear();
         this.categories.clear();
-        this.speedCraftAreaSupplierMap.clear();
+        this.autoCraftAreaSupplierMap.clear();
         this.screenClickAreas.clear();
         this.categoryWorkingStations.clear();
         this.recipeFunctions.clear();

+ 9 - 3
src/main/java/me/shedaniel/rei/impl/ScreenHelper.java

@@ -13,6 +13,7 @@ import me.shedaniel.rei.api.ConfigManager;
 import me.shedaniel.rei.gui.ContainerScreenOverlay;
 import me.shedaniel.rei.gui.OverlaySearchField;
 import me.shedaniel.rei.listeners.ContainerScreenHooks;
+import me.zeroeightsix.fiber.exception.FiberException;
 import net.fabricmc.api.ClientModInitializer;
 import net.fabricmc.fabric.api.event.client.ClientTickCallback;
 import net.minecraft.client.MinecraftClient;
@@ -23,6 +24,7 @@ import net.minecraft.item.ItemStack;
 import net.minecraft.util.ActionResult;
 import org.apache.logging.log4j.util.TriConsumer;
 
+import java.io.IOException;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Optional;
@@ -35,7 +37,6 @@ public class ScreenHelper implements ClientModInitializer {
     @Deprecated
     public static OverlaySearchField searchField;
     public static List<ItemStack> inventoryStacks = Lists.newArrayList();
-    private static boolean overlayVisible = true;
     private static ContainerScreenOverlay overlay;
     private static AbstractContainerScreen<?> lastContainerScreen = null;
     private static LinkedHashSet<Screen> lastRecipeScreen = Sets.newLinkedHashSetWithExpectedSize(5);
@@ -71,11 +72,16 @@ public class ScreenHelper implements ClientModInitializer {
     }
     
     public static boolean isOverlayVisible() {
-        return overlayVisible;
+        return ConfigManager.getInstance().getConfig().isOverlayVisible();
     }
     
     public static void toggleOverlayVisible() {
-        overlayVisible = !overlayVisible;
+        ConfigManager.getInstance().getConfig().setOverlayVisible(!ConfigManager.getInstance().getConfig().isOverlayVisible());
+        try {
+            ConfigManager.getInstance().saveConfig();
+        } catch (IOException | FiberException e) {
+            e.printStackTrace();
+        }
     }
     
     public static Optional<ContainerScreenOverlay> getOptionalOverlay() {

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

@@ -298,8 +298,8 @@ public class DefaultPlugin implements REIPluginV0 {
         recipeHelper.registerWorkingStations(BREWING, EntryStack.create(Items.BREWING_STAND));
         recipeHelper.registerWorkingStations(STONE_CUTTING, EntryStack.create(Items.STONECUTTER));
         recipeHelper.registerWorkingStations(COMPOSTING, EntryStack.create(Items.COMPOSTER));
-        recipeHelper.registerAutoCraftButtonArea(CAMPFIRE, bounds -> null);
-        recipeHelper.registerAutoCraftButtonArea(COMPOSTING, bounds -> null);
+        recipeHelper.registerAutoCraftButtonArea(CAMPFIRE, bounds -> new Rectangle(bounds.x + 6, bounds.y + 6, 10, 10));
+        recipeHelper.removeAutoCraftButton(COMPOSTING);
         recipeHelper.registerScreenClickArea(new Rectangle(88, 32, 28, 23), CraftingTableScreen.class, CRAFTING);
         recipeHelper.registerScreenClickArea(new Rectangle(137, 29, 10, 13), InventoryScreen.class, CRAFTING);
         recipeHelper.registerScreenClickArea(new Rectangle(97, 16, 14, 30), BrewingStandScreen.class, BREWING);

+ 1 - 0
src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java

@@ -20,6 +20,7 @@ import net.minecraft.container.PlayerContainer;
 import net.minecraft.recipe.Recipe;
 
 public class DefaultRecipeBookHandler implements AutoTransferHandler {
+    @SuppressWarnings("deprecation")
     @Override
     public Result handle(Context context) {
         RecipeDisplay display = context.getRecipe();

+ 0 - 5
src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java

@@ -69,9 +69,4 @@ public class DefaultBrewingCategory implements RecipeCategory<DefaultBrewingDisp
         return widgets;
     }
     
-    @Override
-    public boolean checkTags() {
-        return true;
-    }
-    
 }

+ 3 - 1
src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java

@@ -38,7 +38,9 @@ public class ClothScreenRegistry {
             } catch (IOException | FiberException e) {
                 e.printStackTrace();
             }
-        }).registerNodeEntryFunction(ItemListOrderingConfig.class, o -> {
+        }).hideTreeEntry(
+                configManager.getConfig().getOverlayVisibleNode()
+        ).registerNodeEntryFunction(ItemListOrderingConfig.class, o -> {
             ConfigValue<ItemListOrderingConfig> configValue = (ConfigValue<ItemListOrderingConfig>) o;
             return configEntryBuilder.startEnumSelector("config.roughlyenoughitems." + configValue.getName(), ItemListOrderingConfig.class, configValue.getValue())
                     .setDefaultValue(configValue.getDefaultValue())

+ 1 - 0
src/main/resources/assets/roughlyenoughitems/lang/en_us.json

@@ -115,6 +115,7 @@
   "config.roughlyenoughitems.disableRecipeBook.boolean.true": "Disabled",
   "config.roughlyenoughitems.disableRecipeBook.boolean.false": "Enabled",
   "config.roughlyenoughitems.fixTabCloseContainer": "Fix Vanilla Tab Container (When Recipe Book Disabled):",
+  "config.roughlyenoughitems.lighterButtonHover": "Lighter Button Hover:",
   "config.roughlyenoughitems.enableCraftableOnlyButton": "Craftable Filter:",
   "config.roughlyenoughitems.enableCraftableOnlyButton.boolean.true": "Enabled",
   "config.roughlyenoughitems.enableCraftableOnlyButton.boolean.false": "Disabled",

二进制
src/main/resources/assets/roughlyenoughitems/textures/gui/button.png


二进制
src/main/resources/assets/roughlyenoughitems/textures/gui/button_dark.png