Skip to content
LemADEC edited this page Jan 23, 2017 · 10 revisions

Properties

For sake of simplicity, we won't go in details of the below methods used to get or set machines properties.

  • When no argument is passed, the method returns the current value.
  • When a valid argument is passed, the property is changed and the new value is returned. The returned value takes into account any rounding or truncation that was applied to it. For example, if you pass a floating value but the property is integral, the return value will differ from the argument.
  • When an invalid argument is passed, the property remains unchanged and it's current value is returned. No error will be reported.

In most cases, changing a property will not affect an ongoing operation.

enable/active

Type: boolean Default value: false

Get/set the enabled state of the machine.

offset

Type: Number
Default value: 1
Range: 1 to 255

Get/set a new offset from where to start mining.

This will not affect the current mining layer.

radius

Type: Number, Number
Default value: 3, 3
Range: 3 to 16, 3 to 16

Get/set an working radius for the machine. Passing a single number will assume a square shape.

xRadius, zRadius = farm.radius(newRadiusX, newRadiusZ)

xRadius, zRadius = farm.radius(newRadius)

This will affect any ongoing activity, use at your own risk!

tapTrees, breakLeaves and silktouch

Type: boolean

Get/set a Laser tree farm option.

This will affect an ongoing activity, use at your own risk!

tier

Type: Number
Range: 1 or 2

Get/set the current tier of the machine.
For a cloaking core, tier 1 is shadow mode, while tier 2 is full invisibility mode.

This will affect an ongoing activity, use at your own risk!

mode

Type: String
Range: 'up', 'down' or 'redstone'

Sets the current lift direction mode. In redstone mode, an active signal means 'down'.

videoChannel

Type: Number Range: -2^31 to 2^31-1

Set the video channel used to link blocks together. Keep it secret or your enemy may spy on your network!

dim_positive, dim_negative

Type: 3 Numbers Range: 0 to 1024

Set the ship dimensions on each axis. Ship core counts as 0, first block out as 1. Ship controller is front. dim_positive sets Front, Right, Up dimensions. dim_negative sets Back, Left, Down dimensions.

mode (ship controller)

Type: Number Range: 0 to 6

Set the current mode for the ship core. You'll need to call 'jump' to actually start anything. IDLE(0) is just that.
BASIC_JUMP(1) allows precise directional jumps (moving x blocks on Front/Right/Up axis).
LONG_JUMP(2) is deprecated since 1.3.19. It was used to de-multiply your jump distance in hyperspace. You can now use mode 1 for more precise positioning in hyperspace.
-reserved-(3) is deprecated. It was a prototype idea, don't use it.
BEACON_JUMP(4) enables jumping to a specific beacon. A beacon is the ship core with a player standing on top of it.
HYPERSPACE(5) controls the warp field to transition in and out of hyperspace.
GATE_JUMP(6) uses a jumpgate to transition in and out of hyperspace.

distance, direction (ship controller)

Those properties are obsolete. They were used to move your ship in BASIC and LONG jump modes.

beaconFrequency

Type: String Range: (no specific constrains)

Name of the beacon for this ship core if another ship tries to reach it in BEACON mode.

coreFrequency

Type: String Range: (no specific constrains)

Name of this ship as reported in logs and to other players.

targetJumpgate

Type: String Range: (any valid jumpgate name)

Name of the jumpgate to reach.

movement

Type: 3 Numbers Range: -2^31 to 2^31-1

Movement along Front, Up, and Right axis. 0 means no movement on that axis. Negative means you're going backward.

rotationSteps

Type: Number Range: 0 to 3

Number of 90 deg rotations to the right of the ship. 0 means no rotation.

Clone this wiki locally