ConfigObject.java 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. * This file is licensed under the MIT License, part of Roughly Enough Items.
  3. * Copyright (c) 2018, 2019, 2020 shedaniel
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy
  6. * of this software and associated documentation files (the "Software"), to deal
  7. * in the Software without restriction, including without limitation the rights
  8. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. * copies of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all
  13. * copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21. * SOFTWARE.
  22. */
  23. package me.shedaniel.rei.api;
  24. import me.shedaniel.clothconfig2.api.ModifierKeyCode;
  25. import me.shedaniel.rei.gui.config.EntryPanelOrdering;
  26. import me.shedaniel.rei.gui.config.RecipeBorderType;
  27. import me.shedaniel.rei.gui.config.RecipeScreenType;
  28. import me.shedaniel.rei.gui.config.SearchFieldLocation;
  29. import me.shedaniel.rei.impl.ConfigManagerImpl;
  30. import org.jetbrains.annotations.ApiStatus;
  31. import java.util.List;
  32. public interface ConfigObject {
  33. /**
  34. * @return the api instance of {@link me.shedaniel.rei.impl.ConfigObjectImpl}
  35. */
  36. static ConfigObject getInstance() {
  37. return ((ConfigManagerImpl) ConfigManager.getInstance()).getConfig();
  38. }
  39. boolean isOverlayVisible();
  40. void setOverlayVisible(boolean overlayVisible);
  41. boolean isCheating();
  42. void setCheating(boolean cheating);
  43. EntryPanelOrdering getItemListOrdering();
  44. boolean isItemListAscending();
  45. boolean isUsingDarkTheme();
  46. boolean isToastDisplayedOnCopyIdentifier();
  47. boolean doesRenderEntryEnchantmentGlint();
  48. boolean isEntryListWidgetScrolled();
  49. boolean shouldAppendModNames();
  50. RecipeScreenType getRecipeScreenType();
  51. void setRecipeScreenType(RecipeScreenType recipeScreenType);
  52. boolean isLoadingDefaultPlugin();
  53. SearchFieldLocation getSearchFieldLocation();
  54. boolean isLeftHandSidePanel();
  55. boolean isCraftableFilterEnabled();
  56. String getGamemodeCommand();
  57. String getGiveCommand();
  58. String getWeatherCommand();
  59. int getMaxRecipePerPage();
  60. boolean doesShowUtilsButtons();
  61. boolean doesDisableRecipeBook();
  62. boolean doesFixTabCloseContainer();
  63. boolean areClickableRecipeArrowsEnabled();
  64. RecipeBorderType getRecipeBorderType();
  65. boolean doesVillagerScreenHavePermanentScrollBar();
  66. boolean doesRegisterRecipesInAnotherThread();
  67. boolean doesSnapToRows();
  68. boolean isFavoritesEnabled();
  69. boolean doDisplayFavoritesTooltip();
  70. @Deprecated
  71. @ApiStatus.ScheduledForRemoval
  72. default boolean doDisplayFavoritesOnTheLeft() {
  73. return true;
  74. }
  75. boolean doesFastEntryRendering();
  76. boolean doDebugRenderTimeRequired();
  77. boolean doSearchFavorites();
  78. ModifierKeyCode getFavoriteKeyCode();
  79. ModifierKeyCode getRecipeKeybind();
  80. ModifierKeyCode getUsageKeybind();
  81. ModifierKeyCode getHideKeybind();
  82. ModifierKeyCode getPreviousPageKeybind();
  83. ModifierKeyCode getNextPageKeybind();
  84. ModifierKeyCode getFocusSearchFieldKeybind();
  85. ModifierKeyCode getCopyRecipeIdentifierKeybind();
  86. ModifierKeyCode getExportImageKeybind();
  87. double getEntrySize();
  88. boolean isUsingCompactTabs();
  89. boolean isLowerConfigButton();
  90. List<EntryStack> getFavorites();
  91. List<EntryStack> getFilteredStacks();
  92. @ApiStatus.Experimental
  93. boolean shouldAsyncSearch();
  94. @ApiStatus.Experimental
  95. int getNumberAsyncSearch();
  96. @ApiStatus.Experimental
  97. boolean doDebugSearchTimeRequired();
  98. @ApiStatus.Experimental
  99. boolean isSubsetsEnabled();
  100. boolean shouldResizeDynamically();
  101. }