diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-04-18 15:06:19 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-04-18 15:06:19 +0800 |
| commit | ca2bb09ae0b22831c195453f0ccc47a8eb83a43c (patch) | |
| tree | f6ee754180d3feb9da2799269199ee8e683ff8ec /src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java | |
| parent | 8fd2f6ee7494b3623431319e4cc8056c4d6096d3 (diff) | |
| download | RoughlyEnoughItems-ca2bb09ae0b22831c195453f0ccc47a8eb83a43c.tar.gz RoughlyEnoughItems-ca2bb09ae0b22831c195453f0ccc47a8eb83a43c.tar.bz2 RoughlyEnoughItems-ca2bb09ae0b22831c195453f0ccc47a8eb83a43c.zip | |
Deprecate old ScreenHelper.getLastHandledScreen in favour of REIHelper.getPreviousHandledScreen
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java b/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java index 40b1d7b84..024eea242 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java @@ -25,7 +25,7 @@ package me.shedaniel.rei.plugin; import com.google.common.collect.Ordering; import me.shedaniel.math.Rectangle; -import me.shedaniel.rei.impl.ScreenHelper; +import me.shedaniel.rei.api.REIHelper; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen; import net.minecraft.client.gui.screen.ingame.HandledScreen; @@ -40,12 +40,12 @@ import java.util.function.Supplier; public class DefaultPotionEffectExclusionZones implements Supplier<List<Rectangle>> { @Override public List<Rectangle> get() { - if (!(ScreenHelper.getLastHandledScreen() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreen) ScreenHelper.getLastHandledScreen()).drawStatusEffects) + if (!(REIHelper.getInstance().getPreviousHandledScreen() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreen<?>) REIHelper.getInstance().getPreviousHandledScreen()).drawStatusEffects) return Collections.emptyList(); Collection<StatusEffectInstance> activePotionEffects = MinecraftClient.getInstance().player.getStatusEffects(); if (activePotionEffects.isEmpty()) return Collections.emptyList(); - HandledScreen<?> handledScreen = ScreenHelper.getLastHandledScreen(); + HandledScreen<?> handledScreen = REIHelper.getInstance().getPreviousHandledScreen(); List<Rectangle> list = new ArrayList<>(); int x = handledScreen.x - 124; int y = handledScreen.y; |
