aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/me/shedaniel/rei/client/ConfigObject.java23
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java13
-rw-r--r--src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java5
3 files changed, 29 insertions, 12 deletions
diff --git a/src/main/java/me/shedaniel/rei/client/ConfigObject.java b/src/main/java/me/shedaniel/rei/client/ConfigObject.java
index 252d630f6..c2d55dbb3 100644
--- a/src/main/java/me/shedaniel/rei/client/ConfigObject.java
+++ b/src/main/java/me/shedaniel/rei/client/ConfigObject.java
@@ -13,10 +13,13 @@ public class ConfigObject {
public boolean cheating = false;
+ public boolean appendModNames = true;
+
@Comment("The ordering of the items on the item panel.")
public ItemListOrdering itemListOrdering = ItemListOrdering.registry;
- @Comment("The ordering of the items on the item panel.") public boolean isAscending = true;
+ @Comment("The ordering of the items on the item panel.")
+ public boolean isAscending = true;
@Comment("To toggle the craftable button next to the search field.")
public boolean enableCraftableOnlyButton = true;
@@ -27,20 +30,26 @@ public class ConfigObject {
@Comment("The command used in servers to cheat items")
public String giveCommand = "/minecraft:give {player_name} {item_identifier}{nbt} {count}";
- @Comment("The command used to change gamemode") public String gamemodeCommand = "/gamemode {gamemode}";
+ @Comment("The command used to change gamemode")
+ public String gamemodeCommand = "/gamemode {gamemode}";
- @Comment("The command used to change weather") public String weatherCommand = "/weather {weather}";
+ @Comment("The command used to change weather")
+ public String weatherCommand = "/weather {weather}";
- @Comment("True: item panel on the left, false: on the right") public boolean mirrorItemPanel = false;
+ @Comment("True: item panel on the left, false: on the right")
+ public boolean mirrorItemPanel = false;
@Comment("To disable REI's default plugin, don't change this unless you understand what you are doing")
public boolean loadDefaultPlugin = true;
- @Comment("Maximum recipes viewed at one time.") public int maxRecipePerPage = 3;
+ @Comment("Maximum recipes viewed at one time.")
+ public int maxRecipePerPage = 3;
- @Comment("Toggle utils buttons") public boolean showUtilsButtons = false;
+ @Comment("Toggle utils buttons")
+ public boolean showUtilsButtons = false;
- @Comment("Disable Recipe Book") public boolean disableRecipeBook = false;
+ @Comment("Disable Recipe Book")
+ public boolean disableRecipeBook = false;
public ItemCheatingMode itemCheatingMode = ItemCheatingMode.REI_LIKE;
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java
index bbca45b9c..513c5bffe 100644
--- a/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java
+++ b/src/main/java/me/shedaniel/rei/gui/widget/SlotWidget.java
@@ -8,6 +8,7 @@ package me.shedaniel.rei.gui.widget;
import com.google.common.collect.Lists;
import com.mojang.blaze3d.platform.GlStateManager;
import me.shedaniel.cloth.api.ClientUtils;
+import me.shedaniel.rei.RoughlyEnoughItemsCore;
import me.shedaniel.rei.api.ClientHelper;
import me.shedaniel.rei.api.Renderable;
import me.shedaniel.rei.api.Renderer;
@@ -150,13 +151,15 @@ public class SlotWidget extends HighlightableWidget {
}
protected List<String> getTooltip(ItemStack itemStack) {
- final String modString = ClientHelper.getInstance().getFormattedModFromItem(itemStack.getItem());
List<String> toolTip = Lists.newArrayList(ItemListOverlay.tryGetItemStackToolTip(itemStack, true));
- String s1 = ClientHelper.getInstance().getModFromItem(itemStack.getItem()).toLowerCase(Locale.ROOT);
toolTip.addAll(getExtraToolTips(itemStack));
- if (!modString.isEmpty()) {
- toolTip.removeIf(s -> s.toLowerCase(Locale.ROOT).contains(s1));
- toolTip.add(modString);
+ if (RoughlyEnoughItemsCore.getConfigManager().getConfig().appendModNames) {
+ final String modString = ClientHelper.getInstance().getFormattedModFromItem(itemStack.getItem());
+ String s1 = ClientHelper.getInstance().getModFromItem(itemStack.getItem()).toLowerCase(Locale.ROOT);
+ if (!modString.isEmpty()) {
+ toolTip.removeIf(s -> s.toLowerCase(Locale.ROOT).contains(s1));
+ toolTip.add(modString);
+ }
}
return toolTip;
}
diff --git a/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java b/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
index c72916a5c..2dfa1d4e7 100644
--- a/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
+++ b/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java
@@ -60,6 +60,11 @@ public class ClothScreenRegistry {
});
ConfigCategory appearance = builder.getOrCreateCategory("text.rei.config.appearance");
appearance.addEntry(entryBuilder.startBooleanToggle("text.rei.config.dark_theme", ScreenHelper.isDarkModeEnabled()).setDefaultValue(() -> false).setSaveConsumer(bool -> configManager.getConfig().darkTheme = bool).setTooltipSupplier(() -> getConfigTooltip("dark_theme")).buildEntry());
+ appearance.addEntry(entryBuilder.startBooleanToggle("text.rei.config.appendModNames", configManager.getConfig().appendModNames)
+ .setDefaultValue(true)
+ .setSaveConsumer(bool -> configManager.getConfig().appendModNames = bool)
+ .setTooltip(getConfigTooltip("appendModNames"))
+ .build());
appearance.addEntry(new EnumListEntry<>("text.rei.config.recipe_screen_type", RecipeScreenType.class, configManager.getConfig().screenType, RESET, () -> RecipeScreenType.UNSET, bool -> configManager.getConfig().screenType = bool, EnumListEntry.DEFAULT_NAME_PROVIDER, () -> getConfigTooltip("recipe_screen_type")));
appearance.addEntry(entryBuilder.startBooleanToggle("text.rei.config.side_search_box", configManager.getConfig().sideSearchField).setDefaultValue(() -> false).setSaveConsumer(bool -> configManager.getConfig().sideSearchField = bool).setTooltipSupplier(() -> getConfigTooltip("side_search_box")).buildEntry());
appearance.addEntry(new EnumListEntry<>("text.rei.config.list_ordering", ItemListOrderingConfig.class, ItemListOrderingConfig.from(configManager.getConfig().itemListOrdering, configManager.getConfig().isAscending), RESET, () -> ItemListOrderingConfig.REGISTRY_ASCENDING, config -> {