Mana Manipulator
The Mana Manipulator allows the impossible; numbers in Botania! More specifically it acts as both a mana pool and mana spreader that can be controlled be a computer. The max capacity is 10% of a normal mana pool. It contains an internal inventory that can store lenses which can be equipped from Lua code. Like a normal spreader, the direction can also be set with a Wand of the Forest. Sparks can be used in a similar fashion to their use on a normal mana pool.
Functions
Function | Returns | Description |
---|---|---|
getMana([boolean get_real_value]) | number mana_level | An evil function. Returns a random value by default |
sendBurst() | boolean status | Attempts to send a burst from the mana spreader. The burst will fail if the normal conditions for a spreader burst (e.g. lens allows it, there is a pool that can contain the burst) are not met. |
setBurstDirection(number rotation_x, number rotation_y) | nil | Sets the rotation of the spreader burst |
getBurstDirection() | table direction | Gets the burst direction as a table with keys x and y |
setAutoBurst(boolean auto_burst) | nil | Sets the spreader to operate as a normal spreader, checking for and sending bursts automatically, or disabling the automatic burst. |
getAutoBurst() | boolean auto_burst | Get the status of the auto bust functionality |
setVoidExcessMana(boolean void_excess) | nil | Set if an unlimited amount of mana can be accepted, but the excess voided if it is over the max storage limit |
getVoidExcessMana() | boolean void_excess | Get the current status of voiding excess mana |
setColor(number r, number g, number b) | nil | Set the color of the bursts. Some lenses like the celebratory lens will respect this color, other will ignore it for their own embedded color. |
getColor( | table color | Returns the current beam color as a table with keys r, g, and b |
setLens(string item_name, number meta) | nil | Attempts to set a lens from the internal inventory matching the provided description. The first item matched is set. If the lens cannot be found the function will error. |
setLens(number slot) | nil | Attempts to set the lens to the item stored in the specified slot. If the slot is empty, the function will error. |
getLens() | table lens | Returns the current lens as a table with the following keys: id, meta, name, slot, nbt |
getContainedLensesLua() | table lenses | Returns all contained lenses in a table. The format of each lens is the same as getLens(). The table index is not guaranteed to correcspond to the slot in which it resides. |