Sable on ModrinthRequest
Inbox
…
  • All
  • Vehicles
  • Physics
  • Compatibility
  • Extension
  • Tools
  • Combat
  • Building

© 2026 Sable Addons. Not affiliated with Mojang or Microsoft.

All addonsSable on Modrinth
← All addons

CC: Optical

All you need for your turrets!

Download v1.1.0
  • Physics
  • Vehicles

Sable listing

  • The latest release can run without Sable. Sable is optional.
Banner

Banner

CC:Optical

Adds sensor and cannon control peripherals to CC:Tweaked, compatible with Create:Aeronautics.

All blocks

Sensors

Four variants with dynamic FOV zoom, target filtering, and scanning methods:

Optical Sensor (optical_sensor) — omni-directional by default (360° FOV) with a base range of 96 blocks. Supports narrowing FOV down to 15° for increased zoom range (up to 192 blocks). Requires direct line of sight (real terrain blocks only; sublevel terrain is transparent).

Directional Optical Sensor (directional_optical_sensor) — directional cone field of view (default 125°, adjustable down to 10°), base range 90 blocks at full FOV, zooming up to 512 blocks at minimum FOV.

Long Range Optical Sensor (long_range_optical_sensor) — directional cone field of view (default 125°, adjustable down to 10°), base range 96 blocks at full FOV, zooming up to 900 blocks at minimum FOV.

Radar (entity_radar) — omni-directional, base range 64 blocks, ignores line of sight. Placing adjacent Radar Booster (radar_booster) blocks adds +224 blocks per booster (up to 2 boosters for 512 blocks total). Adding a 2-block antenna (lightning rods or iron bars) on top of the radar or on any of its boosters multiplies the booster effect, boosting the radar range up to ~900 blocks. Position readings have Gaussian noise (increases with distance, varies by sensor altitude relative to sea level).

Detections work across sublevel boundaries. A sensor on an airship can spot another airship and the entities inside it. Each detection carries the sublevel UUID when the target is inside one. Decorative non-entities (paintings, item frames, displays, markers) are automatically ignored.

Detection fidelity decreases with range, but recognition distances scale dynamically with FOV zoom and booster upgrades. Beyond precision limits, targets are classified only by size (object_small/object_mid/object_large). Radar position noise grows linearly with distance and varies with the sensor's altitude relative to sea level.

Range & Recognition Scaling

Sensor / ConfigurationFOV / AddonsMax RangeExact Type (type)Player Name (name)
Optical Sensor360° (Omni)96 m≤ 56 m≤ 40 m
Optical Sensor15° (Zoom)192 m≤ 112 m≤ 80 m
Directional Optical125° (Full FOV)90 m≤ 56 m≤ 40 m
Directional Optical10° (Max Zoom)512 m≤ 318 m≤ 227 m
Long Range Optical125° (Full FOV)96 m≤ 56 m≤ 40 m
Long Range Optical10° (Max Zoom)900 m≤ 525 m≤ 375 m
RadarBase (0 Boosters)64 m≤ 28 m≤ 18 m
Radar1 Booster288 m≤ 126 m≤ 81 m
Radar2 Boosters (Full Boost)512 m≤ 224 m≤ 144 m
Radar1 Booster + Antenna482 m≤ 211 m≤ 135 m
Radar2 Boosters + Antenna900 m≤ 394 m≤ 253 m

Lua API

Sensor methods available in CC:Tweaked:

MethodParametersReturnsDescription
scanrelativeCoords: boolean (optional)tableRun an immediate scan. If true, returned positions are rotated into the sensor's sublevel local frame.
setFovfov: numbernumberSets optical field of view in degrees (clamped to [minFov, maxFov]). Narrower FOV increases effective range. Optical only.
getFov—numberReturns current field of view in degrees.
getMinFov—numberReturns minimum allowed field of view in degrees.
getMaxFov—numberReturns maximum allowed field of view in degrees.
getRange—numberReturns current effective detection range in blocks (scales dynamically with FOV).
setFiltertypeOrList: string|table (optional)string[]Sets active target filter (by exact ID, short name, "sublevel", or size class "object_small"/"object_mid"/"object_large"). Unmatched entities do not count towards target limits. Pass nil to clear.
getFilter—string[]Returns array of currently active target filters.
clearFilter—booleanClears all active filters.
isOptical—booleanReturns true if this is an optical sensor supporting FOV/zoom/filtering, false for radar.

scan() return table

FieldTypeDescription
countnumberNumber of detections
lastScanTicknumberServer tick when scan ran
relativeCoordsbooleanWhether relative coordinates were used
detectionstable[]Array of detection objects

Detection fields

FieldTypeDescription
idstringEntity UUID (or sublevel UUID for sublevel bounding boxes)
typestringEntity registry name (e.g. "minecraft:zombie"), size class ("object_small"/"object_mid"/"object_large"), or "sublevel"
namestring or nilPlayer scoreboard name (if within name-precision distance)
x, y, znumberOffset from sensor origin (blocks)
distancenumberStraight-line distance
subLevelUUIDstring or nilUUID of the sublevel the entity is inside
subLevelNamestring or nilName of the sublevel

Example

local sensor = peripheral.wrap("left")

-- Narrow FOV to boost range and focus only on sublevels
if sensor.isOptical() then
  sensor.setFov(15)
  sensor.setFilter("sublevel")
end

while true do
  local res = sensor.scan(true)
  print("Targets: " .. res.count)
  for _, t in ipairs(res.detections) do
    print(("%s @ %.1f m (x=%.1f, y=%.1f, z=%.1f)"):format(t.type, t.distance, t.x, t.y, t.z))
  end
  sleep(0.25)
end

CBC Cannon Mount

Wraps cannon mounts from Create Big Cannons as cbc_cannon_mount peripherals (additional type cannon_mount). Aim, fire, and query state from Lua.

MethodParametersReturnsDescription
assemble—booleanAssembles the cannon contraption
disassemble—booleanDisassembles
fire—booleanFires the cannon
isRunning—booleanWhether assembled and running
isAssembled—booleanSame as isRunning
isLoaded—booleanWhether cannon can fire
setPitchpitch: numberbooleanSet target pitch (degrees)
setYawyaw: numberbooleanSet target yaw (degrees)
getPitch—numberCurrent pitch
getYaw—numberCurrent yaw offset
getX—number or nilController X position
getY—number or nilController Y position
getZ—number or nilController Z position
getMaxDepress—number or nilMaximum depression angle
getMaxElevate—number or nilMaximum elevation angle
getDirection—string or nilFacing direction (north/south/east/west)
getCannonWeight—number or nilCannon stress-weight

Rotation can be restricted by config (cbcFreeRotationEnabled, cbcFreeRotationMaxWeight). Throws LuaException when blocked.

Fully compatible with CannonMountPeripheral from VS: Addition - same "cannon_mount" additional type, same method shapes.

For Server Owners

All features are configurable. Disable the CBC cannon mount peripheral (cbcPeripheralEnabled: false) to avoid conflicts with other mods that add the same peripheral (CC:CBC as example).

If you would like to translate the mod, have found a bug, or want to suggest something new:

Discord: Cyber_Jellyfish

Downloads
2.5k
Followers
9
Version
v1.1.0
Updated
3d ago
Created
3mo ago
Loaders
neoforge
Game versions
1.21.1
License
Creative Commons Zero v1.0 Universal
Modrinth