aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-12-20 17:31:30 +0800
committershedaniel <daniel@shedaniel.me>2019-12-20 17:31:30 +0800
commitb2d0af7a9fb0d16f14b294802f6718ac315d0de8 (patch)
tree239aeb17bc098158bf2e63737253247ba3e687fe /src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
parente0a4a4692f8cb465c32ef589e15cea83d2432f99 (diff)
downloadRoughlyEnoughItems-b2d0af7a9fb0d16f14b294802f6718ac315d0de8.tar.gz
RoughlyEnoughItems-b2d0af7a9fb0d16f14b294802f6718ac315d0de8.tar.bz2
RoughlyEnoughItems-b2d0af7a9fb0d16f14b294802f6718ac315d0de8.zip
3.2.27
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java')
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java b/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
index 2498f6875..6ec5a6421 100644
--- a/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
+++ b/src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java
@@ -18,12 +18,12 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
-import java.util.function.Function;
+import java.util.function.Supplier;
-public class DefaultPotionEffectExclusionZones implements Function<Boolean, List<Rectangle>> {
+public class DefaultPotionEffectExclusionZones implements Supplier<List<Rectangle>> {
@Override
- public List<Rectangle> apply(Boolean isOnRightSide) {
- if (isOnRightSide || !(ScreenHelper.getLastContainerScreen() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreenHooks) ScreenHelper.getLastContainerScreen()).rei_doesOffsetGuiForEffects())
+ public List<Rectangle> get() {
+ if (!(ScreenHelper.getLastContainerScreen() instanceof AbstractInventoryScreen) || !((AbstractInventoryScreenHooks) ScreenHelper.getLastContainerScreen()).rei_doesOffsetGuiForEffects())
return Collections.emptyList();
Collection<StatusEffectInstance> activePotionEffects = MinecraftClient.getInstance().player.getStatusEffects();
if (activePotionEffects.isEmpty())