Make your reactor programmable
Reacram(REACtor + progRAM) is a programmable reactor.
Reacram can run the special program "Reactension"(REACram + exTENSION)
You can load reactension you like into your reacram freely.
For example, farming, mining, building and so on...
Reactension can be written in PHP. So you can make it easily.
- Drop it into your /plugins folder.
- Restart your server.
- Drop it into your /plugins/Reacram/reactension folder.
| Command | Parameter | Description |
|---|---|---|
| /reacram | None |
Show available command list |
| /reacram help | None |
Show help |
| /reacram list | None |
Show list of reactensions |
| /reacram name | <name> |
Name reactor <name> |
| /reacram load | <name> <reactension> |
Load <reactension> into <name> |
| /reacram link | <name> |
Link chest to <name> |
| /reacram run | <name> |
Run the program loaded into <name> |
| /reacram stop | <name> |
Stop the program loaded into <name> |
- Type
/reacram name <name> - Touch the reactor you want to name
<name> - Type
/reacram load <name> <reactension> - If you need to link chest to your Reacram, type
/reacram link <name>, then touch the chest you want to link to<name> - Type
/reacram run <name> - If you want to stop your Reacram, type
/reacram run <name>
For example, case "Mining" reactension
- /reacram name test
- Touch a reactor
- /reacram load test Mining
- /reacram link test
- Touch a chest
- /reacram run test
Reacram "test" collects block going down.
http://www.youtube.com/watch?v=73sOQiwQ40I
You can make a reactension in PHP.
The rule you must follow:
- Filename should be the same as the classname.
ex) classname: TestReactension => filename: TestReactension.php - Your reactension class must inherit from "Reactension" class.
- Your reactension class must implement two function: public function init() and public function run()
init() is the function which is called at the beginning. You mustn't implement __construct!
run() is the main function which is called when your reacram is executed. - Namespace on your class and Main.php should be the same.
<?php
namespace Reacram\Core;
class ReactensionName extends Reactension
{
public function init()
{
}
public function run()
{
}
}| Function | Description |
|---|---|
| $this->sendToChest(Item $item) | Send item to the chest linked to your Reacram |
| $this->move($x, $y, $z) | If you want to move your Reacram, use this |