ConfigObject.java 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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.ItemListOrdering;
  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 me.shedaniel.rei.impl.ConfigObjectImpl;
  31. import org.jetbrains.annotations.ApiStatus;
  32. import java.util.List;
  33. public interface ConfigObject {
  34. static ConfigObject getInstance() {
  35. return ((ConfigManagerImpl) ConfigManager.getInstance()).getConfig();
  36. }
  37. boolean isOverlayVisible();
  38. void setOverlayVisible(boolean overlayVisible);
  39. boolean isCheating();
  40. void setCheating(boolean cheating);
  41. ItemListOrdering getItemListOrdering();
  42. boolean isItemListAscending();
  43. boolean isUsingDarkTheme();
  44. boolean isToastDisplayedOnCopyIdentifier();
  45. boolean doesRenderEntryEnchantmentGlint();
  46. boolean isEntryListWidgetScrolled();
  47. boolean shouldAppendModNames();
  48. RecipeScreenType getRecipeScreenType();
  49. void setRecipeScreenType(RecipeScreenType recipeScreenType);
  50. boolean isLoadingDefaultPlugin();
  51. SearchFieldLocation getSearchFieldLocation();
  52. boolean isLeftHandSidePanel();
  53. boolean isCraftableFilterEnabled();
  54. String getGamemodeCommand();
  55. String getGiveCommand();
  56. String getWeatherCommand();
  57. int getMaxRecipePerPage();
  58. boolean doesShowUtilsButtons();
  59. boolean doesDisableRecipeBook();
  60. boolean doesFixTabCloseContainer();
  61. boolean areClickableRecipeArrowsEnabled();
  62. @ApiStatus.ScheduledForRemoval
  63. @Deprecated
  64. boolean isUsingLightGrayRecipeBorder();
  65. RecipeBorderType getRecipeBorderType();
  66. boolean doesVillagerScreenHavePermanentScrollBar();
  67. boolean doesRegisterRecipesInAnotherThread();
  68. boolean doesSnapToRows();
  69. boolean isFavoritesEnabled();
  70. boolean doDisplayFavoritesTooltip();
  71. boolean doDisplayFavoritesOnTheLeft();
  72. boolean doesFastEntryRendering();
  73. boolean doDebugRenderTimeRequired();
  74. boolean doSearchFavorites();
  75. ModifierKeyCode getFavoriteKeyCode();
  76. ModifierKeyCode getRecipeKeybind();
  77. ModifierKeyCode getUsageKeybind();
  78. ModifierKeyCode getHideKeybind();
  79. ModifierKeyCode getPreviousPageKeybind();
  80. ModifierKeyCode getNextPageKeybind();
  81. ModifierKeyCode getFocusSearchFieldKeybind();
  82. ModifierKeyCode getCopyRecipeIdentifierKeybind();
  83. ModifierKeyCode getExportImageKeybind();
  84. double getEntrySize();
  85. @ApiStatus.Internal
  86. ConfigObjectImpl.General getGeneral();
  87. boolean isUsingCompactTabs();
  88. boolean isLowerConfigButton();
  89. List<EntryStack> getFavorites();
  90. List<EntryStack> getFilteredStacks();
  91. @ApiStatus.Experimental
  92. boolean shouldAsyncSearch();
  93. @ApiStatus.Experimental
  94. int getNumberAsyncSearch();
  95. @ApiStatus.Experimental
  96. boolean doDebugSearchTimeRequired();
  97. }