diff --git a/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java b/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java index ccab8f7550..aad83c75dc 100644 --- a/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java +++ b/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java @@ -3,6 +3,8 @@ import java.util.List; import java.util.function.Consumer; +import com.simibubi.create.infrastructure.config.AllConfigs; + import org.lwjgl.glfw.GLFW; import com.mojang.blaze3d.vertex.PoseStack; @@ -44,7 +46,7 @@ public AddressEditBox(Screen screen, Font pFont, int pX, int pY, int pWidth, int setBordered(false); setFocused(false); mouseClicked(0, 0, 0); - setMaxLength(25); + setMaxLength(AllConfigs.client().maxAddressLength.get()); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/packagePort/PackagePortScreen.java b/src/main/java/com/simibubi/create/content/logistics/packagePort/PackagePortScreen.java index eaa769c403..2223ad8e5f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/packagePort/PackagePortScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/packagePort/PackagePortScreen.java @@ -14,6 +14,8 @@ import com.simibubi.create.foundation.gui.widget.IconButton; import com.simibubi.create.foundation.utility.CreateLang; +import com.simibubi.create.infrastructure.config.AllConfigs; + import net.createmod.catnip.gui.element.GuiGameElement; import net.createmod.catnip.gui.widget.AbstractSimiWidget; import net.createmod.catnip.platform.CatnipServices; @@ -62,7 +64,7 @@ protected void init() { addressBox = new EditBox(new NoShadowFontWrapper(font), x + 23, y - 11, background.getWidth() - 20, 10, Component.empty()); addressBox.setBordered(false); - addressBox.setMaxLength(25); + addressBox.setMaxLength(AllConfigs.client().maxAddressLength.get()); addressBox.setTextColor(0x3D3C48); addressBox.setValue(menu.contentHolder.addressFilter); addressBox.setFocused(false); diff --git a/src/main/java/com/simibubi/create/content/trains/station/StationScreen.java b/src/main/java/com/simibubi/create/content/trains/station/StationScreen.java index 20fbad5ce5..5642497c21 100644 --- a/src/main/java/com/simibubi/create/content/trains/station/StationScreen.java +++ b/src/main/java/com/simibubi/create/content/trains/station/StationScreen.java @@ -19,6 +19,8 @@ import com.simibubi.create.foundation.gui.widget.IconButton; import com.simibubi.create.foundation.gui.widget.Label; import com.simibubi.create.foundation.gui.widget.ScrollInput; +import com.simibubi.create.infrastructure.config.AllConfigs; + import net.createmod.catnip.platform.CatnipServices; import com.simibubi.create.foundation.utility.CreateLang; @@ -74,7 +76,7 @@ protected void init() { nameBox = new EditBox(new NoShadowFontWrapper(font), x + 23, y + 4, background.getWidth() - 20, 10, Component.literal(station.name)); nameBox.setBordered(false); - nameBox.setMaxLength(25); + nameBox.setMaxLength(AllConfigs.client().maxAddressLength.get()); nameBox.setTextColor(0x592424); nameBox.setValue(station.name); nameBox.setFocused(false); diff --git a/src/main/java/com/simibubi/create/infrastructure/config/CClient.java b/src/main/java/com/simibubi/create/infrastructure/config/CClient.java index 2e0e2bd666..3276ece17c 100644 --- a/src/main/java/com/simibubi/create/infrastructure/config/CClient.java +++ b/src/main/java/com/simibubi/create/infrastructure/config/CClient.java @@ -34,6 +34,7 @@ public class CClient extends ConfigBase { Comments.ignoreFabulousWarning); public final ConfigBool rotateWhenSeated = b(true, "rotateWhenSeated", Comments.rotatewhenSeated); + public final ConfigInt maxAddressLength = i(25, 1, 128, "maxAddressLength", Comments.maxAddressLength); // custom fluid fog public final ConfigGroup fluidFogSettings = group(1, "fluidFogSettings", Comments.fluidFogSettings); @@ -122,6 +123,7 @@ private static class Comments { }; static String ignoreFabulousWarning = "Setting this to true will prevent Create from sending you a warning when playing with Fabulous graphics enabled"; static String rotatewhenSeated = "Disable to prevent being rotated while seated on a Moving Contraption"; + static String maxAddressLength = "Maximum length of an address in various UI."; static String overlay = "Settings for the Goggle Overlay"; static String overlayOffset = "Offset the overlay from goggle- and hover- information by this many pixels on the respective axis; Use /create overlay"; static String overlayCustomColor = "Enable this to use your custom colors for the Goggle- and Hover- Overlay";