Description
Longer Command Box
Type and send commands up to the server's real 32,500-character limit - no more 256-character wall.
What it does
- Input limit raised from 256 to 32,767 characters: the chat and command input box (ChatScreen) accepts the full range.
- Commands are no longer truncated before sending: Minecraft 26.2 silently cuts every command to 256 characters on its way out (normalizeChatMessage to trimChatMessage). This mod bypasses that truncation for slash commands, so long NBT commands are transmitted intact.
- Only the chat and command box is affected: signs, books, server-address fields and other text widgets keep vanilla behaviour.
The result
Long commands now work, up to the limit the server accepts:
Commands (setblock, summon, give, data, ...): client limit 32,767 (this mod), server limit about 32,500.
Plain chat messages: client limit 32,767 (input only), server limit 256 (vanilla server).
A 449-character setblock command that places a zombie spawner with full iron armor, trims and effects - typed in one go, executed as-is.
Why Minecraft 26.2 needs this
Minecraft 26.2 refactored the UI and chat-send layers, which introduced two 256-character walls:
1. EditBox.setMaxLength(256): the input box refuses anything past 256 characters.
2. New in 26.2: ChatScreen.normalizeChatMessage() applies StringUtil.trimChatMessage(), a hard substring(0, 256) truncation on every message, commands included, right before it is sent. Even with a raised input limit, commands were cut to 256 and the server failed with "Expected literal ','".
Longer Command Box fixes both: the box accepts more, and commands leave the client intact.
Requirements
- Minecraft 26.2
- Fabric Loader 0.19.3 or newer
- Java 25 or newer
- No Fabric API required: the mod uses only Mixin and the Fabric Loader.
Limitations
- Client-side only (environment: client). Servers enforce their own rules:
- Commands: about 32,500 characters on vanilla servers - plenty for long NBT.
- Plain chat messages: still rejected at 256 characters by vanilla servers; sending longer chat requires server-side support.
- Works in singleplayer and multiplayer. No server-side mod needed for long commands.
Technical details
Two targeted Mixins on ChatScreen:
- init: re-applies setMaxLength(32767) after vanilla's 256.
- normalizeChatMessage: skips the 256-character truncation for slash commands, keeping plain chat messages on vanilla behaviour.


