diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-03-10 02:45:09 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-03-10 02:45:09 +0800 |
| commit | 0ef7d4d944b0683250f905f856c08e759ae9355d (patch) | |
| tree | 88376b527c5c86fd24c0bf2b6ad4f740d20cc4d0 /src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java | |
| parent | 5c83be1590d4e1ea706ab7b57d20253f95dcbd1b (diff) | |
| download | RoughlyEnoughItems-0ef7d4d944b0683250f905f856c08e759ae9355d.tar.gz RoughlyEnoughItems-0ef7d4d944b0683250f905f856c08e759ae9355d.tar.bz2 RoughlyEnoughItems-0ef7d4d944b0683250f905f856c08e759ae9355d.zip | |
ScreenWithHandler refractor, why must we suffer
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java | 4 |
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 a290b271d..295f33924 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.getLastContainerScreen() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreenHooks) ScreenHelper.getLastContainerScreen()).rei_doesOffsetGuiForEffects()) + if (!(ScreenHelper.getLastScreenWithHandler() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreenHooks) ScreenHelper.getLastScreenWithHandler()).rei_doesOffsetGuiForEffects()) return Collections.emptyList(); Collection<StatusEffectInstance> activePotionEffects = MinecraftClient.getInstance().player.getStatusEffects(); if (activePotionEffects.isEmpty()) return Collections.emptyList(); - ContainerScreenHooks hooks = ScreenHelper.getLastContainerScreenHooks(); + ContainerScreenHooks hooks = ScreenHelper.getLastScreenWithHandlerHooks(); List<Rectangle> list = new ArrayList<>(); int x = hooks.rei_getContainerLeft() - 124; int y = hooks.rei_getContainerTop(); |
