CC:Gamepad

Quick rating

CC:Gamepad

No reviews yet

CC: Gamepads adds a CC:Tweaked peripheral block which lets ComputerCraft computers read real gamepad/controller input from players.

Tech
QoL & Tweaks
Mod Loaders
NeoForge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Required

About

Project Details

Type
Mod
License
Mozilla Public License 2.0
Latest Version
ccgamepads-1.0.2-neoforge-1.21.1.jar
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

About

Description

CC: Gamepads

CC: Gamepads adds a CC:Tweaked peripheral block which lets ComputerCraft computers read real gamepad/controller input from players.

The controller is read on the player client, sent to the server, and exposed to Lua through a bound Gamepad Peripheral. This works in singleplayer, LAN, and dedicated multiplayer servers.

Requirements

  • Minecraft 1.21.1
  • NeoForge 21.1.x
  • CC:Tweaked 1.117.1

How To Use

  1. Place a Gamepad Peripheral block next to, or connected by modem to, a CC:Tweaked computer.
  2. Hold a Gamepad item.
  3. Sneak-right-click the Gamepad Peripheral with the Gamepad item to bind it.
  4. Keep the bound Gamepad item in your main hand or off hand.
  5. Plug in/connect with bluetooth your/a controller and run Lua code on the computer.

Up to 4 players can send input to the same Gamepad Peripheral at once. Each player gets a slot from 1 to 4.

Github Wiki/source code

Discord Server

CC: Gamepads adds a CC:Tweaked peripheral block which lets ComputerCraft computers read real gamepad/controller input from players.

The controller is read on the player client, sent to the server, and exposed to Lua through a bound Gamepad Peripheral. This works in singleplayer, LAN, and dedicated multiplayer servers. Requirements

Minecraft 1.21.1
NeoForge 21.1.x
CC:Tweaked 1.117.1

How To Use

Place a Gamepad Peripheral block next to, or connected by modem to, a CC:Tweaked computer.
Hold a Gamepad item.
Sneak-right-click the Gamepad Peripheral with the Gamepad item to bind it.
Keep the bound Gamepad item in your main hand or off hand.
Plug in/connect with bluetooth your/a controller and run Lua code on the computer.

Up to 4 players can send input to the same Gamepad Peripheral at once. Each player gets a slot from 1 to 4. Lua Peripheral

Wrap the peripheral like any other CC:Tweaked peripheral:

local pad = peripheral.find("gamepad")

Functions getPlayers()

Returns a list of connected controller states.

Each entry includes:

slot: player slot, 1 to 4
player: player name
playerId: player UUID
controllerId: client controller id
controllerName: controller name
guid: controller GUID
buttons: numbered button table
buttonNames: named button table
axes: numbered axis table
axisNames: named axis table
updatedAt: server timestamp

getState(slot)

Returns the full state table for one slot.

Throws an error if no controller is bound to that slot. isDown(slot, button)

Returns true if a numbered button is held.

Buttons:

A
B
X
Y
Left bumper
Right bumper
Back/select
Start
Guide/home
Left stick
Right stick
D-pad up
D-pad right
D-pad down
D-pad left

isButtonDown(slot, name)

Returns true if a named button is held.

Names:

a b x y leftBumper rightBumper back select start guide home leftStick rightStick dpadUp dpadRight dpadDown dpadLeft

getAxis(slot, axis)

Returns a numbered axis value.

Axes:

Left X, -1 to 1
Left Y, -1 to 1
Right X, -1 to 1
Right Y, -1 to 1
Left trigger, 0 to 1
Right trigger, 0 to 1

getAxisValue(slot, name)

Returns a named axis value.

Names:

leftX leftY rightX rightY leftTrigger rightTrigger

getMaxPlayers()

Returns 4. getButtonCount()

Returns 15. getAxisCount()

Returns 6. Events

When controller state changes, attached computers receive:

cc_events, "gamepad", slot, playerName, controllerId

Example:

local event, kind, slot, player, controllerId = os.pullEvent("cc_events") if kind == "gamepad" then print(player .. " updated slot " .. slot) end

Example Lua Program

This prints basic state for slot 1 and exits when Start is pressed.

local pad = peripheral.find("gamepad") if not pad then error("No gamepad peripheral found") end

print("Waiting for gamepad input...")

while true do local event, kind, slot, player = os.pullEvent("cc_events") if kind == "gamepad" and slot == 1 then local lx = pad.getAxisValue(1, "leftX") local ly = pad.getAxisValue(1, "leftY") local a = pad.isButtonDown(1, "a") local b = pad.isButtonDown(1, "b")

term.clear()
term.setCursorPos(1, 1)
print("Player: " .. player)
print(("Left stick: %.2f %.2f"):format(lx, ly))
print("A: " .. tostring(a))
print("B: " .. tostring(b))
print("Start exits")

if pad.isButtonDown(1, "start") then
  break
end

end end

Multiplayer Notes

Controller input is only accepted from the player who sent it.
The player must be holding a Gamepad item bound to the target peripheral.
Controller IDs and GUIDs are verified server-side.
Packet sizes, string lengths, button counts, axis counts, and axis values are validated before the state is accepted.
Player state is cleared when they disconnect or when their controller list changes.

Screenshots

Gallery

  • 2026-05-28_17.34.20.png
    2026-05-28_17.34.20.png 2026-05-28_17.34.20.png
  • 2026-05-28_17.33.41.png
    2026-05-28_17.33.41.png 2026-05-28_17.33.41.png
  • Gamepad 3d renderer.
    Gamepad 3d renderer. gamepad 3d
  • gamepad mod config
    gamepad mod config config

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~1,000
Total Downloads
CurseForge
<1,000
Modrinth
<1,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works