ComputerCraft integration - xiewuzhiying/VS-Addition GitHub Wiki
Peripherals
CannonMountPeripheral
The peripheral of Create Big Cannons' cannon mount.
The peripheral type is cbc_cannon_mount
.
assemble
assemble() -> boolean
Assemble blocks into contraption.
Returns whether the cannon was successfully assembled.
disassemble
disassemble() -> boolean
Disassemble contraption into blocks.
Returns whether the cannon was successfully disassembled.
fire
fire()
Make the cannon contraption fire.
isRunning
isRunning() -> boolean
Returns whether the cannon is running(assembled).
getPitch
getPitch() -> number
Returns the cannon's pitch angle.
getYaw
getYaw() -> number
Returns the cannon's yaw angle.
getMaxDepress
getMaxDepress() -> number
Returns the cannon's max depression angle.
Tips: If you customize the depression angle with datapack (e.g. with cbcmf installed), it cannot return the actual maximum depression angle. Maybe it will be fixed in a future version.
getMaxElevate
getMaxElevate() -> number
Returns the cannon's max elevation angle.
Tips: If you customize the elevation angle with datapack (e.g. with cbcmf installed), it cannot return the actual maximum elevation angle. Maybe it will be fixed in a future version.
CheatCannonMountPperipheral
Most of them are the same as the CannonMountPeripheral, but there are two more cheating functions.
You can enable this in config file.
setPitch
setPitch(number angle)
Set the cannon's pitch angle.
setYaw
setYaw(number angle)
Set the cannon's yaw angle.
FlapBearingPeripheral
The peripheral of ValkyrienSkies Clockwork's flap bearing.
The peripheral type is clockwork_flap_bearing
.
assemble
assemble() -> boolean
Assemble blocks into contraption.
Returns whether the flap bearing was successfully assembled.
disassemble
disassemble() -> boolean
Disassemble contraption into blocks.
Returns whether the flap bearing was successfully disassembled.
CheatFlapBearingPeripheral
Most of them are the same as the FlapBearingPeripheral, but there is a cheating functions.
You can enable this in config file.
setAngle
setAngle(number angle)
Set the flap bearing's angle.
ShipHelmPeripheral
The peripheral of ValkyrienSkies Eureka's ship helm.
The peripheral type is eureka_ship_helm
.
assemble
assemble()
Assemble the blocks into a ship.
disassemble
disassemble()
Disassemble the ship into blocks.
align
align()
Align the ship.
move
move(number x, number y, number z)
Use the ship helm to move the ship.
local ship_helm = peripheral.find("eureka_ship_helm")
ship_helm.move(0, 0, 1) -- forward
ship_helm.move(0, 0, -1) -- back
ship_helm.move(1, 0, 0) -- turn left
ship_helm.move(-1, 0, 0) -- turn right
ship_helm.move(0, 1, 0) -- up
ship_helm.move(0, -1, 0) -- down
ship_helm.move(0, 0, 0) -- stop
ship_helm.move(1, -1, 1) -- You can use all of them.(like this is turn left, down, and forward)
getBalloonAmount
getBalloonAmount() -> number
Returns the number of (eureka) balloons on the ship.
getAnchorAmount
getAnchorAmount() -> number
Returns the number of (eureka) anchors on the ship.
getActiveAnchorAmount
getActiveAnchorAmount() -> number
Returns the number of active (eureka) anchors on the ship.
areAnchorsActive
areAnchorsActive() -> boolean
Returns getActiveAnchorAmount() > 0
.
getShipHelmAmount
getShipHelmAmount() -> number
Returns the number of (eureka) ship helms on the ship.