From 0ef7d4d944b0683250f905f856c08e759ae9355d Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 10 Mar 2020 02:45:09 +0800 Subject: ScreenWithHandler refractor, why must we suffer Signed-off-by: shedaniel --- src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 6a28e6e04..7e8fe50ce 100644 --- a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java @@ -31,7 +31,7 @@ import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.*; import me.shedaniel.rei.api.plugins.REIPluginV0; import me.shedaniel.rei.utils.CollectionUtils; -import net.minecraft.client.gui.screen.ingame.ContainerScreen; +import net.minecraft.client.gui.screen.ingame.ScreenWithHandler; import net.minecraft.recipe.Recipe; import net.minecraft.recipe.RecipeManager; import net.minecraft.util.ActionResult; @@ -355,7 +355,7 @@ public class RecipeHelperImpl implements RecipeHelper { @Override public ActionResult shouldScreenBeOverlayed(Class screen) { - return ContainerScreen.class.isAssignableFrom(screen) ? ActionResult.SUCCESS : ActionResult.PASS; + return ScreenWithHandler.class.isAssignableFrom(screen) ? ActionResult.SUCCESS : ActionResult.PASS; } @Override @@ -461,7 +461,7 @@ public class RecipeHelperImpl implements RecipeHelper { } @Override - public void registerScreenClickArea(Rectangle rectangle, Class> screenClass, Identifier... categories) { + public void registerScreenClickArea(Rectangle rectangle, Class> screenClass, Identifier... categories) { this.screenClickAreas.add(new ScreenClickAreaImpl(screenClass, rectangle, categories)); } @@ -493,17 +493,17 @@ public class RecipeHelperImpl implements RecipeHelper { } private static class ScreenClickAreaImpl implements ScreenClickArea { - Class> screenClass; + Class> screenClass; Rectangle rectangle; Identifier[] categories; - private ScreenClickAreaImpl(Class> screenClass, Rectangle rectangle, Identifier[] categories) { + private ScreenClickAreaImpl(Class> screenClass, Rectangle rectangle, Identifier[] categories) { this.screenClass = screenClass; this.rectangle = rectangle; this.categories = categories; } - public Class> getScreenClass() { + public Class> getScreenClass() { return screenClass; } -- cgit