aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-12-12 22:06:26 +0800
committershedaniel <daniel@shedaniel.me>2019-12-12 22:06:26 +0800
commitcbfc32fa44fec1ed91c7ff811a4755a504c46082 (patch)
treed8bf9030a60111dad2e6932d08241f46206f1b17 /src/main/java/me/shedaniel/rei/api
parent652c00c4017223fa02d63eba474ba35faa3e12c9 (diff)
downloadRoughlyEnoughItems-cbfc32fa44fec1ed91c7ff811a4755a504c46082.tar.gz
RoughlyEnoughItems-cbfc32fa44fec1ed91c7ff811a4755a504c46082.tar.bz2
RoughlyEnoughItems-cbfc32fa44fec1ed91c7ff811a4755a504c46082.zip
3.2.19
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api')
-rw-r--r--src/main/java/me/shedaniel/rei/api/ConfigManager.java2
-rw-r--r--src/main/java/me/shedaniel/rei/api/ConfigObject.java9
-rw-r--r--src/main/java/me/shedaniel/rei/api/DisplayHelper.java2
-rw-r--r--src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java1
4 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/ConfigManager.java b/src/main/java/me/shedaniel/rei/api/ConfigManager.java
index 75cb0ab1b..aaaab48f1 100644
--- a/src/main/java/me/shedaniel/rei/api/ConfigManager.java
+++ b/src/main/java/me/shedaniel/rei/api/ConfigManager.java
@@ -27,8 +27,10 @@ public interface ConfigManager {
/**
* Gets the config instance
*
+ * @deprecated Use {@link ConfigObject#getInstance()}
* @return the config instance
*/
+ @Deprecated
ConfigObject getConfig();
/**
diff --git a/src/main/java/me/shedaniel/rei/api/ConfigObject.java b/src/main/java/me/shedaniel/rei/api/ConfigObject.java
index 1b9ad64db..3b9f5ca6c 100644
--- a/src/main/java/me/shedaniel/rei/api/ConfigObject.java
+++ b/src/main/java/me/shedaniel/rei/api/ConfigObject.java
@@ -18,6 +18,11 @@ import java.lang.annotation.Target;
public interface ConfigObject {
+ @SuppressWarnings("deprecation")
+ static ConfigObject getInstance() {
+ return ConfigManager.getInstance().getConfig();
+ }
+
boolean isLighterButtonHover();
void setLighterButtonHover(boolean lighterButtonHover);
@@ -84,6 +89,10 @@ public interface ConfigObject {
boolean isFavoritesEnabled();
+ boolean doDisplayFavoritesTooltip();
+
+ boolean doDisplayFavoritesOnTheLeft();
+
InputUtil.KeyCode getFavoriteKeybind();
@Retention(RetentionPolicy.RUNTIME)
diff --git a/src/main/java/me/shedaniel/rei/api/DisplayHelper.java b/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
index 165a61b93..05bf4653a 100644
--- a/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
+++ b/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
@@ -118,7 +118,7 @@ public interface DisplayHelper {
* @return the item list bounds
*/
default Rectangle getItemListArea(Rectangle rectangle) {
- return new Rectangle(rectangle.x + 1, rectangle.y + 2 + (ConfigManager.getInstance().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + (ConfigManager.getInstance().getConfig().isEntryListWidgetScrolled() ? 0 : 22), rectangle.width - 2, rectangle.height - (ConfigManager.getInstance().getConfig().getSearchFieldLocation() != SearchFieldLocation.CENTER ? 27 + 22 : 27) + (!ConfigManager.getInstance().getConfig().isEntryListWidgetScrolled() ? 0 : 22));
+ return new Rectangle(rectangle.x + 1, rectangle.y + 2 + (ConfigObject.getInstance().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + (ConfigObject.getInstance().isEntryListWidgetScrolled() ? 0 : 22), rectangle.width - 2, rectangle.height - (ConfigObject.getInstance().getSearchFieldLocation() != SearchFieldLocation.CENTER ? 27 + 22 : 27) + (!ConfigObject.getInstance().isEntryListWidgetScrolled() ? 0 : 22));
}
/**
diff --git a/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java b/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java
index 407cce19a..708bab589 100644
--- a/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java
+++ b/src/main/java/me/shedaniel/rei/api/plugins/REIPluginV0.java
@@ -9,7 +9,6 @@ import me.shedaniel.rei.api.DisplayHelper;
import me.shedaniel.rei.api.EntryRegistry;
import me.shedaniel.rei.api.REIPluginEntry;
import me.shedaniel.rei.api.RecipeHelper;
-import me.shedaniel.rei.api.annotations.ToBeRemoved;
public interface REIPluginV0 extends REIPluginEntry {