From 2cd3f0737b2008e37f8eaadf479312c60d36e7bc Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sat, 20 Mar 2021 16:40:39 +0800 Subject: Allow customizing what part of REI should animate, disable config screen animation by default Signed-off-by: shedaniel --- runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java') diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java index b8edc6b5c..e69c5f3aa 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java @@ -245,7 +245,7 @@ public class ConfigManagerImpl implements ConfigManager { MutableLong current = new MutableLong(0); parentTranslated = new TransformingScreen(true, parent, null, - () -> current.setValue(current.getValue() == 0 ? Util.getMillis() + (getConfig().isReducedMotion() ? -3000 : 0) : current.getValue()), + () -> current.setValue(current.getValue() == 0 ? Util.getMillis() + (!getConfig().isConfigScreenAnimated() ? -3000 : 0) : current.getValue()), () -> 0, () -> (EasingMethod.EasingMethodImpl.EXPO.apply(Mth.clamp((Util.getMillis() - current.getValue()) / 750.0, 0, 1))) * Minecraft.getInstance().getWindow().getGuiScaledHeight(), () -> Util.getMillis() - current.getValue() > 800); parentTranslated.setInitAfter(true); @@ -266,7 +266,7 @@ public class ConfigManagerImpl implements ConfigManager { CreditsScreen creditsScreen = new CreditsScreen(screen); Minecraft.getInstance().setScreen(new TransformingScreen(false, creditsScreen, screen, - () -> current.setValue(current.getValue() == 0 ? Util.getMillis() + (getConfig().isReducedMotion() ? -3000 : 0) : current.getValue()), + () -> current.setValue(current.getValue() == 0 ? Util.getMillis() + (!getConfig().isCreditsScreenAnimated() ? -3000 : 0) : current.getValue()), () -> (1 - EasingMethod.EasingMethodImpl.EXPO.apply(Mth.clamp((Util.getMillis() - current.getValue()) / 750.0, 0, 1))) * Minecraft.getInstance().getWindow().getGuiScaledWidth() * 1.3, () -> 0, @@ -284,7 +284,7 @@ public class ConfigManagerImpl implements ConfigManager { MutableLong current = new MutableLong(0); return new TransformingScreen(false, configScreen, parent, - () -> current.setValue(current.getValue() == 0 ? Util.getMillis() + (getConfig().isReducedMotion() ? -3000 : 0) : current.getValue()), + () -> current.setValue(current.getValue() == 0 ? Util.getMillis() + (!getConfig().isConfigScreenAnimated() ? -3000 : 0) : current.getValue()), () -> 0, () -> (1 - EasingMethod.EasingMethodImpl.EXPO.apply(Mth.clamp((Util.getMillis() - current.getValue()) / 750.0, 0, 1))) * Minecraft.getInstance().getWindow().getGuiScaledHeight() * 1.3, () -> Util.getMillis() - current.getValue() > 800); } catch (Exception e) { -- cgit