From 113fe8f692f4f9bb113d28f6a1b3375bd8f0eec8 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 27 Aug 2021 05:26:06 +0800 Subject: Add hints for if REI does not initialize properly --- .../me/shedaniel/rei/RoughlyEnoughItemsCore.java | 14 ++- .../rei/RoughlyEnoughItemsCoreClient.java | 17 ++- .../shedaniel/rei/impl/client/REIRuntimeImpl.java | 21 +++- .../client/config/entries/ReloadPluginsEntry.java | 2 +- .../favorites/FavoriteEntryTypeRegistryImpl.java | 6 + .../rei/impl/client/gui/hints/HintProvider.java | 41 +++++++ .../gui/screen/UncertainDisplayViewingScreen.java | 2 +- .../gui/widget/search/OverlaySearchField.java | 66 ++++++++++- .../client/registry/screen/ScreenRegistryImpl.java | 6 + .../impl/client/subsets/SubsetsRegistryImpl.java | 6 + .../comparison/EntryComparatorRegistryImpl.java | 6 + .../impl/common/entry/type/EntryRegistryImpl.java | 6 + .../common/entry/type/EntryTypeRegistryImpl.java | 6 + .../common/fluid/FluidSupportProviderImpl.java | 6 + .../rei/impl/common/plugins/PluginManagerImpl.java | 21 ++-- .../common/runtime/DefaultRuntimePlugin.java | 11 +- .../runtime/PluginStageExecutionWatcher.java | 83 +++++++++++++ .../common/runtime/SearchBarHighlightWatcher.java | 55 +++++++++ .../assets/roughlyenoughitems/lang/bg_bg.json | 1 - .../assets/roughlyenoughitems/lang/cs_cz.json | 3 - .../assets/roughlyenoughitems/lang/da_dk.json | 2 - .../assets/roughlyenoughitems/lang/de_de.json | 3 - .../assets/roughlyenoughitems/lang/en_gb.json | 1 + .../assets/roughlyenoughitems/lang/en_ud.json | 2 - .../assets/roughlyenoughitems/lang/en_us.json | 7 +- .../assets/roughlyenoughitems/lang/eo_uy.json | 3 - .../assets/roughlyenoughitems/lang/es_es.json | 3 - .../assets/roughlyenoughitems/lang/et_ee.json | 3 - .../assets/roughlyenoughitems/lang/fr_fr.json | 3 - .../assets/roughlyenoughitems/lang/he_il.json | 1 - .../assets/roughlyenoughitems/lang/it_it.json | 3 - .../assets/roughlyenoughitems/lang/ja_jp.json | 2 - .../assets/roughlyenoughitems/lang/lol_us.json | 3 - .../assets/roughlyenoughitems/lang/nn_no.json | 1 - .../assets/roughlyenoughitems/lang/pl_pl.json | 3 - .../assets/roughlyenoughitems/lang/pt_br.json | 4 +- .../assets/roughlyenoughitems/lang/pt_pt.json | 2 - .../assets/roughlyenoughitems/lang/ru_ru.json | 3 - .../assets/roughlyenoughitems/lang/tr_tr.json | 3 - .../assets/roughlyenoughitems/lang/uk_ua.json | 3 - .../assets/roughlyenoughitems/lang/zh_cn.json | 19 +-- .../assets/roughlyenoughitems/lang/zh_hk.json | 130 +++++++++++++++++++++ .../assets/roughlyenoughitems/lang/zh_tw.json | 11 +- 43 files changed, 504 insertions(+), 90 deletions(-) create mode 100644 runtime/src/main/java/me/shedaniel/rei/impl/client/gui/hints/HintProvider.java create mode 100644 runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/PluginStageExecutionWatcher.java create mode 100644 runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/SearchBarHighlightWatcher.java create mode 100644 runtime/src/main/resources/assets/roughlyenoughitems/lang/zh_hk.json (limited to 'runtime') diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java index fe495d876..d6f6ac5a1 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java @@ -27,6 +27,7 @@ import dev.architectury.platform.Platform; import dev.architectury.registry.ReloadListenerRegistry; import dev.architectury.utils.Env; import dev.architectury.utils.EnvExecutor; +import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.annotation.Nullable; import me.shedaniel.rei.api.common.entry.comparison.FluidComparatorRegistry; import me.shedaniel.rei.api.common.entry.comparison.ItemComparatorRegistry; import me.shedaniel.rei.api.common.entry.type.EntryType; @@ -36,6 +37,7 @@ import me.shedaniel.rei.api.common.plugins.PluginManager; import me.shedaniel.rei.api.common.plugins.PluginView; import me.shedaniel.rei.api.common.plugins.REIPlugin; import me.shedaniel.rei.api.common.plugins.REIServerPlugin; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.api.common.transfer.info.MenuInfoRegistry; import me.shedaniel.rei.impl.Internals; import me.shedaniel.rei.impl.common.category.CategoryIdentifierImpl; @@ -112,10 +114,16 @@ public class RoughlyEnoughItemsCore { new MenuInfoRegistryImpl()), "serverPluginManager"); } - public static void _reloadPlugins() { + public static void _reloadPlugins(@Nullable ReloadStage stage) { + if (stage == null) { + for (ReloadStage reloadStage : ReloadStage.values()) { + _reloadPlugins(reloadStage); + } + return; + } try { for (PluginManager> instance : PluginManager.getActiveInstances()) { - instance.startReload(); + instance.startReload(stage); } } catch (Throwable throwable) { throwable.printStackTrace(); @@ -130,7 +138,7 @@ public class RoughlyEnoughItemsCore { if (Platform.getEnvironment() == Env.SERVER) { MutableLong lastReload = new MutableLong(-1); ReloadListenerRegistry.register(PackType.SERVER_DATA, (preparationBarrier, resourceManager, profilerFiller, profilerFiller2, executor, executor2) -> { - return preparationBarrier.wait(Unit.INSTANCE).thenRunAsync(RoughlyEnoughItemsCore::_reloadPlugins, executor2); + return preparationBarrier.wait(Unit.INSTANCE).thenRunAsync(() -> RoughlyEnoughItemsCore._reloadPlugins(null), executor2); }); } } diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java index 2f09e6a22..2b3a9aef4 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java @@ -25,11 +25,14 @@ package me.shedaniel.rei; import com.google.common.collect.Lists; import com.mojang.serialization.DataResult; +import dev.architectury.event.Event; +import dev.architectury.event.EventFactory; import dev.architectury.event.EventResult; import dev.architectury.event.events.client.ClientGuiEvent; import dev.architectury.event.events.client.ClientRecipeUpdateEvent; import dev.architectury.event.events.client.ClientScreenInputEvent; import dev.architectury.networking.NetworkManager; +import dev.architectury.platform.Platform; import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.REIRuntime; import me.shedaniel.rei.api.client.config.ConfigObject; @@ -48,6 +51,7 @@ import me.shedaniel.rei.api.client.registry.screen.OverlayDecider; import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry; import me.shedaniel.rei.api.common.category.CategoryIdentifier; import me.shedaniel.rei.api.common.plugins.PluginView; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.api.common.util.EntryStacks; import me.shedaniel.rei.impl.ClientInternals; import me.shedaniel.rei.impl.client.REIRuntimeImpl; @@ -108,6 +112,7 @@ import java.util.stream.Stream; @Environment(EnvType.CLIENT) public class RoughlyEnoughItemsCoreClient { + public static final Event PRE_UPDATE_RECIPES = EventFactory.createLoop(); @ApiStatus.Experimental public static boolean isLeftMousePressed = false; private static final ExecutorService RELOAD_PLUGINS = Executors.newSingleThreadScheduledExecutor(task -> { @@ -262,8 +267,10 @@ public class RoughlyEnoughItemsCoreClient { private void registerEvents() { Minecraft client = Minecraft.getInstance(); final ResourceLocation recipeButtonTex = new ResourceLocation("textures/gui/recipe_button.png"); - MutableLong lastReload = new MutableLong(-1); - ClientRecipeUpdateEvent.EVENT.register(recipeManager -> reloadPlugins(lastReload)); + MutableLong startReload = new MutableLong(-1); + MutableLong endReload = new MutableLong(-1); + PRE_UPDATE_RECIPES.register(recipeManager -> reloadPlugins(endReload, ReloadStage.START)); + ClientRecipeUpdateEvent.EVENT.register(recipeManager -> reloadPlugins(endReload, Platform.isFabric() ? ReloadStage.END : null)); ClientGuiEvent.INIT_POST.register((screen, access) -> { REIRuntimeImpl.getInstance().setPreviousScreen(screen); if (ConfigObject.getInstance().doesDisableRecipeBook() && screen instanceof AbstractContainerScreen) { @@ -359,7 +366,7 @@ public class RoughlyEnoughItemsCoreClient { } @ApiStatus.Internal - public static void reloadPlugins(MutableLong lastReload) { + public static void reloadPlugins(MutableLong lastReload, @Nullable ReloadStage start) { if (lastReload != null) { if (lastReload.getValue() > 0 && System.currentTimeMillis() - lastReload.getValue() <= 5000) { RoughlyEnoughItemsCore.LOGGER.warn("Suppressing Reload Plugins!"); @@ -368,9 +375,9 @@ public class RoughlyEnoughItemsCoreClient { lastReload.setValue(System.currentTimeMillis()); } if (ConfigObject.getInstance().doesRegisterRecipesInAnotherThread()) { - CompletableFuture.runAsync(RoughlyEnoughItemsCore::_reloadPlugins, RELOAD_PLUGINS); + CompletableFuture.runAsync(() -> RoughlyEnoughItemsCore._reloadPlugins(start), RELOAD_PLUGINS); } else { - RoughlyEnoughItemsCore._reloadPlugins(); + RoughlyEnoughItemsCore._reloadPlugins(start); } } } diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/REIRuntimeImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/REIRuntimeImpl.java index 956bfd62a..07a94a0b3 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/REIRuntimeImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/REIRuntimeImpl.java @@ -39,7 +39,9 @@ import me.shedaniel.rei.api.client.gui.widgets.TextField; import me.shedaniel.rei.api.client.gui.widgets.Tooltip; import me.shedaniel.rei.api.client.overlay.ScreenOverlay; import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.impl.client.gui.ScreenOverlayImpl; +import me.shedaniel.rei.impl.client.gui.hints.HintProvider; import me.shedaniel.rei.impl.client.gui.widget.search.OverlaySearchField; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -50,8 +52,7 @@ import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; -import java.util.LinkedHashSet; -import java.util.Optional; +import java.util.*; @ApiStatus.Internal @Environment(EnvType.CLIENT) @@ -65,6 +66,7 @@ public class REIRuntimeImpl implements REIRuntime { private AbstractContainerScreen previousContainerScreen = null; private Screen previousScreen = null; private LinkedHashSet lastDisplayScreen = Sets.newLinkedHashSetWithExpectedSize(10); + private List hintProviders = new ArrayList<>(); /** * @return the instance of screen helper @@ -75,6 +77,14 @@ public class REIRuntimeImpl implements REIRuntime { return (REIRuntimeImpl) REIRuntime.getInstance(); } + public void addHintProvider(HintProvider provider) { + this.hintProviders.add(provider); + } + + public List getHintProviders() { + return Collections.unmodifiableList(hintProviders); + } + @Override public void queueTooltip(@Nullable Tooltip tooltip) { if (overlay != null && tooltip != null) { @@ -211,7 +221,12 @@ public class REIRuntimeImpl implements REIRuntime { } @Override - public void endReload() { + public void startReload(ReloadStage stage) { + startReload(); + } + + @Override + public void endReload(ReloadStage stage) { getOverlay().ifPresent(ScreenOverlay::queueReloadOverlay); } diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/config/entries/ReloadPluginsEntry.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/config/entries/ReloadPluginsEntry.java index 81944d716..a96680983 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/config/entries/ReloadPluginsEntry.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/config/entries/ReloadPluginsEntry.java @@ -48,7 +48,7 @@ import java.util.Optional; @ApiStatus.Internal public class ReloadPluginsEntry extends AbstractConfigListEntry { private int width; - private AbstractWidget buttonWidget = new Button(0, 0, 0, 20, NarratorChatListener.NO_TITLE, button -> RoughlyEnoughItemsCoreClient.reloadPlugins(null)) { + private AbstractWidget buttonWidget = new Button(0, 0, 0, 20, NarratorChatListener.NO_TITLE, button -> RoughlyEnoughItemsCoreClient.reloadPlugins(null, null)) { @Override public void render(PoseStack matrices, int mouseX, int mouseY, float delta) { if (PluginManager.areAnyReloading()) { diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/favorites/FavoriteEntryTypeRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/favorites/FavoriteEntryTypeRegistryImpl.java index f5b2aedfe..fb5787276 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/favorites/FavoriteEntryTypeRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/favorites/FavoriteEntryTypeRegistryImpl.java @@ -31,6 +31,7 @@ import me.shedaniel.rei.api.client.config.ConfigObject; import me.shedaniel.rei.api.client.favorites.FavoriteEntry; import me.shedaniel.rei.api.client.favorites.FavoriteEntryType; import me.shedaniel.rei.api.client.plugins.REIClientPlugin; +import me.shedaniel.rei.api.common.registry.ReloadStage; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.ApiStatus; @@ -46,6 +47,11 @@ public class FavoriteEntryTypeRegistryImpl implements FavoriteEntryType.Registry private final BiMap> registry = HashBiMap.create(); private final Map sections = Maps.newLinkedHashMap(); + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void acceptPlugin(REIClientPlugin plugin) { plugin.registerFavorites(this); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/hints/HintProvider.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/hints/HintProvider.java new file mode 100644 index 000000000..d66c63387 --- /dev/null +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/hints/HintProvider.java @@ -0,0 +1,41 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.client.gui.hints; + +import me.shedaniel.math.Color; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.gui.widgets.Tooltip; +import net.minecraft.network.chat.Component; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface HintProvider { + List provide(); + + @Nullable + Tooltip provideTooltip(Point mouse); + + Color getColor(); +} diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/UncertainDisplayViewingScreen.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/UncertainDisplayViewingScreen.java index 8a630cfd6..1ec5aa3f5 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/UncertainDisplayViewingScreen.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/UncertainDisplayViewingScreen.java @@ -146,7 +146,7 @@ public class UncertainDisplayViewingScreen extends Screen { } else if (allModsUsingJEI != null && jeiEnabled) { ConfigManagerImpl.getInstance().getConfig().setJEICompatibilityLayerEnabled(jeiEnabled); ConfigManager.getInstance().saveConfig(); - RoughlyEnoughItemsCoreClient.reloadPlugins(null); + RoughlyEnoughItemsCoreClient.reloadPlugins(null, null); Minecraft.getInstance().setScreen(new ConfigReloadingScreen(() -> callback.accept(original))); } else { callback.accept(original); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/search/OverlaySearchField.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/search/OverlaySearchField.java index 08433acae..8c82258ec 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/search/OverlaySearchField.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/search/OverlaySearchField.java @@ -26,14 +26,21 @@ package me.shedaniel.rei.impl.client.gui.widget.search; import com.google.common.collect.Lists; import com.mojang.blaze3d.platform.InputConstants; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.*; +import com.mojang.datafixers.util.Pair; +import com.mojang.math.Matrix4f; import me.shedaniel.math.Color; import me.shedaniel.math.Point; +import me.shedaniel.math.Rectangle; import me.shedaniel.math.impl.PointHelper; import me.shedaniel.rei.api.client.REIRuntime; import me.shedaniel.rei.api.client.config.ConfigObject; import me.shedaniel.rei.api.client.gui.config.SyntaxHighlightingMode; +import me.shedaniel.rei.api.client.gui.widgets.Tooltip; +import me.shedaniel.rei.api.common.util.CollectionUtils; +import me.shedaniel.rei.impl.client.REIRuntimeImpl; import me.shedaniel.rei.impl.client.gui.ScreenOverlayImpl; +import me.shedaniel.rei.impl.client.gui.hints.HintProvider; import me.shedaniel.rei.impl.client.gui.text.TextTransformations; import me.shedaniel.rei.impl.client.gui.widget.basewidgets.TextFieldWidget; import me.shedaniel.rei.impl.client.search.argument.type.ArgumentType; @@ -41,8 +48,10 @@ import me.shedaniel.rei.impl.client.search.argument.type.ArgumentTypesRegistry; import me.shedaniel.rei.impl.client.search.argument.type.TextArgumentType; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GameRenderer; import net.minecraft.client.resources.language.I18n; import net.minecraft.client.resources.sounds.SimpleSoundInstance; +import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; import net.minecraft.network.chat.TextColor; import net.minecraft.sounds.SoundEvents; @@ -130,11 +139,66 @@ public class OverlaySearchField extends TextFieldWidget implements TextFieldWidg public void laterRender(PoseStack matrices, int int_1, int int_2, float float_1) { RenderSystem.disableDepthTest(); + if (isMain) drawHint(matrices, int_1, int_2); setSuggestion(!isFocused() && getText().isEmpty() ? I18n.get("text.rei.search.field.suggestion") : null); super.render(matrices, int_1, int_2, float_1); RenderSystem.enableDepthTest(); } + private void drawHint(PoseStack poses, int int_1, int int_2) { + List> hints = CollectionUtils.flatMap(REIRuntimeImpl.getInstance().getHintProviders(), provider -> + CollectionUtils.map(provider.provide(), component -> new Pair<>(provider, component))); + if (hints.isEmpty()) return; + int width = getBounds().getWidth() - 4; + List> sequences = CollectionUtils.flatMap(hints, pair -> + CollectionUtils.map(font.split(pair.getSecond(), width - 6), sequence -> new Pair<>(pair.getFirst(), sequence))); + Color color = hints.stream() + .map(Pair::getFirst) + .distinct() + .map(HintProvider::getColor) + .reduce((color1, color2) -> { + int r = color1.getRed() - (color1.getRed() - color2.getRed()) / 2; + int g = color1.getGreen() - (color1.getGreen() - color2.getGreen()) / 2; + int b = color1.getBlue() - (color1.getBlue() - color2.getBlue()) / 2; + return Color.ofRGBA(r, g, b, (color1.getAlpha() + color2.getAlpha()) / 2); + }).orElse(Color.ofTransparent(0x50000000)); + int height = 6 + font.lineHeight * sequences.size(); + int x = getBounds().getX() + 2; + int y = getBounds().getY() - height; + Tesselator tesselator = Tesselator.getInstance(); + BufferBuilder bufferBuilder = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); + bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); + Matrix4f pose = poses.last().pose(); + int background = 0xf0100010; + int color1 = color.getColor(); + int color2 = color.darker(2).getColor(); + fillGradient(pose, bufferBuilder, x, y - 1, x + width, y, 400, background, background); + fillGradient(pose, bufferBuilder, x, y + height, x + width, y + height + 1, 400, background, background); + fillGradient(pose, bufferBuilder, x, y, x + width, y + height, 400, background, background); + fillGradient(pose, bufferBuilder, x - 1, y, x, y + height, 400, background, background); + fillGradient(pose, bufferBuilder, x + width, y, x + width + 1, y + height, 400, background, background); + fillGradient(pose, bufferBuilder, x, y + 1, x + 1, y + height - 1, 400, color1, color2); + fillGradient(pose, bufferBuilder, x + width - 1, y + 1, x + width, y + height - 1, 400, color1, color2); + fillGradient(pose, bufferBuilder, x, y, x + width, y + 1, 400, color1, color1); + fillGradient(pose, bufferBuilder, x, y + height - 1, x + width, y + height, 400, color2, color2); + bufferBuilder.end(); + BufferUploader.end(bufferBuilder); + poses.pushPose(); + poses.translate(0.0D, 0.0D, 400.0D); + for (int i = 0; i < sequences.size(); i++) { + Pair pair = sequences.get(i); + int lineWidth = font.drawShadow(poses, pair.getSecond(), x + 3, y + 3 + font.lineHeight * i, -1); + if (new Rectangle(x + 3, y + 3 + font.lineHeight * i, lineWidth, font.lineHeight).contains(int_1, int_2)) { + Tooltip tooltip = pair.getFirst().provideTooltip(new Point(int_1, int_2)); + if (tooltip != null) { + tooltip.queue(); + } + } + } + poses.popPose(); + } + @Override protected void renderSuggestion(PoseStack matrices, int x, int y) { matrices.pushPose(); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.java index 0577de76e..6456c7aa9 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.java @@ -39,6 +39,7 @@ import me.shedaniel.rei.api.client.plugins.REIClientPlugin; import me.shedaniel.rei.api.client.registry.screen.*; import me.shedaniel.rei.api.common.category.CategoryIdentifier; import me.shedaniel.rei.api.common.entry.EntryStack; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.api.common.util.CollectionUtils; import me.shedaniel.rei.api.common.util.EntryStacks; import net.fabricmc.api.EnvType; @@ -68,6 +69,11 @@ public class ScreenRegistryImpl implements ScreenRegistry { private ExclusionZones exclusionZones; private Class tmpScreen; + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void acceptPlugin(REIClientPlugin plugin) { plugin.registerScreens(this); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/subsets/SubsetsRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/subsets/SubsetsRegistryImpl.java index 9cbdfd76c..7e2913f55 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/subsets/SubsetsRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/subsets/SubsetsRegistryImpl.java @@ -28,6 +28,7 @@ import com.google.common.collect.Sets; import me.shedaniel.rei.api.client.plugins.REIClientPlugin; import me.shedaniel.rei.api.client.subsets.SubsetsRegistry; import me.shedaniel.rei.api.common.entry.EntryStack; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.api.common.util.CollectionUtils; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -42,6 +43,11 @@ import java.util.*; public class SubsetsRegistryImpl implements SubsetsRegistry { private final Map>> paths = Maps.newHashMap(); + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void acceptPlugin(REIClientPlugin plugin) { plugin.registerSubsets(this); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/comparison/EntryComparatorRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/comparison/EntryComparatorRegistryImpl.java index 51d91cb14..38fe8e118 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/comparison/EntryComparatorRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/comparison/EntryComparatorRegistryImpl.java @@ -26,6 +26,7 @@ package me.shedaniel.rei.impl.common.entry.comparison; import me.shedaniel.rei.api.common.entry.comparison.ComparisonContext; import me.shedaniel.rei.api.common.entry.comparison.EntryComparator; import me.shedaniel.rei.api.common.entry.comparison.EntryComparatorRegistry; +import me.shedaniel.rei.api.common.registry.ReloadStage; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.ApiStatus; @@ -46,6 +47,11 @@ public abstract class EntryComparatorRegistryImpl implements EntryComparat } } + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void startReload() { comparators.clear(); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java index 07c0e618c..a52ee508a 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java @@ -31,6 +31,7 @@ import me.shedaniel.rei.api.client.config.ConfigObject; import me.shedaniel.rei.api.client.plugins.REIClientPlugin; import me.shedaniel.rei.api.client.registry.entry.EntryRegistry; import me.shedaniel.rei.api.common.entry.EntryStack; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.api.common.util.CollectionUtils; import me.shedaniel.rei.api.common.util.EntryStacks; import me.shedaniel.rei.impl.client.config.ConfigObjectImpl; @@ -68,6 +69,11 @@ public class EntryRegistryImpl implements EntryRegistry { plugin.registerEntries(this); } + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void startReload() { entries.clear(); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryTypeRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryTypeRegistryImpl.java index 43e3531ce..f25f2d13f 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryTypeRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryTypeRegistryImpl.java @@ -32,6 +32,7 @@ import me.shedaniel.rei.api.common.entry.type.EntryType; import me.shedaniel.rei.api.common.entry.type.EntryTypeBridge; import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry; import me.shedaniel.rei.api.common.plugins.REIPlugin; +import me.shedaniel.rei.api.common.registry.ReloadStage; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.ApiStatus; @@ -45,6 +46,11 @@ public class EntryTypeRegistryImpl implements EntryTypeRegistry { private final BiMap> entryTypes = HashBiMap.create(); private final Table>> typeBridges = HashBasedTable.create(); + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void acceptPlugin(REIPlugin plugin) { plugin.registerEntryTypes(this); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/fluid/FluidSupportProviderImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/fluid/FluidSupportProviderImpl.java index 00ae2d0c4..47d1f277c 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/fluid/FluidSupportProviderImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/fluid/FluidSupportProviderImpl.java @@ -30,6 +30,7 @@ import dev.architectury.fluid.FluidStack; import me.shedaniel.rei.api.common.entry.EntryStack; import me.shedaniel.rei.api.common.fluid.FluidSupportProvider; import me.shedaniel.rei.api.common.plugins.REIPlugin; +import me.shedaniel.rei.api.common.registry.ReloadStage; import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; @@ -45,6 +46,11 @@ public class FluidSupportProviderImpl extends ForwardingList providers = Lists.newCopyOnWriteArrayList(); private final List immutable = Collections.unmodifiableList(providers); + @Override + public ReloadStage getStage() { + return ReloadStage.START; + } + @Override public void acceptPlugin(REIPlugin plugin) { plugin.registerFluidSupport(this); diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java index 0c43edeee..48e818d32 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java @@ -32,6 +32,7 @@ import me.shedaniel.rei.api.common.plugins.PluginManager; import me.shedaniel.rei.api.common.plugins.PluginView; import me.shedaniel.rei.api.common.plugins.REIPlugin; import me.shedaniel.rei.api.common.plugins.REIPluginProvider; +import me.shedaniel.rei.api.common.registry.ReloadStage; import me.shedaniel.rei.api.common.registry.Reloadable; import me.shedaniel.rei.api.common.util.CollectionUtils; import net.minecraft.Util; @@ -149,7 +150,7 @@ public class PluginManagerImpl

> implements PluginManager< } @Override - public void startReload() { + public void startReload(ReloadStage stage) { try { reloading = true; long startTime = Util.getMillis(); @@ -158,7 +159,7 @@ public class PluginManagerImpl

> implements PluginManager< for (Reloadable

reloadable : reloadables) { Class reloadableClass = reloadable.getClass(); try (SectionClosable startReload = section(sectionData, "start-reload-" + MoreObjects.firstNonNull(reloadableClass.getSimpleName(), reloadableClass.getName()))) { - reloadable.startReload(); + reloadable.startReload(stage); } catch (Throwable throwable) { throwable.printStackTrace(); } @@ -166,20 +167,26 @@ public class PluginManagerImpl

> implements PluginManager< List

plugins = new ArrayList<>(getPlugins().toList()); plugins.sort(Comparator.comparingDouble(P::getPriority).reversed()); - RoughlyEnoughItemsCore.LOGGER.info("Reloading Plugin Manager [%s], registered %d plugins: %s", pluginClass.getSimpleName(), plugins.size(), CollectionUtils.mapAndJoinToString(plugins, REIPlugin::getPluginProviderName, ", ")); + RoughlyEnoughItemsCore.LOGGER.info("Reloading Plugin Manager [%s] stage [%s], registered %d plugins: %s", pluginClass.getSimpleName(), stage.toString(), plugins.size(), CollectionUtils.mapAndJoinToString(plugins, REIPlugin::getPluginProviderName, ", ")); Collections.reverse(plugins); - pluginSection(sectionData, "pre-register", plugins, REIPlugin::preRegister); + if (stage == ReloadStage.START) { + pluginSection(sectionData, "pre-register", plugins, REIPlugin::preRegister); + } + for (Reloadable

reloadable : getReloadables()) { Class reloadableClass = reloadable.getClass(); - pluginSection(sectionData, "reloadable-plugin-" + MoreObjects.firstNonNull(reloadableClass.getSimpleName(), reloadableClass.getName()), plugins, reloadable::acceptPlugin); + pluginSection(sectionData, "reloadable-plugin-" + MoreObjects.firstNonNull(reloadableClass.getSimpleName(), reloadableClass.getName()), plugins, plugin -> reloadable.acceptPlugin(plugin, stage)); + } + + if (stage == ReloadStage.END) { + pluginSection(sectionData, "post-register", plugins, REIPlugin::postRegister); } - pluginSection(sectionData, "post-register", plugins, REIPlugin::postRegister); for (Reloadable

reloadable : reloadables) { Class reloadableClass = reloadable.getClass(); try (SectionClosable endReload = section(sectionData, "end-reload-" + MoreObjects.firstNonNull(reloadableClass.getSimpleName(), reloadableClass.getName()))) { - reloadable.endReload(); + reloadable.endReload(stage); } catch (Throwable throwable) { throwable.printStackTrace(); } diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java index 8aeff8a20..08911b34b 100644 --- a/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java @@ -29,11 +29,11 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry; import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes; import me.shedaniel.rei.api.common.fluid.FluidSupportProvider; +import me.shedaniel.rei.api.common.plugins.PluginManager; import me.shedaniel.rei.api.common.plugins.REIServerPlugin; +import me.shedaniel.rei.impl.client.REIRuntimeImpl; import me.shedaniel.rei.plugin.client.entry.FluidEntryDefinition; import me.shedaniel.rei.plugin.client.entry.ItemEntryDefinition; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.ApiStatus; @@ -44,6 +44,13 @@ import java.util.stream.Stream; public class DefaultRuntimePlugin implements REIServerPlugin { public static final ResourceLocation PLUGIN = new ResourceLocation("roughlyenoughitems", "default_runtime_plugin"); + public DefaultRuntimePlugin() { + PluginStageExecutionWatcher watcher = new PluginStageExecutionWatcher(); + PluginManager.getInstance().registerReloadable(watcher); + REIRuntimeImpl.getInstance().addHintProvider(watcher); + REIRuntimeImpl.getInstance().addHintProvider(new SearchBarHighlightWatcher()); + } + @Override public void registerEntryTypes(EntryTypeRegistry registry) { registry.register(VanillaEntryTypes.ITEM, new ItemEntryDefinition()); diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/PluginStageExecutionWatcher.java b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/PluginStageExecutionWatcher.java new file mode 100644 index 000000000..c92020949 --- /dev/null +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/PluginStageExecutionWatcher.java @@ -0,0 +1,83 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.plugin.common.runtime; + +import com.google.common.collect.ImmutableList; +import me.shedaniel.math.Color; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.gui.widgets.Tooltip; +import me.shedaniel.rei.api.common.plugins.REIPlugin; +import me.shedaniel.rei.api.common.registry.ReloadStage; +import me.shedaniel.rei.api.common.registry.Reloadable; +import me.shedaniel.rei.impl.client.gui.hints.HintProvider; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import org.jetbrains.annotations.Nullable; + +import java.util.*; +import java.util.stream.Collectors; + +public class PluginStageExecutionWatcher implements Reloadable>, HintProvider { + private Set stages = new HashSet<>(); + + @Override + public void startReload() { + for (ReloadStage stage : ReloadStage.values()) { + startReload(stage); + } + } + + @Override + public void startReload(ReloadStage stage) { + if (stage.ordinal() == 0) stages.clear(); + stages.add(stage); + } + + public Set notVisited() { + Set notVisited = new HashSet<>(Arrays.asList(ReloadStage.values())); + notVisited.removeAll(stages); + return notVisited; + } + + @Override + public List provide() { + Set notVisited = notVisited(); + if (notVisited.isEmpty()) { + return Collections.emptyList(); + } else { + return ImmutableList.of(new TranslatableComponent("text.rei.not.fully.initialized")); + } + } + + @Override + @Nullable + public Tooltip provideTooltip(Point mouse) { + return Tooltip.create(mouse, new TranslatableComponent("text.rei.not.fully.initialized.tooltip", notVisited().stream().map(Enum::name).collect(Collectors.joining(", ")))); + } + + @Override + public Color getColor() { + return Color.ofTransparent(0x50ff1500); + } +} diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/SearchBarHighlightWatcher.java b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/SearchBarHighlightWatcher.java new file mode 100644 index 000000000..08dd06ea0 --- /dev/null +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/SearchBarHighlightWatcher.java @@ -0,0 +1,55 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.plugin.common.runtime; + +import me.shedaniel.math.Color; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.gui.widgets.Tooltip; +import me.shedaniel.rei.impl.client.gui.hints.HintProvider; +import me.shedaniel.rei.impl.client.gui.widget.search.OverlaySearchField; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import org.jetbrains.annotations.Nullable; + +import java.util.Collections; +import java.util.List; + +public class SearchBarHighlightWatcher implements HintProvider { + @Override + public List provide() { + return OverlaySearchField.isHighlighting ? Collections.singletonList(new TranslatableComponent("text.rei.inventory.highlighting.enabled")) : + Collections.emptyList(); + } + + @Override + @Nullable + public Tooltip provideTooltip(Point mouse) { + return Tooltip.create(mouse, new TranslatableComponent("text.rei.inventory.highlighting.enabled.tooltip")); + } + + @Override + public Color getColor() { + return Color.ofTransparent(0x50f7ed23); + } +} diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/bg_bg.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/bg_bg.json index 2f25b91f8..4a0406433 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/bg_bg.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/bg_bg.json @@ -22,7 +22,6 @@ "text.rei.composting.page": "Страница %d", "text.rei.config": "Конфигурация", "text.rei.config_tooltip": "Отвори екран за конфигуриране\n§7Shift-кликни за да превключиш мамене", - "text.rei.config.optifine.description": "The configuration screen is incompatible with OptiFine / OptiFabric.", "text.rei.cheat_items": "Даден е [{item_name}§f] x{item_count} на {player_name}.", "text.rei.failed_cheat_items": "§cНеуспешно даване на предмети.", "ordering.rei.ascending": "Възходящ", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/cs_cz.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/cs_cz.json index 30a151120..9915f980e 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/cs_cz.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/cs_cz.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Nastavit modifikátory v konfiguračním okně)", "text.rei.cheating": "Podvádění", "text.rei.cheating_disabled": "§7Podvádění zakázáno", "text.rei.cheating_enabled": "§cPodvádění povoleno", @@ -41,8 +40,6 @@ "text.rei.composting.page": "Strana %d", "text.rei.config": "Konfigurace", "text.rei.config_tooltip": "Otevřít konfigurační okno\n§7Shift-Klik pro přepnutí podvádění", - "text.rei.config.optifine.title": "Nepodařilo se otevřít konfigurační okno REI", - "text.rei.config.optifine.description": "Konfigurační okno je nekompatibilní s vaší instancí OptiFine / OptiFabric.", "text.rei.cheat_items": "Hráči {player_name} dán předmět ({item_count}x) [{item_name}§f]", "text.rei.failed_cheat_items": "§cNepodařilo se dát předměty.", "text.rei.too_long_nbt": "§cNBT předmětu je příliš dlouhé, než aby mohl být použito ve hře pro více hráčů.", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/da_dk.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/da_dk.json index fa547d3b5..646d00c23 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/da_dk.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/da_dk.json @@ -29,8 +29,6 @@ "text.rei.composting.page": "Side %d", "text.rei.config": "Konfig", "text.rei.config_tooltip": "Åbn konfigskærm\n§7Skift-Klik for at slå snydetilstand til/fra", - "text.rei.config.optifine.title": "Kunne ikke åbne REI-konfigskærm", - "text.rei.config.optifine.description": "Konfigurationsskærmen er inkompatibel med din forekomst af OptiFine / OptiFabric.", "text.rei.cheat_items": "Gav [{item_name}§f] x{item_count} til {player_name}.", "text.rei.failed_cheat_items": "§cKunne ikke give genstande.", "ordering.rei.ascending": "Stigende", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/de_de.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/de_de.json index 74ea75b60..f19427e89 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/de_de.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/de_de.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Setze Modifizierungen im Einstellungsbildschirm)", "text.rei.cheating": "Cheating", "text.rei.cheating_disabled": "§7Cheating deaktiviert", "text.rei.cheating_enabled": "§cCheating Aktiviert", @@ -39,8 +38,6 @@ "text.rei.composting.page": "Seite %d", "text.rei.config": "Einstellung", "text.rei.config_tooltip": "Öffne das Konfig-Menü\n§7Shift-Klick um den Cheatenmodus ein-/auszuschalten", - "text.rei.config.optifine.title": "Fehler beim Öffnen der REI-Einstellungen", - "text.rei.config.optifine.description": "Der Konfigurationsbildschirm ist mit OptiFine / OptiFabric nicht kompatibel.", "text.rei.cheat_items": "[{item_name}] x{item_count} {player_name} gegeben.", "text.rei.failed_cheat_items": "§cItems geben fehlgeschlagen.", "ordering.rei.ascending": "Aufsteigend", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_gb.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_gb.json index a08fde2a2..6c7403e2b 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_gb.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_gb.json @@ -1,4 +1,5 @@ { + "text.rei.inventory.highlighting.enabled.tooltip": "This makes slots that does not match\nthe search filter grey.\nDouble click the search bar to toggle this mode.", "category.rei.blasting": "Blasting", "text.rei.favorites": "Favourites", "text.rei.favorites_tooltip": " \n§7Press %s to add this to favourites.", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_ud.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_ud.json index c6b1dbde2..8d99c7f0f 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_ud.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_ud.json @@ -1,5 +1,4 @@ { - "key.rei.category": "(uǝǝɹɔS ƃᴉɟuoƆ ʇɐ sɹǝᴉɟᴉpoW ʇǝS) sɯǝʇI ɥƃnouƎ ʎlɥƃnoɹ", "text.rei.cheating": "ƃuᴉʇɐǝɥƆ", "text.rei.cheating_disabled": "§7pǝןqɐsıᗡ buıʇɐǝɥϽ", "text.rei.cheating_enabled": "§cpǝןqɐuƎ buıʇɐǝɥϽ", @@ -31,7 +30,6 @@ "text.rei.composting.page": "p% ǝbɐԀ", "text.rei.config": "bıɟuoϽ", "text.rei.config_tooltip": "uǝǝɹɔS bıɟuoϽ uǝdO\n§7ǝpoɯ ʇɐǝɥɔ ǝןbboʇ oʇ ʞɔıןϽ-ʇɟıɥS", - "text.rei.config.optifine.description": "The configuration screen is incompatible with OptiFine / OptiFabric.", "text.rei.cheat_items": "§7˙{player_name} oʇ {item_count}x [{item_name}§7] ǝʌɐƃ", "text.rei.failed_cheat_items": "§c˙sɯǝʇı ǝʌıb oʇ pǝןıɐℲ", "ordering.rei.ascending": "buıpuǝɔs∀", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_us.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_us.json index 87a1392a3..bd3b05295 100755 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_us.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/en_us.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Set Modifiers at Config Screen)", "text.rei.cheating": "Cheating", "text.rei.cheating_disabled": "§7Cheating Disabled", "text.rei.cheating_enabled": "§cCheating Enabled", @@ -10,6 +9,10 @@ "text.rei.search.field.suggestion": "Search...", "text.rei.feedback": "Any feedback you want to give to the REI developer? %s to submit your feedback!", "text.rei.feedback.link": "Click me to visit the Google Form", + "text.rei.not.fully.initialized": "REI not yet fully initialized!", + "text.rei.not.fully.initialized.tooltip": "Missing stages: %s\nIf this does not go away,\ntry looking for support with the logs!", + "text.rei.inventory.highlighting.enabled": "Inventory Highlighting On", + "text.rei.inventory.highlighting.enabled.tooltip": "This makes slots that does not match\nthe search filter gray.\nDouble click the search bar to toggle this mode.", "category.rei.crafting": "Crafting", "category.rei.smelting": "Smelting", "category.rei.smelting.fuel": "Fuel", @@ -41,8 +44,6 @@ "text.rei.composting.page": "Page %d", "text.rei.config": "Config", "text.rei.config_tooltip": "Open Config Screen\n§7Shift-Click to toggle cheat mode", - "text.rei.config.optifine.title": "Failed to open REI config screen", - "text.rei.config.optifine.description": "The configuration screen is incompatible with your instance of OptiFine / OptiFabric.", "text.rei.cheat_items": "Gave [{item_name}§f] x{item_count} to {player_name}.", "text.rei.failed_cheat_items": "§cFailed to give items.", "text.rei.too_long_nbt": "§cItem NBT is too long to be applied in multiplayer.", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/eo_uy.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/eo_uy.json index b6b2017ca..10b3ee02e 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/eo_uy.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/eo_uy.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Determini Modifajn ĉe Agorda Ekrano)", "text.rei.cheating": "Trompado", "text.rei.cheating_disabled": "§7Trompado Malŝaltita", "text.rei.cheating_enabled": "§cTrompado Ŝaltita", @@ -39,8 +38,6 @@ "text.rei.composting.page": "Paĝo %d", "text.rei.config": "Agordo", "text.rei.config_tooltip": "Malfermi Agordan Ekranon\n§7Majuskle klaku por baskuli trompreĝimon", - "text.rei.config.optifine.title": "Malsukcesis malfermi agordan ekranon de REI", - "text.rei.config.optifine.description": "La agorda ekrano malkongruas kun via apero de OptiFine / OptiFabric.", "text.rei.cheat_items": "Donis [{item_name}§f] x{item_count} al {player_name}.", "text.rei.failed_cheat_items": "§cMalsukcesis doni aferojn.", "ordering.rei.ascending": "Kreskanta", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/es_es.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/es_es.json index c439e0c48..8380fb534 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/es_es.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/es_es.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Ajustar Modificadores en la Pantalla de Configuración)", "text.rei.cheating": "Trampas", "text.rei.cheating_disabled": "§Trampas desactivadas", "text.rei.cheating_enabled": "§cTrampas activadas", @@ -39,8 +38,6 @@ "text.rei.composting.page": "Página %d", "text.rei.config": "Configuración", "text.rei.config_tooltip": "Abrir pantalla de configuración\n§7Shift + Click para cambiar el modo trucos", - "text.rei.config.optifine.title": "Error al abrir la pantalla de configuración de REI", - "text.rei.config.optifine.description": "La pantalla de configuración no es compatible con tu instancia de OptiFine / OptiFabric.", "text.rei.cheat_items": "Dar [{item_name}§f] x{item_count} a {player_name}.", "text.rei.failed_cheat_items": "§cError al dar objetos.", "ordering.rei.ascending": "Ascendente", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/et_ee.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/et_ee.json index 4aa12a395..cc2aae861 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/et_ee.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/et_ee.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (määra muuteklahve seadistuskuvas)", "text.rei.cheating": "Sohitegemine", "text.rei.cheating_disabled": "§7Sohitegemine keelatud", "text.rei.cheating_enabled": "§cSohitegemine lubatud", @@ -39,8 +38,6 @@ "text.rei.composting.page": "Leht %d", "text.rei.config": "Seadistus", "text.rei.config_tooltip": "Ava seadistuskuva\n§7Shift-klõps sohitegemise lülitamiseks", - "text.rei.config.optifine.title": "REI seadistuskuva avamine ebaõnnestus", - "text.rei.config.optifine.description": "Seadistuskuva ei ühildu sinu OptiFine'i/OptiFabricu versiooniga.", "text.rei.cheat_items": "{item_count} [{item_name}§f] antud mängijale {player_name}.", "text.rei.failed_cheat_items": "§cEsemete andmine ebaõnnestus.", "ordering.rei.ascending": "kasvav", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/fr_fr.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/fr_fr.json index cc6cb780a..241f3b87d 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/fr_fr.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/fr_fr.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (paramètres dans le menu de config.)", "text.rei.cheating": "Triche", "text.rei.cheating_disabled": "§7Triche désactivée", "text.rei.cheating_enabled": "§cTriche activée", @@ -41,8 +40,6 @@ "text.rei.composting.page": "Page %d", "text.rei.config": "Configuration", "text.rei.config_tooltip": "Ouvrir le menu de configuration \n§7Maj. + Clic pour activer le mode triche", - "text.rei.config.optifine.title": "Échec de l'ouverture de l'écran de configuration de REI", - "text.rei.config.optifine.description": "L'écran de configuration est incompatible avec votre instance d'OptiFine / OptiFabric.", "text.rei.cheat_items": "Don de {item_count} [{item_name}§f] à {player_name}", "text.rei.failed_cheat_items": "§cImpossible de donner les objets.", "text.rei.too_long_nbt": "§cL'objet NBT est trop long pour être affiché en multijoueur", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/he_il.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/he_il.json index f9ccd76f8..8c46e1cbb 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/he_il.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/he_il.json @@ -1,5 +1,4 @@ { - "key.rei.category": "בערך מספיק פריטים (הגדר משתנים במסך התצורה)", "text.rei.cheating": "רמאות", "text.rei.cheating_disabled": "רמאות כבויה", "text.rei.cheating_enabled": "רמאות דלוקה", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/it_it.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/it_it.json index beed255dc..9602d80bf 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/it_it.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/it_it.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Imposta Modificatori alla Schermata di Configurazione)", "text.rei.cheating": "Cheating", "text.rei.cheating_disabled": "§7Cheating Disabilitato", "text.rei.cheating_enabled": "§cCheating Abilitato", @@ -39,8 +38,6 @@ "text.rei.composting.page": "Pagina %d", "text.rei.config": "Configurazione", "text.rei.config_tooltip": "Apri schermata di configurazione\n§7Clicca Shift per attivare la modalità cheat", - "text.rei.config.optifine.title": "Impossibile aprire la schermata di configurazione di REI", - "text.rei.config.optifine.description": "La schermata di configurazione è incompatibile con la tua istanza di OptiFine / OptiFabric.", "text.rei.cheat_items": "Ho dato [{item_name}§f] x{item_count} a {player_name}.", "text.rei.failed_cheat_items": "§cImpossibile dare gli oggetti.", "ordering.rei.ascending": "Crescente", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/ja_jp.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/ja_jp.json index e2b295b9a..8bb8853c6 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/ja_jp.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/ja_jp.json @@ -36,8 +36,6 @@ "text.rei.composting.page": "%dページ", "text.rei.config": "設定", "text.rei.config_tooltip": "設定画面を開く\n§7チートモードを 左シフトキー + 左クリック で切り替え", - "text.rei.config.optifine.title": "REI設定画面を開けませんでした", - "text.rei.config.optifine.description": "この設定画面は OptiFine / OptiFabric と互換性がありません。", "text.rei.cheat_items": "{player_name}に[{item_name}§f]を{item_count} 個与えました", "text.rei.failed_cheat_items": "§cアイテムを与えることができませんでした。", "ordering.rei.ascending": "昇順", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/lol_us.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/lol_us.json index a00cab2b6..5a4efee55 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/lol_us.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/lol_us.json @@ -1,5 +1,4 @@ { - "key.rei.category": "roughle INoo itemz (set modifeirz et conFIG scren)", "text.rei.cheating": "cheetin", "text.rei.cheating_disabled": "§7cheetin diSabld", "text.rei.cheating_enabled": "§ccheetIN INABld", @@ -36,8 +35,6 @@ "text.rei.composting.page": "Page %d", "text.rei.config": "Config", "text.rei.config_tooltip": "Open Config Scween\n§7Shift-Cwick to toggwe cheat mode", - "text.rei.config.optifine.title": "oh sadface faild to OPIN REi config scrin", - "text.rei.config.optifine.description": "teh configurashun sCRIN r encompatibl wif optIFIne / OPTIFABrIc!!", "text.rei.cheat_items": "Gave [{item_name}§f] x{item_count} to {pwayew_name}.", "text.rei.failed_cheat_items": "§cFaiwed to give items.", "ordering.rei.ascending": "Ascending", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/nn_no.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/nn_no.json index b17e9b927..afb1df61d 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/nn_no.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/nn_no.json @@ -1,5 +1,4 @@ { - "text.rei.config.optifine.description": "The configuration screen is incompatible with OptiFine / OptiFabric.", "config.roughlyenoughitems.appearance": "Utseende", "config.roughlyenoughitems.cheating": "Cheating: ", "config.roughlyenoughitems.favoritesEnabled": "Favoritter aktivert:", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json index 36054a811..22122772c 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (Ustaw Modyfikatory w Panelu Konfiguracyjnym)", "text.rei.cheating": "Tryb Oszukiwania", "text.rei.cheating_disabled": "§7Tryb Oszukiwania wyłączony", "text.rei.cheating_enabled": "§cTryb Oszukiwania włączony", @@ -39,8 +38,6 @@ "text.rei.composting.page": "Strona %d", "text.rei.config": "Konfiguracja", "text.rei.config_tooltip": "Otwórz Panel Konfiguracyjny\n§7Kliknij z Shiftem by przełączyć Tryb Oszukiwania", - "text.rei.config.optifine.title": "Nie udało się otworzyć ekranu konfiguracji REI", - "text.rei.config.optifine.description": "Ekran konfiguracji jest niekompatybilny z OptiFine / OptiFabric.", "text.rei.cheat_items": "Daj [{item_name}§f] x{item_count} graczowi {player_name}.", "text.rei.failed_cheat_items": "§cBłąd podczas dawania przedmiotów.", "ordering.rei.ascending": "Rosnący", diff --git a/runtime/src/main/resources/assets/roughlyenoughitems/lang/pt_br.json b/runtime/src/main/resources/assets/roughlyenoughitems/lang/pt_br.json index 769607c97..071c0efbb 100644 --- a/runtime/src/main/resources/assets/roughlyenoughitems/lang/pt_br.json +++ b/runtime/src/main/resources/assets/roughlyenoughitems/lang/pt_br.json @@ -1,5 +1,4 @@ { - "key.rei.category": "Roughly Enough Items (menu de definições)", "text.rei.cheating": "Trapaças", "text.rei.cheating_disabled": "§7Trapaças desativadas", "text.rei.cheating_enabled": "§cTrapaças ativadas", @@ -40,8 +39,6 @@ "text.rei.composting.page": "Página %d", "text.rei.config": "Definições", "text.rei.config_tooltip": "Abrir menu de definições\n§7Shift+clique para alternar o modo trapaça", - "text.rei.config.optifine.title": "Falha ao abrir a tela de definições do REI", - "text.rei.config.optifine.description": "O menu de definições é incompatível com a sua versão do OptiFine/OptiFabric.", "text.rei.cheat_items": "{player_name} recebeu {item_count} unidade(s) de [{item_name}§f].", "text.rei.failed_cheat_items": "§cFalha ao obter itens.", "ordering.rei.