aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-08-18 01:50:55 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-08-18 01:50:55 +0800
commitb65de8ed7fe045df451130e3c790613c4f002e2c (patch)
tree3412946f5dbf218e34bb7e7b94694768dae89e97 /src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
parent2000b84ad41de1b4729b153091699baad15d6237 (diff)
downloadRoughlyEnoughItems-b65de8ed7fe045df451130e3c790613c4f002e2c.tar.gz
RoughlyEnoughItems-b65de8ed7fe045df451130e3c790613c4f002e2c.tar.bz2
RoughlyEnoughItems-b65de8ed7fe045df451130e3c790613c4f002e2c.zip
Bye Bye java.awt
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
index 40bf80d91..8face20de 100644
--- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
+++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java
@@ -9,7 +9,9 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.mojang.blaze3d.platform.GlStateManager;
import com.zeitheron.hammercore.client.utils.Scissors;
-import me.shedaniel.cloth.api.ClientUtils;
+import me.shedaniel.math.api.Point;
+import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.impl.PointHelper;
import me.shedaniel.rei.RoughlyEnoughItemsCore;
import me.shedaniel.rei.api.*;
import me.shedaniel.rei.gui.renderers.RecipeRenderer;
@@ -31,7 +33,6 @@ import net.minecraft.text.TranslatableText;
import net.minecraft.util.Formatting;
import net.minecraft.util.math.MathHelper;
-import java.awt.*;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -276,7 +277,7 @@ public class VillagerRecipeViewingScreen extends Screen {
for (Element listener : children())
if (listener.mouseScrolled(double_1, double_2, double_3))
return true;
- if (bounds.contains(ClientUtils.getMouseLocation())) {
+ if (bounds.contains(PointHelper.fromMouse())) {
if (double_3 < 0 && categoryMap.get(categories.get(selectedCategoryIndex)).size() > 1) {
selectedRecipeIndex++;
if (selectedRecipeIndex >= categoryMap.get(categories.get(selectedCategoryIndex)).size())
@@ -395,10 +396,6 @@ public class VillagerRecipeViewingScreen extends Screen {
return super.mouseDragged(mouseX, mouseY, int_1, double_3, double_4);
}
- private int getReal(int i) {
- return (int) (i / ((double) minecraft.window.getScaledWidth() / (double) minecraft.window.getWidth()));
- }
-
@Override
public boolean keyPressed(int int_1, int int_2, int int_3) {
if ((int_1 == 256 || this.minecraft.options.keyInventory.matchesKey(int_1, int_2)) && this.shouldCloseOnEsc()) {