
autocommand
I want to create a code that will continuously type /feed and /viphız for me without opening the Minecraft chat. The codes are /feed and /viphız...
00—fabricClient1.21.1mod
autocommand is a client-side Fabric mod that automatically issues the /feed and /viphız commands once per minute without opening the chat. Press F11 to toggle the automation; a short status message appears to confirm whether it is enabled or disabled. The timer resets when toggled and runs only while you are in a world with a connected player.
Implementation highlights:
- Uses a client tick listener to count 60-second intervals (1200 ticks) and send the two commands through the network handler so the chat UI never opens.
- Registers an F11 keybinding (configurable via the controls menu) and uses in-game status messages to show the current state.
- Safeguards: command dispatch pauses if no player or connection is present and the interval resets when you rejoin.
Notes and limitations:
- F11 is also Minecraft’s fullscreen toggle; you may want to rebind if that interferes with your setup.
- The interval is fixed at 60 seconds; adjust in code if you need a different cadence.
- Servers still enforce their own permissions for executing these commands.