chore: note for inventory tweaks
This commit is contained in:
@@ -29,6 +29,8 @@ public interface IGrid {
|
|||||||
int SORTING_TYPE_QUANTITY = 0;
|
int SORTING_TYPE_QUANTITY = 0;
|
||||||
int SORTING_TYPE_NAME = 1;
|
int SORTING_TYPE_NAME = 1;
|
||||||
int SORTING_TYPE_ID = 2;
|
int SORTING_TYPE_ID = 2;
|
||||||
|
// todo: remove in 1.21.x
|
||||||
|
@Deprecated
|
||||||
int SORTING_TYPE_INVENTORYTWEAKS = 3;
|
int SORTING_TYPE_INVENTORYTWEAKS = 3;
|
||||||
int SORTING_TYPE_LAST_MODIFIED = 4;
|
int SORTING_TYPE_LAST_MODIFIED = 4;
|
||||||
|
|
||||||
@@ -50,38 +52,38 @@ public interface IGrid {
|
|||||||
|
|
||||||
static boolean isValidViewType(int type) {
|
static boolean isValidViewType(int type) {
|
||||||
return type == VIEW_TYPE_NORMAL ||
|
return type == VIEW_TYPE_NORMAL ||
|
||||||
type == VIEW_TYPE_CRAFTABLES ||
|
type == VIEW_TYPE_CRAFTABLES ||
|
||||||
type == VIEW_TYPE_NON_CRAFTABLES;
|
type == VIEW_TYPE_NON_CRAFTABLES;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isValidSearchBoxMode(int mode) {
|
static boolean isValidSearchBoxMode(int mode) {
|
||||||
return mode == SEARCH_BOX_MODE_NORMAL ||
|
return mode == SEARCH_BOX_MODE_NORMAL ||
|
||||||
mode == SEARCH_BOX_MODE_NORMAL_AUTOSELECTED ||
|
mode == SEARCH_BOX_MODE_NORMAL_AUTOSELECTED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED ||
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ||
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY ||
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED;
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isSearchBoxModeWithAutoselection(int mode) {
|
static boolean isSearchBoxModeWithAutoselection(int mode) {
|
||||||
return mode == SEARCH_BOX_MODE_NORMAL_AUTOSELECTED ||
|
return mode == SEARCH_BOX_MODE_NORMAL_AUTOSELECTED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ||
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED;
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean doesSearchBoxModeUseJEI(int mode) {
|
static boolean doesSearchBoxModeUseJEI(int mode) {
|
||||||
return mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED ||
|
return mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ||
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY ||
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY ||
|
||||||
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED;
|
mode == SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isValidSortingType(int type) {
|
static boolean isValidSortingType(int type) {
|
||||||
return type == SORTING_TYPE_QUANTITY ||
|
return type == SORTING_TYPE_QUANTITY ||
|
||||||
type == SORTING_TYPE_NAME ||
|
type == SORTING_TYPE_NAME ||
|
||||||
type == SORTING_TYPE_ID ||
|
type == SORTING_TYPE_ID ||
|
||||||
type == SORTING_TYPE_INVENTORYTWEAKS ||
|
type == SORTING_TYPE_INVENTORYTWEAKS ||
|
||||||
type == SORTING_TYPE_LAST_MODIFIED;
|
type == SORTING_TYPE_LAST_MODIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isValidSortingDirection(int direction) {
|
static boolean isValidSortingDirection(int direction) {
|
||||||
@@ -90,9 +92,9 @@ public interface IGrid {
|
|||||||
|
|
||||||
static boolean isValidSize(int size) {
|
static boolean isValidSize(int size) {
|
||||||
return size == SIZE_STRETCH ||
|
return size == SIZE_STRETCH ||
|
||||||
size == SIZE_SMALL ||
|
size == SIZE_SMALL ||
|
||||||
size == SIZE_MEDIUM ||
|
size == SIZE_MEDIUM ||
|
||||||
size == SIZE_LARGE;
|
size == SIZE_LARGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -3,6 +3,7 @@ package com.refinedmods.refinedstorage.screen.grid.sorting;
|
|||||||
import com.refinedmods.refinedstorage.api.network.grid.IGrid;
|
import com.refinedmods.refinedstorage.api.network.grid.IGrid;
|
||||||
import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack;
|
import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack;
|
||||||
|
|
||||||
|
// TODO: remove in 1.20.x
|
||||||
public class InventoryTweaksGridSorter implements IGridSorter {
|
public class InventoryTweaksGridSorter implements IGridSorter {
|
||||||
@Override
|
@Override
|
||||||
public boolean isApplicable(IGrid grid) {
|
public boolean isApplicable(IGrid grid) {
|
||||||
|
Reference in New Issue
Block a user