aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java')
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java b/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
index 295f33924..216edeb9a 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
@@ -41,12 +41,12 @@ import java.util.function.Supplier;
public class DefaultPotionEffectExclusionZones implements Supplier<List<Rectangle>> {
@Override
public List<Rectangle> get() {
- if (!(ScreenHelper.getLastScreenWithHandler() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreenHooks) ScreenHelper.getLastScreenWithHandler()).rei_doesOffsetGuiForEffects())
+ if (!(ScreenHelper.getLastHandledScreen() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreenHooks) ScreenHelper.getLastHandledScreen()).rei_doesOffsetGuiForEffects())
return Collections.emptyList();
Collection<StatusEffectInstance> activePotionEffects = MinecraftClient.getInstance().player.getStatusEffects();
if (activePotionEffects.isEmpty())
return Collections.emptyList();
- ContainerScreenHooks hooks = ScreenHelper.getLastScreenWithHandlerHooks();
+ ContainerScreenHooks hooks = ((ContainerScreenHooks) ScreenHelper.getLastHandledScreen());
List<Rectangle> list = new ArrayList<>();
int x = hooks.rei_getContainerLeft() - 124;
int y = hooks.rei_getContainerTop();