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