-
Notifications
You must be signed in to change notification settings - Fork 5
Extents
Extents are exactly what it says on the lid: a certain extent of the world. Extents can be defined in many shapes and forms. The power of Extents ranges from creating spawn points to control points (TF2 Style!) to just a simple boundary players can't leave
On their own, Extents are useless, they must be used in conjunction with other Modules that accept Extents. An example of such a module would be the Boundaries Module.
Extents can be defined using the Extents module. The following is how the Extents module can be defined:
modules:
- Extents: # Module called Extents
- block: 10,20,30 # Block Extent type
- cylinder: # Cylinder Extent type
base: 40,50,60
radius: 50
The AutoCircle Extent creates an Extent of 3D points on a circle's edge, at the circle's base y
.
auto-circle:
base: 40, 50, 60
radius: 50
points: 10
# offset-angle: 0 # Optional. Defaults to 0.
Property | Description |
---|---|
base | Base point of circle |
radius | Radius of circle |
points | How many points to generate for extent |
offset-angle | Offset angle rotation for points in degrees |
The Block Extent allows for the definition of an Extent which spans over only one single Minecraft Block. The Extent actually spans from the rounded down coordinates up to the rounded up coordinates exclusively, effectively the whole block. Block takes a value of a String (or a single-entry Map with String value). The String defines the three components that represent the coordinates of the block in the form of X,Y,Z.
Simple String representation of a Vector (3D coordinates).
block: 12, 34, 56
Alternatively, a Map with property base
and value 12, 34, 56
, produces the same behaviour.
block:
base: 12, 34, 56
Property | Description |
---|---|
base | Block coordinates |
The Cuboid Extent allows for the definition of an Extent which spans over a cuboid region. A cuboid region consist of two Vectors (or points) which can form a cube, square, or rectangle shape. The Cuboid takes a value of a Map, where there are two Vector entries, point1 and point2. The Vectors are represented as a String.
cuboid:
# first corner is at x: 1, y: 2, and z: 3
point1: 1, 2, 3
# second corner is at x: 4, y: 5, and z: 6
point2: 4, 5, 6
Property | Description |
---|---|
point1 | First point of cuboid |
point2 | Second point of cuboid |
Note: Order of point1 and point2 do not matter.
The Cylinder Extent is a 3D circle, like a tube, which despite going against the blocks-only rule, does make for a great addition (you'll see as you progress). A Cylinder consists of three components. The base vector, which is where the center of the cylinder is relative to the world, the radius
, and the height
of the cylinder.
# Cylinder with radius 50, height 1, with the centre at 40, 50, 60.
cylinder:
base: 40, 50, 60
radius: 50
# height: 1.0 # Optional. Defaults to 1.0
Property | Description |
---|---|
base | Base point of circle |
radius | Radius of circle |
height | Cylinder height |
The Union Extent unites multiple Extents to be represented as a singular Extent. This is very useful for grouping extents and passing it to a module to apply an effect in multiple areas.
# Union Extent of Block `1, 2, 3`, and a cuboid extent from `4, 5, 6` to `7, 8, 9`.
union:
- block: 1,2,3
- cuboid:
point1: 4, 5, 6
point2: 7, 8, 9
Union only accepts a list of extents; definitions or references.