-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
689 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/appeng/api/integrations/emi/EmiStackConverters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
src/main/java/appeng/integration/abstraction/ItemListMod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package appeng.integration.abstraction; | ||
|
||
import com.google.common.base.Strings; | ||
|
||
/** | ||
* Abstraction for accessing functionality of mods like JEI/REI/EMI. | ||
*/ | ||
public class ItemListMod { | ||
|
||
private static ItemListModAdapter adapter = ItemListModAdapter.none(); | ||
|
||
private ItemListMod() { | ||
} | ||
|
||
/** | ||
* @return True when an item-list mod like JEI/REI is active. | ||
*/ | ||
public static boolean isEnabled() { | ||
return adapter.isEnabled(); | ||
} | ||
|
||
/** | ||
* @return The name of the item-list mod that is present. | ||
*/ | ||
public static String getShortName() { | ||
return adapter.getShortName(); | ||
} | ||
|
||
public static String getSearchText() { | ||
return Strings.nullToEmpty(adapter.getSearchText()); | ||
} | ||
|
||
public static void setSearchText(String text) { | ||
adapter.setSearchText(Strings.nullToEmpty(text)); | ||
} | ||
|
||
public static boolean hasSearchFocus() { | ||
return adapter.hasSearchFocus(); | ||
} | ||
|
||
public static void setAdapter(ItemListModAdapter adapter) { | ||
ItemListMod.adapter = adapter; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/appeng/integration/abstraction/ItemListModAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package appeng.integration.abstraction; | ||
|
||
public interface ItemListModAdapter { | ||
|
||
boolean isEnabled(); | ||
|
||
String getShortName(); | ||
|
||
default String getSearchText() { | ||
return ""; | ||
} | ||
|
||
default void setSearchText(String text) { | ||
} | ||
|
||
default boolean hasSearchFocus() { | ||
return false; | ||
} | ||
|
||
static ItemListModAdapter none() { | ||
return new ItemListModAdapter() { | ||
@Override | ||
public boolean isEnabled() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String getShortName() { | ||
return "REI/EMI"; | ||
} | ||
}; | ||
} | ||
|
||
} |
38 changes: 0 additions & 38 deletions
38
src/main/java/appeng/integration/abstraction/JEIFacade.java
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
src/main/java/appeng/integration/abstraction/REIFacade.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.