aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-05-14 01:33:54 +0800
committershedaniel <daniel@shedaniel.me>2020-05-14 01:33:54 +0800
commitc0ab2792b100457f42a63da8bae071feea8253a8 (patch)
tree761fcc6d686dd103b4ff33f91b86582411ae4480 /src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
parentd22b619c0d9870df72fb10c153ead3801bf1a971 (diff)
downloadRoughlyEnoughItems-c0ab2792b100457f42a63da8bae071feea8253a8.tar.gz
RoughlyEnoughItems-c0ab2792b100457f42a63da8bae071feea8253a8.tar.bz2
RoughlyEnoughItems-c0ab2792b100457f42a63da8bae071feea8253a8.zip
Update to 20w20a
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
index 1f653bc72..79068c07b 100644
--- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
@@ -369,14 +369,14 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen
}
@Override
- public boolean keyPressed(int int_1, int int_2, int int_3) {
- if (int_1 == 258) {
+ public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
+ if (keyCode == 258 && !client.options.keyInventory.matchesKey(keyCode, scanCode)) {
boolean boolean_1 = !hasShiftDown();
if (!this.changeFocus(boolean_1))
this.changeFocus(boolean_1);
return true;
}
- if (ConfigObject.getInstance().getNextPageKeybind().matchesKey(int_1, int_2)) {
+ if (ConfigObject.getInstance().getNextPageKeybind().matchesKey(keyCode, scanCode)) {
if (categoryMap.get(categories.get(selectedCategoryIndex)).size() > 1) {
selectedRecipeIndex++;
if (selectedRecipeIndex >= categoryMap.get(categories.get(selectedCategoryIndex)).size())
@@ -385,7 +385,7 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen
return true;
}
return false;
- } else if (ConfigObject.getInstance().getPreviousPageKeybind().matchesKey(int_1, int_2)) {
+ } else if (ConfigObject.getInstance().getPreviousPageKeybind().matchesKey(keyCode, scanCode)) {
if (categoryMap.get(categories.get(selectedCategoryIndex)).size() > 1) {
selectedRecipeIndex--;
if (selectedRecipeIndex < 0)
@@ -396,21 +396,21 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen
return false;
}
for (Element element : children())
- if (element.keyPressed(int_1, int_2, int_3))
+ if (element.keyPressed(keyCode, scanCode, modifiers))
return true;
- if (int_1 == 256 || this.client.options.keyInventory.matchesKey(int_1, int_2)) {
+ if (keyCode == 256 || this.client.options.keyInventory.matchesKey(keyCode, scanCode)) {
MinecraftClient.getInstance().openScreen(REIHelper.getInstance().getPreviousContainerScreen());
ScreenHelper.getLastOverlay().init();
return true;
}
- if (int_1 == 259) {
+ if (keyCode == 259) {
if (ScreenHelper.hasLastRecipeScreen())
client.openScreen(ScreenHelper.getLastRecipeScreen());
else
client.openScreen(REIHelper.getInstance().getPreviousContainerScreen());
return true;
}
- return super.keyPressed(int_1, int_2, int_3);
+ return super.keyPressed(keyCode, scanCode, modifiers);
}
}