|
Empeld
Empeld plugin documentation.
|
A subset of blocks within a world, that creates an existing entity Able to save and load from disk, clone pieces of the world, etc More...
Public Member Functions | |
| Prefab (int width, int length, int height, Vector3i center) | |
| Creates a new instance of a prefab with the given width, length, and height More... | |
| Prefab (int width, int length, int height) | |
| Creates a new prefab More... | |
| Prefab (Size3i size, Vector3i center) | |
| Creates a new prefab More... | |
| Prefab (Size3i size) | |
| Creates a new prefab More... | |
| void | Save (Stream stream) |
| Save prefab data to a stream (eg file) More... | |
| void | Clear (ushort id) |
| Clear the prefab space with a specific block id More... | |
| void | Clear () |
| Clear the prefab space with empty block (id 0) More... | |
| void | Merge (IReadonlyPrefab src, Vector3i pos) |
| Merge one prefab into self More... | |
Public Member Functions inherited from essentials.Prefabs.IReadonlyPrefab | |
| bool | InBounds (int x, int y, int z) |
| Returns whether or not a point is within the bounds of the prefab More... | |
| bool | InBounds (Vector3i pt) |
| Returns whether or not a point is within the bounds of the prefab More... | |
Static Public Member Functions | |
| static Prefab | Load (Stream stream) |
| Load prefab data from a data stream More... | |
Properties | |
| int | Width [get] |
| Gets the width of the prefab More... | |
| int | Length [get] |
| Gets the lenght of the prefab More... | |
| int | Height [get] |
| Gets the height of the prefab More... | |
| Size3i | Size [get] |
| Gets the size of the prefab (width, length, height) More... | |
| Vector3i | Center [get] |
| Gets the relative center coordinate of the prefab (Not world coord) More... | |
Properties inherited from essentials.Prefabs.IReadonlyPrefab | |
| int | Width [get] |
| The width of the prefab More... | |
| int | Length [get] |
| The length of the prefab More... | |
| int | Height [get] |
| The height of the prefab More... | |
| Size3i | Size [get] |
| The size of the prefab (width, length, height) More... | |
| Vector3i | Center [get] |
| The relative center coordinate of the prefab More... | |
A subset of blocks within a world, that creates an existing entity Able to save and load from disk, clone pieces of the world, etc
Exists in in its own space (Like a 3D Bitmap)
| essentials.Prefabs.Prefab.Prefab | ( | int | width, |
| int | length, | ||
| int | height, | ||
| Vector3i | center | ||
| ) |
Creates a new instance of a prefab with the given width, length, and height
| width | Width. |
| length | Length. |
| height | Height. |
| center | Center. |
Attribute: width*length*height
;
| essentials.Prefabs.Prefab.Prefab | ( | int | width, |
| int | length, | ||
| int | height | ||
| ) |
Creates a new prefab
| width | Width. |
| length | Length. |
| height | Height. |
Creates a new prefab
| size | Size. |
| center | Center. |
| essentials.Prefabs.Prefab.Prefab | ( | Size3i | size | ) |
Creates a new prefab
| size | Size. |
| void essentials.Prefabs.Prefab.Clear | ( | ushort | id | ) |
| void essentials.Prefabs.Prefab.Clear | ( | ) |
Clear the prefab space with empty block (id 0)
|
static |
Load prefab data from a data stream
| stream | Stream. |
Attribute: i
= reader.ReadUInt16();
Attribute: pos
= data;
| void essentials.Prefabs.Prefab.Merge | ( | IReadonlyPrefab | src, |
| Vector3i | pos | ||
| ) |
Merge one prefab into self
| src | Source. |
| pos | Position. |
Attribute: myPos] = src[x,y,z
;
| void essentials.Prefabs.Prefab.Save | ( | Stream | stream | ) |
Save prefab data to a stream (eg file)
| stream | Stream. |
Attribute: i
);
|
get |
Gets the relative center coordinate of the prefab (Not world coord)
The center.
|
get |
Gets the height of the prefab
The height.
|
get |
Gets the lenght of the prefab
The length.
|
get |
Gets the size of the prefab (width, length, height)
The size.
|
get |
Gets the width of the prefab
The width.