From b65de8ed7fe045df451130e3c790613c4f002e2c Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 18 Aug 2019 01:50:55 +0800 Subject: Bye Bye java.awt --- src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java') diff --git a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java index 5f2b7dacc..42eaba8dd 100644 --- a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java @@ -7,6 +7,7 @@ package me.shedaniel.rei.impl; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import me.shedaniel.math.api.Rectangle; import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.*; import me.shedaniel.rei.api.plugins.REIPluginV0; @@ -20,8 +21,6 @@ import net.minecraft.recipe.RecipeManager; import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; -import java.awt.*; -import java.util.List; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; @@ -198,7 +197,7 @@ public class RecipeHelperImpl implements RecipeHelper { @Override public Optional getSpeedCraftButtonArea(RecipeCategory category) { if (!speedCraftAreaSupplierMap.containsKey(category.getIdentifier())) - return Optional.ofNullable(bounds -> new Rectangle((int) bounds.getMaxX() - 16, (int) bounds.getMaxY() - 16, 10, 10)); + return Optional.ofNullable(bounds -> new Rectangle(bounds.getMaxX() - 16, bounds.getMaxY() - 16, 10, 10)); return Optional.ofNullable(speedCraftAreaSupplierMap.get(category.getIdentifier())); } @@ -214,7 +213,7 @@ public class RecipeHelperImpl implements RecipeHelper { @SuppressWarnings("deprecation") @Override public void registerDefaultSpeedCraftButtonArea(Identifier category) { - registerSpeedCraftButtonArea(category, bounds -> new Rectangle((int) bounds.getMaxX() - 16, (int) bounds.getMaxY() - 16, 10, 10)); + registerSpeedCraftButtonArea(category, bounds -> new Rectangle(bounds.getMaxX() - 16, bounds.getMaxY() - 16, 10, 10)); } @SuppressWarnings("deprecation") -- cgit