Fixes
This commit is contained in:
@@ -121,29 +121,15 @@ public class GuiGrid extends GuiBase {
|
||||
|
||||
String query = searchField.getText().trim().toLowerCase();
|
||||
|
||||
if (!query.isEmpty()) {
|
||||
Iterator<ClientStack> t = items.iterator();
|
||||
|
||||
while (t.hasNext()) {
|
||||
ClientStack stack = t.next();
|
||||
|
||||
switch (grid.getViewType()) {
|
||||
case TileGrid.VIEW_TYPE_NORMAL:
|
||||
break;
|
||||
case TileGrid.VIEW_TYPE_NON_CRAFTABLES:
|
||||
if (stack.isCraftable()) {
|
||||
if (grid.getViewType() == TileGrid.VIEW_TYPE_NON_CRAFTABLES && stack.isCraftable()) {
|
||||
t.remove();
|
||||
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case TileGrid.VIEW_TYPE_CRAFTABLES:
|
||||
if (!stack.isCraftable()) {
|
||||
} else if (grid.getViewType() == TileGrid.VIEW_TYPE_CRAFTABLES && !stack.isCraftable()) {
|
||||
t.remove();
|
||||
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (query.startsWith("@")) {
|
||||
@@ -180,7 +166,6 @@ public class GuiGrid extends GuiBase {
|
||||
t.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(items, nameComparator);
|
||||
|
||||
|
||||
@@ -304,22 +304,22 @@ public class TileGrid extends TileNode implements IGrid {
|
||||
|
||||
@Override
|
||||
public void onViewTypeChanged(int type) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, sortingDirection, sortingType, searchBoxMode, type));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, type, sortingDirection, sortingType, searchBoxMode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSortingTypeChanged(int type) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, sortingDirection, type, searchBoxMode, viewType));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, viewType, sortingDirection, type, searchBoxMode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSortingDirectionChanged(int direction) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, direction, sortingType, searchBoxMode, viewType));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, viewType, direction, sortingType, searchBoxMode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSearchBoxModeChanged(int searchBoxMode) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, sortingDirection, sortingType, searchBoxMode, viewType));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageGridSettingsUpdate(this, viewType, sortingDirection, sortingType, searchBoxMode));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,28 +73,28 @@ public class WirelessGrid implements IGrid {
|
||||
|
||||
@Override
|
||||
public void onViewTypeChanged(int type) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), getSortingDirection(), getSortingType(), getSearchBoxMode(), type));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), type, getSortingDirection(), getSortingType(), getSearchBoxMode()));
|
||||
|
||||
this.viewType = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSortingTypeChanged(int type) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), getSortingDirection(), type, getSearchBoxMode(), getViewType()));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), getViewType(), getSortingDirection(), type, getSearchBoxMode()));
|
||||
|
||||
this.sortingType = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSortingDirectionChanged(int direction) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), direction, getSortingType(), getSearchBoxMode(), getViewType()));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), getViewType(), direction, getSortingType(), getSearchBoxMode()));
|
||||
|
||||
this.sortingDirection = direction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSearchBoxModeChanged(int searchBoxMode) {
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), getSortingDirection(), getSortingType(), searchBoxMode, getViewType()));
|
||||
RefinedStorage.INSTANCE.network.sendToServer(new MessageWirelessGridSettingsUpdate(RefinedStorageUtils.getIdFromHand(hand), getViewType(), getSortingDirection(), getSortingType(), searchBoxMode));
|
||||
|
||||
this.searchBoxMode = searchBoxMode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user