COWMODSКаталог модов

CC SmartCard

Programmable smart cards, identity scanners, passage sensors, and access gates for CC: Tweaked.

Автор: waxiadao1,2 тыс.3обновлён 16 июл. 2026 г.
ТехнологииУтилиты

Описание

CC SmartCard

A Fingerprint Scanner, CC: Tweaked computer, and Smart Card Reader with an inserted card

Programmable Smart Cards, identity scanners, passage sensors, and access gates for CC: Tweaked.

Unlike a CC disk, whose holder can freely read and write its shared storage, a Smart Card is written only once when issued. Its contents cannot then be read directly or arbitrarily changed; it can only run commands defined at issuance, giving it a different security boundary and usage model.

It is designed for ComputerCraft-style access cards, identity checks, tickets, tokens, banking systems, and other builds that need more than a plain item ID.

Smart Cards

The CC SmartCard creative tab showing white and dyed Smart Cards

  • Give each card a public ID and optional label.
  • Dye cards without changing their identity, program, or stored files.
  • Issue a card from one Lua source string or a directory of files.
  • Keep the issued program and its storage private from the normal reader API.
  • Run card programs independently from the calling computer.

Issued cards cannot be erased or reissued through the supported reader API.

Smart Card Reader

Place the reader beside a CC: Tweaked computer or connect it through a wired modem. Insert or remove a card by right-clicking any face of the reader.

The smart_card_reader peripheral can inspect public card metadata, issue a blank card, call commands on an issued card, and emit insertion or removal events.

local reader = peripheral.find("smart_card_reader")
assert(reader, "No Smart Card Reader found")

local message, cardId = reader.call("ping")
print(message, cardId)

Fingerprint Scanner

A Fingerprint Scanner before and after a successful player scan

The fingerprint_scanner peripheral waits for a player to right-click the scanner, briefly lights its scanned face, and returns the player's stable UUID together with their current profile name.

local scanner = peripheral.find("fingerprint_scanner")
local player = assert(scanner.scan())
print(player.name, player.uuid)

Access Gates and Passage Sensors

An automated two-gate passage closing the entrance, waiting for approval, opening the exit, and resetting

Build automated border-control lanes, secure vestibules, station barriers, or any other two-stage passage. The demonstration uses two independent Access Gates and one Passage Sensor: the entrance starts open, closes after one player enters, the inside computer authorises the exit, and the lane resets after the player leaves.

Place two Gate Cabinets facing each other across a one- or two-block gap to form one animated access_gate peripheral. Both cabinets control the same logical gate.

  • Glass leaves open or close asynchronously over 10 game ticks.
  • Obstructed leaves automatically reverse and reopen.
  • Cabinet lights show red for closed, amber for movement or faults, and green for open.
  • Gates ignore redstone and cannot be moved by direct player interaction.
  • When the final attached computer disconnects, the gate waits one second and fails open.
  • Gate state changes and obstructions are available as ComputerCraft events.

Two gates remain independent: your Lua program decides how authentication works and whether only one gate may be open. This makes the blocks useful beyond a single hard-coded border-control workflow.

Mount a passage_sensor above the controlled space to receive anonymous observations for players, creatures, vehicles, items, and other entities. Its detection cuboid is configurable from Lua, up to 256 blocks within eight blocks of the sensor. Programs can query a snapshot with getEntities() or react to entry, exit, and reset events. Lua chooses what counts as a traveller; the sensor never exposes player UUIDs, names, equipment, inventories, or NBT.

How Cards Work

  1. Craft a Smart Card and Smart Card Reader.
  2. Connect the reader to a CC: Tweaked computer.
  3. Insert a blank card and issue its Lua program once.
  4. Insert the issued card into other readers and call commands such as authorize, validate, claim, or redeem.

Card programs receive their own file storage and may use familiar ComputerCraft APIs. Secure random bytes are also available inside the card runtime for programs that need nonces or secret material.

Build Ideas

  • Bank cards and shop terminals
  • Room keys and access badges
  • Train tickets and event passes
  • Parcel pickup tokens
  • Loyalty and coupon cards
  • Two-factor systems combining a Smart Card with a live fingerprint scan
  • Automated border-control lanes and two-gate interlocked passages
  • Prison, bank, warehouse, and station access gates

Crafting

The crafting recipes for the Smart Card, Smart Card Reader, and Fingerprint Scanner

The image covers the original card and identity blocks. Gate Cabinet and Passage Sensor recipes are included in the text reference below.

Text recipe reference

Smart Card

Shapeless: Paper, Redstone Dust, Copper Ingot, and optional dyes.

Smart Card Reader

###
#R#
#C#
  • # = Stone
  • R = Redstone Dust
  • C = Copper Ingot

Fingerprint Scanner

SCS
RGR
SCS
  • S = Stone
  • C = Copper Ingot
  • R = Redstone Dust
  • G = Glass Pane

Gate Cabinets (makes 2)

SGS
PRP
SCS
  • S = Stone
  • G = Glass Pane
  • P = Piston
  • R = Redstone Dust
  • C = Copper Ingot

Passage Sensor

CGC
ROR
SSS
  • S = Stone
  • C = Copper Ingot
  • G = Glass Pane
  • R = Redstone Dust
  • O = Observer

Requirements

  • Minecraft 1.21.1
  • NeoForge 21.1.235 or newer in the 21.1 line
  • CC: Tweaked 1.120.0 or newer
  • Java 21

Install CC SmartCard on the server. Multiplayer clients should also install it so its blocks, items, models, and translations are available.

Documentation

The full README and API reference covers issuing, reader events, every peripheral method, the card runtime API, file layout, and complete examples.

Source code · Issue tracker

Card privacy is a gameplay boundary, not formal protection against server administrators or other out-of-game access.

Галерея

Последние версии

Все версии →
beta

0.6.0 - Access Gates and Passage Sensors

0.6.0
16 июл. 2026 г.1,1 тыс.Minecraft: 1.21.1neoforge
Скачать
Что нового
### Added - Added paired Gate Cabinets with animated glass barriers and the `access_gate` peripheral. - Added one- and two-block automatic gate pairing, asynchronous movement, obstruction reopening, and fail-open lifecycle handling. - Added the Passage Sensor peripheral with configurable anonymous entity observations, snapshots, and entry/exit/reset events. - Added Gate Cabinet and Passage Sensor recipes, models, translations, domain language, ADRs, and implementation documentation. - Added self-drop loot tables for all player-placeable device blocks.
beta

0.5.0 - Fingerprint Scan Result Table

0.5.0
8 июл. 2026 г.31Minecraft: 1.21.1neoforge
Скачать
Что нового
### Changed - `fingerprint_scanner.scan()` now returns a player identity table `{ uuid, name }` on success. - Cancelled scans now return `nil, "scan cancelled"` instead of raising, so error values no longer collide with identity values.
beta

0.4.1 - Smart Card Texture Cleanup

0.4.1
8 июл. 2026 г.15Minecraft: 1.21.1neoforge
Скачать
Что нового
### Fixed - Removed the dark outer shadow from the Smart Card textures so dyed cards render cleaner in hand and in readers.
beta

0.4.0 - Card Runtime Entropy

0.4.0
7 июл. 2026 г.13Minecraft: 1.21.1neoforge
Скачать
Что нового
### Added - Added `cc_smartcard.randomBytes(n)` for secure random bytes inside issued Smart Card programs. - Added README documentation for the card runtime entropy API and the computer-side `smartcard` helper module.
beta

0.3.1 - Serial Card Commands

0.3.1
7 июл. 2026 г.12Minecraft: 1.21.1neoforge
Скачать
Что нового
### Fixed - Fixed Smart Card Reader command scheduling so calls for the same Smart Card ID execute serially. - Fixed queued Smart Card calls so detach and reader removal cancellation complete cleanly while calls for different cards can still run in parallel.
beta

0.3.0 - Multi-Colour Smart Cards

0.3.0
6 июл. 2026 г.8Minecraft: 1.21.1neoforge
Скачать
Что нового
### Added - Added dyeable Smart Cards using Minecraft's `dyed_color` data component. - Added optional dye ingredients to the Smart Card crafting recipe. - Added CC: Tweaked dyeing and Wet Sponge colour-clearing support for existing Smart Cards. - Added dyed Smart Card variants to the creative tab. - Added dynamic Smart Card Reader rendering so inserted cards show their dyed colour on the reader. ### Changed - Smart Card item rendering now uses separate tinted card-body and non-tinted gold-chip layers.
beta

0.2.0 - Fingerprint Scanner

0.2.0
6 июл. 2026 г.6Minecraft: 1.21.1neoforge
Скачать
Что нового
### Added - Added the Fingerprint Scanner block and CC: Tweaked `fingerprint_scanner` peripheral. - Added `scan()` support for waiting on an in-world player scan and returning the scanned player's UUID and name. - Added the Fingerprint Scanner crafting recipe, item model, block models, textures, and creative tab entry. - Added README documentation for Smart Card Reader events. - Added a game-test HTTP smoke check against `example.com` for card programs. ### Fixed - Fixed a CardLuaRuntime cancellation race that could leave cancelled card calls in an inconsistent state.
beta

CC SmartCard 0.1.0

0.1.0
6 июл. 2026 г.19Minecraft: 1.21.1neoforge
Скачать
Что нового
CC SmartCard 0.1.0 is the initial release for Minecraft 1.21.1, NeoForge 21.1.235, and CC: Tweaked 1.120.0. ### Added - Smart Card item. - Smart Card Reader block and CC: Tweaked peripheral. - One-time issuing with `issueSource(source)` and `issueFiles(files)`. - Card command calls with `reader.call(command, args)`. - Card program entrypoint at `/main.lua` with `handle(command, args, context)`. - World-backed private card storage. - Public card IDs and labels. - HTTP API support for card programs, following the server's CC: Tweaked HTTP settings. - Crafting recipes for the Smart Card and Smart Card Reader. - `smartcard` ROM helper for issuing from local files or directories. ### Known limitations - Card contents are hidden from normal reader API access, but this is gameplay privacy rather than formal cryptographic security. - Issued cards cannot be erased or reissued through the reader API. - Card commands are non-transactional; file writes made before an error may remain. - The card runtime depends on CC: Tweaked internals and may need maintenance for future CC: Tweaked versions.