ConfigObject.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. import me.shedaniel.clothconfig2.api.ModifierKeyCode;
  7. import me.shedaniel.rei.gui.config.ItemCheatingMode;
  8. import me.shedaniel.rei.gui.config.ItemListOrdering;
  9. import me.shedaniel.rei.gui.config.RecipeScreenType;
  10. import me.shedaniel.rei.gui.config.SearchFieldLocation;
  11. import me.shedaniel.rei.impl.ConfigObjectImpl;
  12. import net.minecraft.client.util.InputUtil;
  13. import java.lang.annotation.ElementType;
  14. import java.lang.annotation.Retention;
  15. import java.lang.annotation.RetentionPolicy;
  16. import java.lang.annotation.Target;
  17. public interface ConfigObject {
  18. @SuppressWarnings("deprecation")
  19. static ConfigObject getInstance() {
  20. return ConfigManager.getInstance().getConfig();
  21. }
  22. boolean isLighterButtonHover();
  23. void setLighterButtonHover(boolean lighterButtonHover);
  24. boolean isOverlayVisible();
  25. void setOverlayVisible(boolean overlayVisible);
  26. boolean isCheating();
  27. void setCheating(boolean cheating);
  28. ItemListOrdering getItemListOrdering();
  29. boolean isItemListAscending();
  30. boolean isUsingDarkTheme();
  31. boolean isToastDisplayedOnCopyIdentifier();
  32. @Deprecated
  33. default boolean doesRenderEntryExtraOverlay() {
  34. return doesRenderEntryEnchantmentGlint();
  35. }
  36. boolean doesRenderEntryEnchantmentGlint();
  37. boolean isEntryListWidgetScrolled();
  38. boolean shouldAppendModNames();
  39. RecipeScreenType getRecipeScreenType();
  40. void setRecipeScreenType(RecipeScreenType recipeScreenType);
  41. boolean isLoadingDefaultPlugin();
  42. SearchFieldLocation getSearchFieldLocation();
  43. boolean isLeftHandSidePanel();
  44. boolean isCraftableFilterEnabled();
  45. String getGamemodeCommand();
  46. String getGiveCommand();
  47. String getWeatherCommand();
  48. int getMaxRecipePerPage();
  49. boolean doesShowUtilsButtons();
  50. boolean doesDisableRecipeBook();
  51. boolean doesFixTabCloseContainer();
  52. boolean areClickableRecipeArrowsEnabled();
  53. ItemCheatingMode getItemCheatingMode();
  54. boolean isUsingLightGrayRecipeBorder();
  55. boolean doesVillagerScreenHavePermanentScrollBar();
  56. boolean doesRegisterRecipesInAnotherThread();
  57. boolean doesSnapToRows();
  58. boolean isFavoritesEnabled();
  59. boolean doDisplayFavoritesTooltip();
  60. boolean doDisplayFavoritesOnTheLeft();
  61. boolean doesFastEntryRendering();
  62. boolean doDebugRenderTimeRequired();
  63. boolean doSearchFavorites();
  64. @Deprecated
  65. default InputUtil.KeyCode getFavoriteKeybind() {
  66. return getFavoriteKeyCode().getKeyCode();
  67. }
  68. ModifierKeyCode getFavoriteKeyCode();
  69. ModifierKeyCode getRecipeKeybind();
  70. ModifierKeyCode getUsageKeybind();
  71. ModifierKeyCode getHideKeybind();
  72. ModifierKeyCode getPreviousPageKeybind();
  73. ModifierKeyCode getNextPageKeybind();
  74. ModifierKeyCode getFocusSearchFieldKeybind();
  75. ModifierKeyCode getCopyRecipeIdentifierKeybind();
  76. double getEntrySize();
  77. @Deprecated
  78. abstract ConfigObjectImpl.General getGeneral();
  79. @Retention(RetentionPolicy.RUNTIME)
  80. @Target({ElementType.FIELD})
  81. @interface AddInFrontKeyCode {}
  82. @Retention(RetentionPolicy.RUNTIME)
  83. @Target({ElementType.FIELD})
  84. @interface DontApplyFieldName {}
  85. @Retention(RetentionPolicy.RUNTIME)
  86. @Target({ElementType.FIELD})
  87. @interface UseEnumSelectorInstead {}
  88. @Retention(RetentionPolicy.RUNTIME)
  89. @Target({ElementType.FIELD})
  90. @interface UsePercentage {
  91. double min();
  92. double max();
  93. }
  94. }