Danielshe 5 vuotta sitten
vanhempi
sitoutus
f14b1a9312
30 muutettua tiedostoa jossa 146 lisäystä ja 67 poistoa
  1. 1 1
      gradle.properties
  2. 5 1
      src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java
  3. 0 1
      src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java
  4. 5 0
      src/main/java/me/shedaniel/rei/api/ConfigManager.java
  5. 4 0
      src/main/java/me/shedaniel/rei/api/DisplayHelper.java
  6. 6 0
      src/main/java/me/shedaniel/rei/api/EntryRegistry.java
  7. 10 5
      src/main/java/me/shedaniel/rei/api/EntryStack.java
  8. 6 0
      src/main/java/me/shedaniel/rei/api/REIPluginEntry.java
  9. 1 1
      src/main/java/me/shedaniel/rei/api/RecipeCategory.java
  10. 9 2
      src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java
  11. 1 2
      src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java
  12. 11 2
      src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
  13. 28 6
      src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
  14. 32 14
      src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java
  15. 0 7
      src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java
  16. 1 1
      src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java
  17. 2 7
      src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapedDisplay.java
  18. 2 7
      src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java
  19. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/bg_bg.json
  20. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/de_de.json
  21. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/en_ud.json
  22. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/en_us.json
  23. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/et_ee.json
  24. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/fr_fr.json
  25. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/ja_jp.json
  26. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/lol_us.json
  27. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/pt_br.json
  28. 1 0
      src/main/resources/assets/roughlyenoughitems/lang/ru_ru.json
  29. 5 4
      src/main/resources/assets/roughlyenoughitems/lang/zh_cn.json
  30. 7 6
      src/main/resources/assets/roughlyenoughitems/lang/zh_tw.json

+ 1 - 1
gradle.properties

@@ -1,4 +1,4 @@
-mod_version=3.2.2-unstable
+mod_version=3.2.6-unstable
 minecraft_version=19w44a
 yarn_version=19w44a+build.3
 fabricloader_version=0.6.3+build.168

+ 5 - 1
src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java

@@ -61,24 +61,28 @@ public class RoughlyEnoughItemsCore implements ClientModInitializer {
     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"));
-    private static ConfigManagerImpl configManager;
+    private static ConfigManager configManager;
     
     static {
         LOGGER = LogManager.getFormatterLogger("REI");
     }
     
+    @Deprecated
     public static RecipeHelper getRecipeHelper() {
         return RECIPE_HELPER;
     }
     
+    @Deprecated
     public static ConfigManager getConfigManager() {
         return configManager;
     }
     
+    @Deprecated
     public static EntryRegistry getEntryRegistry() {
         return ENTRY_REGISTRY;
     }
     
+    @Deprecated
     public static DisplayHelper getDisplayHelper() {
         return DISPLAY_HELPER;
     }

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

@@ -100,7 +100,6 @@ public class RoughlyEnoughItemsNetwork implements ModInitializer {
             } catch (Exception e) {
                 e.printStackTrace();
             }
-            //            }
         });
         FabricLoader.getInstance().getEntrypoints("rei_containers", Runnable.class).forEach(Runnable::run);
     }

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

@@ -5,6 +5,7 @@
 
 package me.shedaniel.rei.api;
 
+import me.shedaniel.rei.RoughlyEnoughItemsCore;
 import me.zeroeightsix.fiber.exception.FiberException;
 import net.minecraft.client.gui.screen.Screen;
 
@@ -12,6 +13,10 @@ import java.io.IOException;
 
 public interface ConfigManager {
     
+    static ConfigManager getInstance() {
+        return RoughlyEnoughItemsCore.getConfigManager();
+    }
+    
     /**
      * Saves the config.
      *

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

@@ -16,6 +16,10 @@ import static net.minecraft.util.ActionResult.PASS;
 
 public interface DisplayHelper {
     
+    static DisplayHelper getInstance() {
+        return RoughlyEnoughItemsCore.getDisplayHelper();
+    }
+    
     /**
      * Gets the sorted version of all responsible bounds handlers
      *

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

@@ -5,6 +5,8 @@
 
 package me.shedaniel.rei.api;
 
+import me.shedaniel.rei.RoughlyEnoughItemsCore;
+import me.shedaniel.rei.api.annotations.ToBeRemoved;
 import me.shedaniel.rei.utils.CollectionUtils;
 import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
@@ -13,6 +15,10 @@ import java.util.List;
 
 public interface EntryRegistry {
     
+    static EntryRegistry getInstance() {
+        return RoughlyEnoughItemsCore.getEntryRegistry();
+    }
+    
     /**
      * Gets the current modifiable stacks list
      *

+ 10 - 5
src/main/java/me/shedaniel/rei/api/EntryStack.java

@@ -11,6 +11,7 @@ import me.shedaniel.rei.impl.EmptyEntryStack;
 import me.shedaniel.rei.impl.FluidEntryStack;
 import me.shedaniel.rei.impl.ItemEntryStack;
 import net.minecraft.block.Block;
+import net.minecraft.client.resource.language.I18n;
 import net.minecraft.fluid.Fluid;
 import net.minecraft.item.Item;
 import net.minecraft.item.ItemConvertible;
@@ -31,7 +32,7 @@ public interface EntryStack {
     }
     
     static EntryStack create(Fluid fluid) {
-        return create(fluid, 1000);
+        return new FluidEntryStack(fluid);
     }
     
     static EntryStack create(Fluid fluid, int amount) {
@@ -46,10 +47,6 @@ public interface EntryStack {
         return new ItemEntryStack(new ItemStack(item));
     }
     
-    static EntryStack create(Block block) {
-        return new ItemEntryStack(new ItemStack(block));
-    }
-    
     Optional<Identifier> getIdentifier();
     
     EntryStack.Type getType();
@@ -144,5 +141,13 @@ public interface EntryStack {
             private Item() {
             }
         }
+        
+        public static class Fluid {
+            // Return null to disable
+            public static final Settings<Function<EntryStack, String>> AMOUNT_TOOLTIP = new Settings<Function<EntryStack, String>>(stack -> I18n.translate("tooltip.rei.fluid_amount", stack.getAmount()));
+            
+            private Fluid() {
+            }
+        }
     }
 }

+ 6 - 0
src/main/java/me/shedaniel/rei/api/REIPluginEntry.java

@@ -5,6 +5,8 @@
 
 package me.shedaniel.rei.api;
 
+import net.fabricmc.loader.api.SemanticVersion;
+import net.fabricmc.loader.util.version.VersionParsingException;
 import net.minecraft.util.Identifier;
 
 /**
@@ -12,6 +14,10 @@ import net.minecraft.util.Identifier;
  */
 public interface REIPluginEntry {
     
+    default SemanticVersion getMinimumVersion() throws VersionParsingException {
+        return null;
+    }
+    
     /**
      * Gets the priority of the plugin.
      *

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

@@ -8,7 +8,7 @@ package me.shedaniel.rei.api;
 import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.rei.gui.RecipeViewingScreen;
 import me.shedaniel.rei.gui.entries.RecipeEntry;
-import me.shedaniel.rei.gui.renderers.SimpleRecipeEntry;
+import me.shedaniel.rei.gui.entries.SimpleRecipeEntry;
 import me.shedaniel.rei.gui.widget.CategoryBaseWidget;
 import me.shedaniel.rei.gui.widget.RecipeBaseWidget;
 import me.shedaniel.rei.gui.widget.Widget;

+ 9 - 2
src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java

@@ -9,16 +9,17 @@ import me.shedaniel.rei.api.DisplayHelper;
 import me.shedaniel.rei.api.EntryRegistry;
 import me.shedaniel.rei.api.REIPluginEntry;
 import me.shedaniel.rei.api.RecipeHelper;
+import me.shedaniel.rei.api.annotations.ToBeRemoved;
 import net.fabricmc.loader.api.SemanticVersion;
 import net.fabricmc.loader.util.version.VersionParsingException;
 
 public interface REIPluginV0 extends REIPluginEntry {
     
-    SemanticVersion getMinimumVersion() throws VersionParsingException;
-    
     /**
      * On register of the plugin
      */
+    @ToBeRemoved
+    @Deprecated
     default void onFirstLoad() {
     }
     
@@ -62,4 +63,10 @@ public interface REIPluginV0 extends REIPluginEntry {
     default void registerOthers(RecipeHelper recipeHelper) {
     }
     
+    default void preRegister() {
+    }
+    
+    default void postRegister() {
+    }
+    
 }

+ 1 - 2
src/main/java/me/shedaniel/rei/gui/renderers/SimpleRecipeEntry.java → src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java

@@ -3,12 +3,11 @@
  * Licensed under the MIT License.
  */
 
-package me.shedaniel.rei.gui.renderers;
+package me.shedaniel.rei.gui.entries;
 
 import com.google.common.collect.Lists;
 import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.rei.api.EntryStack;
-import me.shedaniel.rei.gui.entries.RecipeEntry;
 import me.shedaniel.rei.gui.widget.EntryWidget;
 import me.shedaniel.rei.gui.widget.QueuedTooltip;
 import me.shedaniel.rei.utils.CollectionUtils;

+ 11 - 2
src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java

@@ -37,9 +37,14 @@ import java.util.Optional;
 @Deprecated
 public class FluidEntryStack extends AbstractEntryStack {
     private static final Map<Fluid, Pair<Sprite, Integer>> FLUID_SPRITE_CACHE = new HashMap<>();
+    private static final int EMPTY_AMOUNT = -1319182373;
     private Fluid fluid;
     private int amount;
     
+    public FluidEntryStack(Fluid fluid) {
+        this(fluid, EMPTY_AMOUNT);
+    }
+    
     public FluidEntryStack(Fluid fluid, int amount) {
         this.fluid = fluid;
         this.amount = amount;
@@ -79,7 +84,7 @@ public class FluidEntryStack extends AbstractEntryStack {
     
     @Override
     public void setAmount(int amount) {
-        this.amount = Math.max(amount, 0);
+        this.amount = amount == EMPTY_AMOUNT ? EMPTY_AMOUNT : Math.max(amount, 0);
         if (isEmpty()) {
             fluid = Fluids.EMPTY;
         }
@@ -87,7 +92,7 @@ public class FluidEntryStack extends AbstractEntryStack {
     
     @Override
     public boolean isEmpty() {
-        return amount <= 0 || fluid == Fluids.EMPTY;
+        return (amount != EMPTY_AMOUNT && amount <= 0) || fluid == Fluids.EMPTY;
     }
     
     @Override
@@ -138,6 +143,10 @@ public class FluidEntryStack extends AbstractEntryStack {
         if (!getSetting(Settings.TOOLTIP_ENABLED).value().get() || isEmpty())
             return null;
         List<String> toolTip = Lists.newArrayList(EntryListWidget.tryGetEntryStackName(this));
+        if (amount >= 0) {
+            String amountTooltip = getSetting(Settings.Fluid.AMOUNT_TOOLTIP).value().apply(this);
+            if (amountTooltip != null) for (String s : amountTooltip.split("\n")) toolTip.add(s);
+        }
         toolTip.addAll(getSetting(Settings.TOOLTIP_APPEND_EXTRA).value().apply(this));
         if (getSetting(Settings.TOOLTIP_APPEND_MOD).value().get() && RoughlyEnoughItemsCore.getConfigManager().getConfig().shouldAppendModNames()) {
             final String modString = ClientHelper.getInstance().getFormattedModFromIdentifier(Registry.FLUID.getId(fluid));

+ 28 - 6
src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java

@@ -251,14 +251,25 @@ public class RecipeHelperImpl implements RecipeHelper {
         Version reiVersion = FabricLoader.getInstance().getModContainer("roughlyenoughitems").get().getMetadata().getVersion();
         if (!(reiVersion instanceof SemanticVersion))
             RoughlyEnoughItemsCore.LOGGER.warn("[REI] Roughly Enough Items is not using semantic versioning, will be ignoring plugins' minimum versions!");
-        plugins.forEach(plugin -> {
+        for (REIPluginEntry plugin : plugins) {
+            try {
+                if (reiVersion instanceof SemanticVersion)
+                    if (plugin.getMinimumVersion().compareTo((SemanticVersion) reiVersion) > 0) {
+                        throw new IllegalStateException("Requires " + plugin.getMinimumVersion().getFriendlyString() + " version of REI!");
+                    }
+                if (plugin instanceof REIPluginV0)
+                    ((REIPluginV0) plugin).preRegister();
+            } catch (Exception e) {
+                RoughlyEnoughItemsCore.LOGGER.error("[REI] " + plugin.getPluginIdentifier().toString() + " plugin failed to pre register!", e);
+            }
+        }
+        for (REIPluginEntry plugin : plugins) {
             Identifier identifier = plugin.getPluginIdentifier();
             try {
+                if (reiVersion instanceof SemanticVersion)
+                    if (plugin.getMinimumVersion().compareTo((SemanticVersion) reiVersion) > 0)
+                        return;
                 if (plugin instanceof REIPluginV0) {
-                    if (reiVersion instanceof SemanticVersion)
-                        if (((REIPluginV0) plugin).getMinimumVersion().compareTo((SemanticVersion) reiVersion) > 0) {
-                            throw new IllegalStateException("Requires " + ((REIPluginV0) plugin).getMinimumVersion().getFriendlyString() + " version of REI!");
-                        }
                     ((REIPluginV0) plugin).registerBounds(RoughlyEnoughItemsCore.getDisplayHelper());
                     ((REIPluginV0) plugin).registerEntries(RoughlyEnoughItemsCore.getEntryRegistry());
                     ((REIPluginV0) plugin).registerPluginCategories(this);
@@ -270,7 +281,18 @@ public class RecipeHelperImpl implements RecipeHelper {
             } catch (Exception e) {
                 RoughlyEnoughItemsCore.LOGGER.error("[REI] " + identifier.toString() + " plugin failed to load!", e);
             }
-        });
+        }
+        for (REIPluginEntry plugin : plugins) {
+            try {
+                if (reiVersion instanceof SemanticVersion)
+                    if (plugin.getMinimumVersion().compareTo((SemanticVersion) reiVersion) > 0)
+                        return;
+                if (plugin instanceof REIPluginV0)
+                    ((REIPluginV0) plugin).postRegister();
+            } catch (Exception e) {
+                RoughlyEnoughItemsCore.LOGGER.error("[REI] " + plugin.getPluginIdentifier().toString() + " plugin failed to post register!", e);
+            }
+        }
         if (!recipeFunctions.isEmpty()) {
             List<Recipe> allSortedRecipes = getAllSortedRecipes();
             Collections.reverse(allSortedRecipes);

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

@@ -10,10 +10,7 @@ import com.google.common.collect.Maps;
 import it.unimi.dsi.fastutil.objects.Object2FloatMap;
 import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.rei.RoughlyEnoughItemsCore;
-import me.shedaniel.rei.api.DisplayHelper;
-import me.shedaniel.rei.api.EntryRegistry;
-import me.shedaniel.rei.api.EntryStack;
-import me.shedaniel.rei.api.RecipeHelper;
+import me.shedaniel.rei.api.*;
 import me.shedaniel.rei.api.plugins.REIPluginV0;
 import me.shedaniel.rei.gui.RecipeViewingScreen;
 import me.shedaniel.rei.gui.VillagerRecipeViewingScreen;
@@ -47,10 +44,7 @@ import net.minecraft.enchantment.Enchantment;
 import net.minecraft.enchantment.EnchantmentHelper;
 import net.minecraft.fluid.EmptyFluid;
 import net.minecraft.fluid.Fluid;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemConvertible;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.Items;
+import net.minecraft.item.*;
 import net.minecraft.potion.PotionUtil;
 import net.minecraft.recipe.*;
 import net.minecraft.util.Identifier;
@@ -95,7 +89,7 @@ public class DefaultPlugin implements REIPluginV0 {
     
     @Override
     public void registerEntries(EntryRegistry entryRegistry) {
-        if (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isLoadingDefaultPlugin()) {
+        if (!ConfigManager.getInstance().getConfig().isLoadingDefaultPlugin()) {
             return;
         }
         for (Item item : Registry.ITEM) {
@@ -124,7 +118,7 @@ public class DefaultPlugin implements REIPluginV0 {
     
     @Override
     public void registerPluginCategories(RecipeHelper recipeHelper) {
-        if (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isLoadingDefaultPlugin()) {
+        if (!ConfigManager.getInstance().getConfig().isLoadingDefaultPlugin()) {
             return;
         }
         recipeHelper.registerCategory(new DefaultCraftingCategory());
@@ -140,7 +134,7 @@ public class DefaultPlugin implements REIPluginV0 {
     
     @Override
     public void registerRecipeDisplays(RecipeHelper recipeHelper) {
-        if (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isLoadingDefaultPlugin()) {
+        if (!ConfigManager.getInstance().getConfig().isLoadingDefaultPlugin()) {
             return;
         }
         recipeHelper.registerRecipes(CRAFTING, ShapelessRecipe.class, DefaultShapelessDisplay::new);
@@ -154,7 +148,7 @@ public class DefaultPlugin implements REIPluginV0 {
             recipeHelper.registerDisplay(BREWING, display);
         }
         List<EntryStack> arrowStack = Collections.singletonList(EntryStack.create(Items.ARROW));
-        for (EntryStack entry : RoughlyEnoughItemsCore.getEntryRegistry().getStacksList()) {
+        for (EntryStack entry : EntryRegistry.getInstance().getStacksList()) {
             if (entry.getItem() == Items.LINGERING_POTION) {
                 List<List<EntryStack>> input = new ArrayList<>();
                 for (int i = 0; i < 4; i++)
@@ -192,9 +186,33 @@ public class DefaultPlugin implements REIPluginV0 {
         });
     }
     
+    @Override
+    public void postRegister() {
+        // Sit tight! This will be a fast journey!
+        long time = System.currentTimeMillis();
+        for (EntryStack stack : EntryRegistry.getInstance().getStacksList())
+            applyPotionTransformer(stack);
+        for (List<RecipeDisplay> displays : RecipeHelper.getInstance().getAllRecipes().values()) {
+            for (RecipeDisplay display : displays) {
+                for (List<EntryStack> entries : display.getInputEntries())
+                    for (EntryStack stack : entries)
+                        applyPotionTransformer(stack);
+                for (EntryStack stack : display.getOutputEntries())
+                    applyPotionTransformer(stack);
+            }
+        }
+        time = System.currentTimeMillis() - time;
+        RoughlyEnoughItemsCore.LOGGER.info("[REI] Applied Check Tags for potion in %dms.", time);
+    }
+    
+    private void applyPotionTransformer(EntryStack stack) {
+        if (stack.getItem() instanceof PotionItem)
+            stack.addSetting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE);
+    }
+    
     @Override
     public void registerBounds(DisplayHelper displayHelper) {
-        if (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isLoadingDefaultPlugin()) {
+        if (!ConfigManager.getInstance().getConfig().isLoadingDefaultPlugin()) {
             return;
         }
         displayHelper.getBaseBoundsHandler().registerExclusionZones(AbstractInventoryScreen.class, new DefaultPotionEffectExclusionZones());
@@ -269,7 +287,7 @@ public class DefaultPlugin implements REIPluginV0 {
     
     @Override
     public void registerOthers(RecipeHelper recipeHelper) {
-        if (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isLoadingDefaultPlugin()) {
+        if (!ConfigManager.getInstance().getConfig().isLoadingDefaultPlugin()) {
             return;
         }
         recipeHelper.registerWorkingStations(CRAFTING, EntryStack.create(Items.CRAFTING_TABLE));

+ 0 - 7
src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java

@@ -11,7 +11,6 @@ import me.shedaniel.rei.api.RecipeDisplay;
 import me.shedaniel.rei.plugin.DefaultPlugin;
 import net.minecraft.client.resource.language.I18n;
 import net.minecraft.item.ItemStack;
-import net.minecraft.item.PotionItem;
 import net.minecraft.recipe.Ingredient;
 import net.minecraft.util.Formatting;
 import net.minecraft.util.Identifier;
@@ -27,19 +26,13 @@ public class DefaultBrewingDisplay implements RecipeDisplay {
     
     public DefaultBrewingDisplay(ItemStack input, Ingredient reactant, ItemStack output) {
         this.input = EntryStack.create(input).setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.input")));
-        if (this.input.getItem() instanceof PotionItem)
-            this.input = this.input.setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE);
         this.reactant = new ArrayList<>();
         for (ItemStack stack : reactant.getMatchingStacksClient()) {
             EntryStack entryStack = EntryStack.create(stack);
-            if (stack.getItem() instanceof PotionItem)
-                entryStack.setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE);
             entryStack.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, s -> Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.reactant")));
             this.reactant.add(entryStack);
         }
         this.output = EntryStack.create(output).setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(Formatting.YELLOW.toString() + I18n.translate("category.rei.brewing.result")));
-        if (this.output.getItem() instanceof PotionItem)
-            this.output = this.output.setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE);
     }
     
     @Override

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

@@ -12,7 +12,7 @@ import me.shedaniel.math.api.Rectangle;
 import me.shedaniel.rei.api.EntryStack;
 import me.shedaniel.rei.api.TransferRecipeCategory;
 import me.shedaniel.rei.gui.entries.RecipeEntry;
-import me.shedaniel.rei.gui.renderers.SimpleRecipeEntry;
+import me.shedaniel.rei.gui.entries.SimpleRecipeEntry;
 import me.shedaniel.rei.gui.widget.EntryWidget;
 import me.shedaniel.rei.gui.widget.RecipeArrowWidget;
 import me.shedaniel.rei.gui.widget.RecipeBaseWidget;

+ 2 - 7
src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapedDisplay.java

@@ -7,7 +7,6 @@ package me.shedaniel.rei.plugin.crafting;
 
 import me.shedaniel.rei.api.EntryStack;
 import net.minecraft.item.ItemStack;
-import net.minecraft.item.PotionItem;
 import net.minecraft.recipe.Recipe;
 import net.minecraft.recipe.ShapedRecipe;
 import net.minecraft.util.Identifier;
@@ -29,15 +28,11 @@ public class DefaultShapedDisplay implements DefaultCraftingDisplay {
         this.input = recipe.getPreviewInputs().stream().map(i -> {
             List<EntryStack> entries = new ArrayList<>();
             for (ItemStack stack : i.getMatchingStacksClient()) {
-                if (stack.getItem() instanceof PotionItem)
-                    entries.add(EntryStack.create(stack).setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE));
-                else entries.add(EntryStack.create(stack));
+                entries.add(EntryStack.create(stack));
             }
             return entries;
         }).collect(Collectors.toList());
-        if (recipe.getOutput().getItem() instanceof PotionItem)
-            this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()).setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE));
-        else this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
+        this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
     }
     
     @Override

+ 2 - 7
src/main/java/me/shedaniel/rei/plugin/crafting/DefaultShapelessDisplay.java

@@ -7,7 +7,6 @@ package me.shedaniel.rei.plugin.crafting;
 
 import me.shedaniel.rei.api.EntryStack;
 import net.minecraft.item.ItemStack;
-import net.minecraft.item.PotionItem;
 import net.minecraft.recipe.Recipe;
 import net.minecraft.recipe.ShapelessRecipe;
 import net.minecraft.util.Identifier;
@@ -29,15 +28,11 @@ public class DefaultShapelessDisplay implements DefaultCraftingDisplay {
         this.input = recipe.getPreviewInputs().stream().map(i -> {
             List<EntryStack> entries = new ArrayList<>();
             for (ItemStack stack : i.getMatchingStacksClient()) {
-                if (stack.getItem() instanceof PotionItem)
-                    entries.add(EntryStack.create(stack).setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE));
-                else entries.add(EntryStack.create(stack));
+                entries.add(EntryStack.create(stack));
             }
             return entries;
         }).collect(Collectors.toList());
-        if (recipe.getOutput().getItem() instanceof PotionItem)
-            this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()).setting(EntryStack.Settings.CHECK_TAGS, EntryStack.Settings.TRUE));
-        else this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
+        this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
     }
     
     @Override

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Recipe Screen Type Selection",
   "text.rei.recipe_screen_type.selection.sub": "You can always edit this setting again via the config screen.",
   "text.rei.view_recipes_for": "View Recipes for %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Config Tooltips",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Darstellung Rezept-Bildschirm",
   "text.rei.recipe_screen_type.selection.sub": "Du kannst diese Einstellung jederzeit über den Konfigurationsbildschirm wieder bearbeiten.",
   "text.rei.view_recipes_for": "Rezepte für %s anzeigen",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Konfigurations-Tooltips",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "uoıʇɔǝןǝS ǝdʎ⊥ uǝǝɹɔS ǝdıɔǝᴚ",
   "text.rei.recipe_screen_type.selection.sub": "˙uǝǝɹɔs bıɟuoɔ ǝɥʇ ɐıʌ uıɐbɐ buıʇʇǝs sıɥʇ ʇıpǝ sʎɐʍןɐ uɐɔ noʎ",
   "text.rei.view_recipes_for": "s% ɹoɟ sǝdıɔǝᴚ ʍǝıΛ",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "sdıʇןoo⊥ bıɟuoϽ",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Recipe Screen Type Selection",
   "text.rei.recipe_screen_type.selection.sub": "You can always edit this setting again via the config screen.",
   "text.rei.view_recipes_for": "View Recipes for %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Config Tooltips",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Retseptide kuvatüübi valik",
   "text.rei.recipe_screen_type.selection.sub": "Sa saad seda seadistust alati seadistuskuvalt muuta.",
   "text.rei.view_recipes_for": "Vaata %s retsepte",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Retsepti ID kopeeritud",
   "msg.rei.recipe_id_details": "Retsepti ID: %s",
   "_comment": "Seadistuse vihjetekstid",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Écran de sélection du type d'affichage des recettes",
   "text.rei.recipe_screen_type.selection.sub": "Vous pouvez toujours changer cette option dans l'écran de configuration.",
   "text.rei.view_recipes_for": "View Recipes for %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Config Tooltips",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "レシピ画面タイプの選択",
   "text.rei.recipe_screen_type.selection.sub": "設定画面でいつでも設定を変更できます。",
   "text.rei.view_recipes_for": "%sのレシピを表示",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Tooltipsの設定",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Wecipe Scween Type Sewection",
   "text.rei.recipe_screen_type.selection.sub": "You can awways edit dis setting again via de config scween.",
   "text.rei.view_recipes_for": "View Wecipes fow %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Config Toowtips",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Seleção do tipo do menu de receitas",
   "text.rei.recipe_screen_type.selection.sub": "Você sempre pode editar essa opção denovo através do menu de configuração.",
   "text.rei.view_recipes_for": "View Recipes for %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Don't change / translate the credit down below if you are doing it :)",

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

@@ -79,6 +79,7 @@
   "text.rei.recipe_screen_type.selection": "Выбор типа экрана рецепта",
   "text.rei.recipe_screen_type.selection.sub": "Вы всегда можете изменить эту настройку через окно конфигурации.",
   "text.rei.view_recipes_for": "Посмотреть рецепты на %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
   "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
   "msg.rei.recipe_id_details": "Recipe ID: %s",
   "_comment": "Конфигурация подсказок",

+ 5 - 4
src/main/resources/assets/roughlyenoughitems/lang/zh_cn.json

@@ -6,7 +6,7 @@
   "key.roughlyenoughitems.next_page": "下一页",
   "key.roughlyenoughitems.previous_page": "上一页",
   "key.roughlyenoughitems.focus_search": "选择搜索框",
-  "key.roughlyenoughitems.copy_recipe_id": "Copy Recipe Identifier",
+  "key.roughlyenoughitems.copy_recipe_id": "复制配方ID",
   "text.rei.cheating": "作弊",
   "text.rei.cheating_disabled": "§7作弊已禁用",
   "text.rei.cheating_enabled": "§c作弊已启用",
@@ -79,8 +79,9 @@
   "text.rei.recipe_screen_type.selection": "合成界面类型选择",
   "text.rei.recipe_screen_type.selection.sub": "你始终可以通过配置界面再次编辑此设置.",
   "text.rei.view_recipes_for": "查看 %s 的配方",
-  "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
-  "msg.rei.recipe_id_details": "Recipe ID: %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
+  "msg.rei.copied_recipe_id": "已复制配方ID",
+  "msg.rei.recipe_id_details": "配方ID:%s",
   "_comment": "配置提示",
   "config.roughlyenoughitems.title": "配置",
   "config.roughlyenoughitems.!general": "常规​​​​​",
@@ -137,7 +138,7 @@
   "config.roughlyenoughitems.itemCheatingMode.rei_like": "标准",
   "config.roughlyenoughitems.itemCheatingMode.jei_like": "反转",
   "config.roughlyenoughitems.appendModNames": "附加模组名称:",
-  "config.roughlyenoughitems.toastDisplayedOnCopyIdentifier": "Copy Identifier Toast:",
+  "config.roughlyenoughitems.toastDisplayedOnCopyIdentifier": "复制ID讯息:",
   "config.roughlyenoughitems.scrollingEntryListWidget": "条目列表操作:",
   "config.roughlyenoughitems.scrollingEntryListWidget.boolean.true": "滚动",
   "config.roughlyenoughitems.scrollingEntryListWidget.boolean.false": "分页",

+ 7 - 6
src/main/resources/assets/roughlyenoughitems/lang/zh_tw.json

@@ -6,7 +6,7 @@
   "key.roughlyenoughitems.next_page": "下一頁",
   "key.roughlyenoughitems.previous_page": "上一頁",
   "key.roughlyenoughitems.focus_search": "選擇搜索框",
-  "key.roughlyenoughitems.copy_recipe_id": "Copy Recipe Identifier",
+  "key.roughlyenoughitems.copy_recipe_id": "複製配方ID",
   "text.rei.cheating": "作弊",
   "text.rei.cheating_disabled": "§7作弊已禁用",
   "text.rei.cheating_enabled": "§c作弊已啟用",
@@ -79,8 +79,9 @@
   "text.rei.recipe_screen_type.selection": "合成介面選擇",
   "text.rei.recipe_screen_type.selection.sub": "你可以在設置中改變合成介面.",
   "text.rei.view_recipes_for": "顯示%s的所有合成",
-  "msg.rei.copied_recipe_id": "Copied Recipe Identifier",
-  "msg.rei.recipe_id_details": "Recipe ID: %s",
+  "tooltip.rei.fluid_amount": "§7%d Unit",
+  "msg.rei.copied_recipe_id": "已復製配方ID",
+  "msg.rei.recipe_id_details": "配方ID:%s",
   "_comment": "設置提示",
   "config.roughlyenoughitems.title": "Roughly Enough Items 設置",
   "config.roughlyenoughitems.!general": "一般",
@@ -121,7 +122,7 @@
   "config.roughlyenoughitems.showUtilsButtons.boolean.false": "禁用",
   "config.roughlyenoughitems.gamemodeCommand": "轉換遊戲模式命令:",
   "config.roughlyenoughitems.giveCommand": "作弊命令:",
-  "config.roughlyenoughitems.loadDefaultPlugin": "加載默認 Plugin:",
+  "config.roughlyenoughitems.loadDefaultPlugin": "加載默認插件:",
   "config.roughlyenoughitems.loadDefaultPlugin.boolean.false": "§c禁用 (危險)",
   "config.roughlyenoughitems.registerRecipesInAnotherThread": "配方同步線程:",
   "config.roughlyenoughitems.registerRecipesInAnotherThread.boolean.true": "新 REI 綫程",
@@ -136,8 +137,8 @@
   "config.roughlyenoughitems.itemCheatingMode": "物品作弊數量:",
   "config.roughlyenoughitems.itemCheatingMode.rei_like": "正常",
   "config.roughlyenoughitems.itemCheatingMode.jei_like": "倒置",
-  "config.roughlyenoughitems.appendModNames": "Append Mod Names",
-  "config.roughlyenoughitems.toastDisplayedOnCopyIdentifier": "Copy Identifier Toast:",
+  "config.roughlyenoughitems.appendModNames": "附加模組名稱:",
+  "config.roughlyenoughitems.toastDisplayedOnCopyIdentifier": "複製ID訊息:",
   "config.roughlyenoughitems.scrollingEntryListWidget": "項目列表操作:",
   "config.roughlyenoughitems.scrollingEntryListWidget.boolean.true": "滾動",
   "config.roughlyenoughitems.scrollingEntryListWidget.boolean.false": "分頁",