diff options
7 files changed, 18 insertions, 16 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/api/common/display/DisplaySerializerRegistry.java b/api/src/main/java/me/shedaniel/rei/api/common/display/DisplaySerializerRegistry.java index e2e063023..8b2c8c0e1 100644 --- a/api/src/main/java/me/shedaniel/rei/api/common/display/DisplaySerializerRegistry.java +++ b/api/src/main/java/me/shedaniel/rei/api/common/display/DisplaySerializerRegistry.java @@ -38,7 +38,7 @@ public interface DisplaySerializerRegistry extends Reloadable<REIPlugin<?>> { * Registers a {@link DisplaySerializer} for serializing a {@link Display} for syncing across server-client, and * for serializing displays to disk for favorites. * <p> - * Since REI 6, all {@link me.shedaniel.rei.api.client.registry.display.DisplayCategory}s are required to register their serializers, + * Since REI 6, all {@link me.shedaniel.rei.api.client.registry.display.DisplayCategory} are required to register their serializers, * or mark themselves as unavailable for serialization. * * @param categoryId the category identifier of the display @@ -51,7 +51,7 @@ public interface DisplaySerializerRegistry extends Reloadable<REIPlugin<?>> { * Marks a {@link Display} as unavailable to sync across server-client, and * for serializing displays to disk for favorites. * <p> - * Since REI 6, all {@link me.shedaniel.rei.api.client.registry.display.DisplayCategory}s are required to register their serializers, + * Since REI 6, all {@link me.shedaniel.rei.api.client.registry.display.DisplayCategory} are required to register their serializers, * or mark themselves as unavailable for serialization. * * @param categoryId the category identifier of the display diff --git a/api/src/main/java/me/shedaniel/rei/api/common/plugins/PluginManager.java b/api/src/main/java/me/shedaniel/rei/api/common/plugins/PluginManager.java index 2a74d0493..7a525c045 100644 --- a/api/src/main/java/me/shedaniel/rei/api/common/plugins/PluginManager.java +++ b/api/src/main/java/me/shedaniel/rei/api/common/plugins/PluginManager.java @@ -59,11 +59,11 @@ public interface PluginManager<P extends REIPlugin<?>> extends ParentReloadable< () -> () -> Arrays.asList(getInstance(), getServerInstance())); } - static boolean areAnyPluginsReloading() { - return CollectionUtils.anyMatch(getActiveInstances(), PluginManager::arePluginsReloading); + static boolean areAnyReloading() { + return CollectionUtils.anyMatch(getActiveInstances(), PluginManager::isReloading); } - boolean arePluginsReloading(); + boolean isReloading(); <T extends Reloadable<? super P>> T get(Class<T> reloadableClass); diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCore.java index 6e37adb49..8112b7630 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 com.google.common.collect.Lists; import me.shedaniel.architectury.event.events.GuiEvent; import me.shedaniel.architectury.event.events.RecipeUpdateEvent; import me.shedaniel.architectury.event.events.client.ClientScreenInputEvent; +import me.shedaniel.architectury.hooks.ScreenHooks; import me.shedaniel.architectury.networking.NetworkManager; import me.shedaniel.architectury.platform.Platform; import me.shedaniel.architectury.registry.ReloadListeners; @@ -517,7 +518,8 @@ public class RoughlyEnoughItemsCore { GuiEvent.INIT_POST.register((screen, widgets, children) -> { REIHelperImpl.getInstance().setPreviousScreen(screen); if (ConfigObject.getInstance().doesDisableRecipeBook() && screen instanceof AbstractContainerScreen) { - widgets.removeIf(widget -> widget instanceof ImageButton && ((ImageButton) widget).resourceLocation.equals(recipeButtonTex)); + ScreenHooks.getButtons(screen).removeIf(widget -> widget instanceof ImageButton && ((ImageButton) widget).resourceLocation.equals(recipeButtonTex)); + children.removeIf(widget -> widget instanceof ImageButton && ((ImageButton) widget).resourceLocation.equals(recipeButtonTex)); } }); ClientScreenInputEvent.MOUSE_CLICKED_PRE.register((minecraftClient, screen, mouseX, mouseY, button) -> { 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 94196c19e..cadbe569c 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 @@ -49,7 +49,7 @@ public class ReloadPluginsEntry extends AbstractConfigListEntry<Unit> { private AbstractWidget buttonWidget = new Button(0, 0, 0, 20, NarratorChatListener.NO_TITLE, button -> RoughlyEnoughItemsCore.reloadPlugins(null)) { @Override public void render(PoseStack matrices, int mouseX, int mouseY, float delta) { - if (PluginManager.areAnyPluginsReloading()) { + if (PluginManager.areAnyReloading()) { Screen screen = Minecraft.getInstance().screen; Minecraft.getInstance().setScreen(new ConfigReloadingScreen(() -> Minecraft.getInstance().setScreen(screen))); } else { diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ConfigReloadingScreen.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ConfigReloadingScreen.java index 17fede258..52a531acf 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ConfigReloadingScreen.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/ConfigReloadingScreen.java @@ -48,7 +48,7 @@ public class ConfigReloadingScreen extends Screen { @Override public void render(PoseStack matrices, int int_1, int int_2, float float_1) { this.renderDirtBackground(0); - if (!PluginManager.areAnyPluginsReloading()) { + if (!PluginManager.areAnyReloading()) { parent.run(); } drawCenteredString(matrices, this.font, I18n.get("text.rei.config.is.reloading"), this.width / 2, this.height / 2 - 50, 16777215); 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 249abc0c6..684be988e 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 @@ -28,15 +28,12 @@ import com.google.common.base.Stopwatch; import com.google.common.collect.FluentIterable; import com.google.common.collect.Iterables; import me.shedaniel.rei.RoughlyEnoughItemsCore; -import me.shedaniel.rei.api.client.registry.entry.EntryRegistry; 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.Reloadable; import me.shedaniel.rei.api.common.util.CollectionUtils; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.Util; import org.apache.commons.lang3.tuple.MutablePair; import org.jetbrains.annotations.ApiStatus; @@ -54,7 +51,7 @@ public class PluginManagerImpl<P extends REIPlugin<?>> implements PluginManager< private final Map<Class<? extends Reloadable<P>>, Reloadable<? super P>> cache = new ConcurrentHashMap<>(); private final Class<P> pluginClass; private final UnaryOperator<PluginView<P>> view; - private boolean arePluginsLoading = false; + private boolean reloading = false; private final List<REIPluginProvider<P>> plugins = new ArrayList<>(); private final LongConsumer reloadDoneListener; @@ -74,8 +71,8 @@ public class PluginManagerImpl<P extends REIPlugin<?>> implements PluginManager< } @Override - public boolean arePluginsReloading() { - return arePluginsLoading; + public boolean isReloading() { + return reloading; } @Override @@ -154,7 +151,7 @@ public class PluginManagerImpl<P extends REIPlugin<?>> implements PluginManager< @Override public void startReload() { try { - arePluginsLoading = true; + reloading = true; long startTime = Util.getMillis(); MutablePair<Stopwatch, String> sectionData = new MutablePair<>(Stopwatch.createUnstarted(), ""); @@ -193,7 +190,7 @@ public class PluginManagerImpl<P extends REIPlugin<?>> implements PluginManager< } catch (Throwable throwable) { throwable.printStackTrace(); } finally { - arePluginsLoading = false; + reloading = false; } } } diff --git a/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json b/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json index d97522e9b..18f4cb4ec 100644 --- a/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json +++ b/src/main/resources/assets/roughlyenoughitems/lang/pl_pl.json @@ -106,6 +106,7 @@ "msg.rei.exported_recipe.desc": "Sprawdź folder 'rei_export'.", "subsets.rei.roughlyenoughitems.all_entries": "Wszystkie Wpisy", "subsets.rei.roughlyenoughitems.item_groups": "Zakładki w Trybie Kreatywnym", + "_comment": "Etykiety elementów konfiguracji", "config.roughlyenoughitems.title": "Panel Konfiguracyjny Roughly Enough Items", "config.roughlyenoughitems.basics": "Podstawowe", "config.roughlyenoughitems.appearance": "Wygląd", @@ -164,6 +165,8 @@ "config.roughlyenoughitems.accessibility.displayPanelLocation": "Pozycja Panelu Wejściowego:", "config.roughlyenoughitems.accessibility.displayPanelLocation.left": "Po lewej", "config.roughlyenoughitems.accessibility.displayPanelLocation.right": "Po prawej", + "config.roughlyenoughitems.search.modSearch": "Wyszukiwanie w modzie (@):", + "config.roughlyenoughitems.search_mode.always": "Zawsze włączone", "config.roughlyenoughitems.layout.debugRenderTimeRequired": "Tryb Debugowania Panelu Wejściowego:", "config.roughlyenoughitems.search.debugSearchTimeRequired": "Tryb wyszukiwania debugowania:", "config.roughlyenoughitems.accessibility.resizeDynamically": "Zmieniaj Rozmiar Dynamicznie:", |
