Skip to content

Commit

Permalink
Merge branch '1.10' into 1.11
Browse files Browse the repository at this point in the history
Conflicts:
	gradle.properties
  • Loading branch information
mezz committed Nov 13, 2016
2 parents 0c22798 + 56f80b6 commit 1512c9f
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 29 deletions.
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE.md
@@ -1,6 +1,9 @@
Thank you for reporting!

* If you crashed, please paste the crash log to [gist](https://gist.github.com/) and link it here.
* Please do not suggest features from NEI. [See this spreadsheet](https://goo.gl/MQ0f3R).
For suggestions:
* Please do not suggest features from NEI. [See this spreadsheet](https://goo.gl/MQ0f3R) before requesting.

For issues:
* Try the latest version, it may have fixed the issue already.
* If you have FEI installed, please try without it before reporting.
* If you have NEI or FEI installed, please try without it before reporting.
* If you crashed, please paste the crash log to [gist](https://gist.github.com/) and link it here.
4 changes: 2 additions & 2 deletions gradle.properties
@@ -1,6 +1,6 @@
mcversion=1.10.2
forgeversion=12.18.2.2118
mcp_mappings=snapshot_20160712
forgeversion=12.18.2.2125
mcp_mappings=snapshot_20161111
curse_project_id=238222

version_major=4
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/mezz/jei/ProxyCommonClient.java
Expand Up @@ -138,8 +138,7 @@ private static void reloadItemList() {
JeiRuntime runtime = Internal.getRuntime();
if (runtime != null) {
ItemListOverlay itemListOverlay = runtime.getItemListOverlay();
ItemFilter itemFilter = itemListOverlay.getItemFilter();
itemFilter.rebuild();
itemListOverlay.rebuildItemFilter();
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/main/java/mezz/jei/gui/ItemListOverlay.java
Expand Up @@ -77,6 +77,15 @@ public void setFilterText(@Nullable String filterText) {
}
}

public void rebuildItemFilter() {
ItemFilter itemFilter = getItemFilter();
itemFilter.rebuild();
ItemListOverlayInternal.setToFirstPage();
if (internal != null) {
internal.updateLayout();
}
}

@Override
public String getFilterText() {
return Config.getFilterText();
Expand Down
21 changes: 14 additions & 7 deletions src/main/java/mezz/jei/gui/ItemListOverlayInternal.java
Expand Up @@ -231,7 +231,7 @@ private static boolean intersects(List<Rectangle> areas, Rectangle comparisonAre
return false;
}

private void updateLayout() {
public void updateLayout() {
ImmutableList<IIngredientListElement> ingredientList = parent.getItemFilter().getIngredientList();
guiIngredientList.set(firstItemIndex, ingredientList);

Expand Down Expand Up @@ -487,12 +487,15 @@ public void setKeyboardFocus(boolean keyboardFocus) {

public boolean onKeyPressed(char typedChar, int keyCode) {
if (hasKeyboardFocus()) {
boolean changed = searchField.textboxKeyTyped(typedChar, keyCode);
if (changed) {
firstItemIndex = 0;
updateLayout();
boolean handled = searchField.textboxKeyTyped(typedChar, keyCode);
if (handled) {
boolean changed = Config.setFilterText(searchField.getText());
if (changed) {
firstItemIndex = 0;
updateLayout();
}
}
return changed || ChatAllowedCharacters.isAllowedCharacter(typedChar);
return handled;
}
return false;
}
Expand Down Expand Up @@ -552,11 +555,15 @@ public ItemStack getStackUnderMouse() {
}

public void setFilterText(String filterText) {
firstItemIndex = 0;
searchField.setText(filterText);
setToFirstPage();
updateLayout();
}

public static void setToFirstPage() {
firstItemIndex = 0;
}

public ImmutableList<ItemStack> getVisibleStacks() {
ImmutableList.Builder<ItemStack> visibleStacks = ImmutableList.builder();
for (GuiIngredientFast guiItemStack : guiIngredientList.getAllGuiIngredients()) {
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/mezz/jei/input/GuiTextFieldFilter.java
Expand Up @@ -15,8 +15,8 @@
public class GuiTextFieldFilter extends GuiTextField {
private static final int MAX_HISTORY = 100;
private static final int maxSearchLength = 128;
private static final List<String> history = new LinkedList<String>();

private final List<String> history = new LinkedList<String>();
private final HoverChecker hoverChecker;
private final ItemFilter itemFilter;
private boolean previousKeyboardRepeatEnabled;
Expand Down Expand Up @@ -74,7 +74,7 @@ public boolean textboxKeyTyped(char typedChar, int keyCode) {
saveHistory();
}
}
return handled && Config.setFilterText(getText());
return handled;
}

public boolean isMouseOver(int mouseX, int mouseY) {
Expand Down Expand Up @@ -104,9 +104,7 @@ public void setFocused(boolean keyboardFocus) {
Keyboard.enableRepeatEvents(previousKeyboardRepeatEnabled);
}

if (!keyboardFocus) {
saveHistory();
}
saveHistory();
}
}

Expand Down
20 changes: 10 additions & 10 deletions src/main/resources/assets/jei/lang/ru_RU.lang
Expand Up @@ -54,16 +54,16 @@ config.jei.interface.recipeAnimationsEnabled.comment=Показывать ани

config.jei.search=Поиск
config.jei.search.comment=Настройки, отвечающие за поиск.
config.jei.search.atPrefixRequiredForModName=Использовать @ для имени мода
config.jei.search.atPrefixRequiredForModName.comment=Требовать "@ИмяМода" для поиска по имени модификации вместо просто "ИмяМода".
config.jei.search.prefixRequiredForTooltipSearch=Использовать # для всплывающей подсказки
config.jei.search.prefixRequiredForTooltipSearch.comment=Использовать "#" перед словом для поиска всплывающих подсказок.
config.jei.search.prefixRequiredForOreDictSearch=Использовать $ для словаря руд
config.jei.search.prefixRequiredForOreDictSearch.comment=Использовать "$" перед словом для поиска имён словаря руд.
config.jei.search.prefixRequiredForCreativeTabSearch=Использовать % для имени творческой вкладки
config.jei.search.prefixRequiredForCreativeTabSearch.comment=Использовать "%" перед словом для поиска имён творческих вкладок.
config.jei.search.prefixRequiredForColorSearch=Использовать ^ для цветов
config.jei.search.prefixRequiredForColorSearch.comment=Использовать "^" перед словом для поиска предмета по цвету.
config.jei.search.modNameSearchMode=@ИмяМода
config.jei.search.modNameSearchMode.comment=Режим поиска по имени мода (префикс: @)
config.jei.search.tooltipSearchMode=#ВсплывающаяПодсказка
config.jei.search.tooltipSearchMode.comment=Режим поиска по всплывающей подсказке (префикс: #)
config.jei.search.oreDictSearchMode=$СловарьРуд
config.jei.search.oreDictSearchMode.comment=Режим поиска по имени в словаре руд (префикс: $)
config.jei.search.creativeTabSearchMode=%%ТворческаяВкладка
config.jei.search.creativeTabSearchMode.comment=Режим поиска по имени творческой вкладки (префикс: %)
config.jei.search.colorSearchMode=^Цвет
config.jei.search.colorSearchMode.comment=Режим поиска по цвету предмета (префикс: ^)

config.jei.advanced=Продвинутое
config.jei.advanced.comment=Продвинутые настройки функций JEI.
Expand Down

0 comments on commit 1512c9f

Please sign in to comment.