diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-11-05 17:27:31 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-11-05 17:27:31 +0800 |
| commit | ecf3079ca2622e538cc325fa6063401139881e12 (patch) | |
| tree | 00a90fcf5af63b36f4951a598270d6d81ad6b2ed /RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java | |
| parent | 19d5cc098a812d08b235dbb128746380919a4de6 (diff) | |
| download | RoughlyEnoughItems-ecf3079ca2622e538cc325fa6063401139881e12.tar.gz RoughlyEnoughItems-ecf3079ca2622e538cc325fa6063401139881e12.tar.bz2 RoughlyEnoughItems-ecf3079ca2622e538cc325fa6063401139881e12.zip | |
v5.8.0 Update
- Config screen animations
- Require dragging the favorites further before initializing the dragging phase
- Require specific fabric modules to run instead of the whole API
- Mark getPreviousContainerScreen as nullable
- New config settings for setting entry list boundaries
- Update fabric loader, auto config and cloth config versions
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java')
| -rw-r--r-- | RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java index cc59a0559..1bea42943 100644 --- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java +++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java @@ -37,6 +37,7 @@ import me.shedaniel.rei.gui.config.*; import me.shedaniel.rei.impl.filtering.FilteringRule; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.util.Mth; import org.jetbrains.annotations.ApiStatus; import java.lang.annotation.ElementType; @@ -343,6 +344,18 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { return advanced.accessibility.resizeDynamically; } + @ApiStatus.Experimental + @Override + public double getHorizontalEntriesBoundaries() { + return Mth.clamp(appearance.horizontalEntriesBoundaries, 0.1,1); + } + + @ApiStatus.Experimental + @Override + public double getVerticalEntriesBoundaries() { + return Mth.clamp(appearance.verticalEntriesBoundaries, 0.1,1); + } + @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD}) @interface DontApplyFieldName {} @@ -361,6 +374,8 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { double min(); double max(); + + String prefix() default "Size: "; } public static class Basics { @@ -405,6 +420,9 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { @Comment("Declares whether the craftable filter button is enabled.") private boolean enableCraftableOnlyButton = false; @Comment("Declares whether the utils buttons are shown.") private boolean showUtilsButtons = false; } + + @UsePercentage(min = 0.1, max = 1.0, prefix = "Limit: ") private double horizontalEntriesBoundaries = 1.0; + @UsePercentage(min = 0.1, max = 1.0, prefix = "Limit: ") private double verticalEntriesBoundaries = 1.0; } public static class Functionality { |
