diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-03-20 16:40:39 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-03-20 16:40:39 +0800 |
| commit | 2cd3f0737b2008e37f8eaadf479312c60d36e7bc (patch) | |
| tree | 94766ef4f9f33c66d28678e052cfb27d48f4094a /runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java | |
| parent | dae95200cbb2eb3b8851ca955ffd770e0892dedd (diff) | |
| download | RoughlyEnoughItems-2cd3f0737b2008e37f8eaadf479312c60d36e7bc.tar.gz RoughlyEnoughItems-2cd3f0737b2008e37f8eaadf479312c60d36e7bc.tar.bz2 RoughlyEnoughItems-2cd3f0737b2008e37f8eaadf479312c60d36e7bc.zip | |
Allow customizing what part of REI should animate, disable config screen animation by default
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |
