Represents a blueprint in the inventory. When placed it becomes a block group.
More...
|
void | Dispose () |
|
Block[] | PlaceBlocks (float3 position, float3 rotation) |
| Places the blocks the blueprint contains at the specified position and rotation. More...
|
|
void | Refresh () |
| Updates the properties based on the blueprint data. Only necessary if the blueprint is changed from the game. More...
|
|
void | StoreBlocks (Block[] blocks, float3 position, float3 rotation) |
| Set the blocks that the blueprint contains. Use the BlockGroup overload for automatically calculated position and rotation. More...
|
|
void | StoreBlocks (BlockGroup group) |
| Store the blocks from the given group in the blueprint with correct position and rotation for the blueprint. More...
|
|
override string | ToString () |
|
|
static Blueprint | Create () |
| Creates a new, empty blueprint. It will be deleted on disposal unless the game holds a reference to it. More...
|
|
Represents a blueprint in the inventory. When placed it becomes a block group.
◆ Blueprint()
TechbloxModdingAPI.Blueprint.Blueprint |
( |
uint |
id | ) |
|
|
inlinepackage |
◆ Create()
static Blueprint TechbloxModdingAPI.Blueprint.Create |
( |
| ) |
|
|
inlinestatic |
Creates a new, empty blueprint. It will be deleted on disposal unless the game holds a reference to it.
- Returns
- A blueprint that doesn't have any blocks
◆ Dispose()
void TechbloxModdingAPI.Blueprint.Dispose |
( |
| ) |
|
|
inline |
◆ PlaceBlocks()
Block [] TechbloxModdingAPI.Blueprint.PlaceBlocks |
( |
float3 |
position, |
|
|
float3 |
rotation |
|
) |
| |
|
inline |
Places the blocks the blueprint contains at the specified position and rotation.
- Parameters
-
position | The position of the blueprint |
rotation | The rotation of the blueprint |
- Returns
- An array of the placed blocks
◆ Refresh()
void TechbloxModdingAPI.Blueprint.Refresh |
( |
| ) |
|
|
inline |
Updates the properties based on the blueprint data. Only necessary if the blueprint is changed from the game.
◆ StoreBlocks() [1/2]
void TechbloxModdingAPI.Blueprint.StoreBlocks |
( |
Block[] |
blocks, |
|
|
float3 |
position, |
|
|
float3 |
rotation |
|
) |
| |
|
inline |
Set the blocks that the blueprint contains. Use the BlockGroup overload for automatically calculated position and rotation.
- Parameters
-
blocks | The array of blocks to use |
position | The anchor (center) position of the blueprint |
rotation | The base rotation of the blueprint |
◆ StoreBlocks() [2/2]
void TechbloxModdingAPI.Blueprint.StoreBlocks |
( |
BlockGroup |
group | ) |
|
|
inline |
Store the blocks from the given group in the blueprint with correct position and rotation for the blueprint.
- Parameters
-
group | The block group to store |
◆ ToString()
override string TechbloxModdingAPI.Blueprint.ToString |
( |
| ) |
|
|
inline |
◆ BlockCount
uint TechbloxModdingAPI.Blueprint.BlockCount |
|
get |
The amount of blocks in the blueprint. Gan only be set using the StoreBlocks() method.
◆ Id
uint TechbloxModdingAPI.Blueprint.Id |
|
get |
◆ Position
float3 TechbloxModdingAPI.Blueprint.Position |
|
get |
The center of the blueprint. Can only be set using the StoreBlocks() method.
◆ Rotation
float3 TechbloxModdingAPI.Blueprint.Rotation |
|
get |
The rotation of the blueprint. Can only be set using the StoreBlocks() method.
The documentation for this class was generated from the following file: