Merge branch 'master' of github.com:MightyPirates/OpenComponents into MC1.7

This commit is contained in:
Florian Nücke 2014-07-17 13:37:52 +02:00
commit 8f71f5cc26
2 changed files with 11 additions and 5 deletions

View File

@ -3,7 +3,7 @@ This is an addon for OpenComputers, providing drivers for additional blocks to b
[Download](http://ci.cil.li/job/OpenComponents/)
--------
OpenComponents is generally in continuous development, in that support for more blocks is added. Any 'deeper' changes will not be made in the master branch, meaning it should generally be considered stable. Meaning you can simply get the [latest build from the Jenkins build server](http://ci.cil.li/job/OpenComponents/).
OpenComponents is generally in continuous development, in that support for more blocks is added. Any 'deeper' changes will not be made in the master branch, meaning it should generally be considered stable. Meaning you can simply get the [latest build from the Jenkins build server](http://ci.cil.li/job/OpenComponents-MC1.6.4/).
Contributing
------------

View File

@ -1,5 +1,6 @@
package li.cil.occ.mods.ic2;
import ic2.api.reactor.IC2Reactor;
import ic2.api.reactor.IReactor;
import li.cil.oc.api.driver.NamedBlock;
import li.cil.oc.api.network.Arguments;
@ -31,22 +32,27 @@ public final class DriverReactor extends DriverTileEntity implements NamedBlock
super(tileEntity, "reactor");
}
@Callback
@Callback(doc = "Get the reactor's heat.")
public Object[] getHeat(final Context context, final Arguments args) {
return new Object[]{tileEntity.getHeat()};
}
@Callback
@Callback(doc = "Get the reactor's maximum heat before exploding.")
public Object[] getMaxHeat(final Context context, final Arguments args) {
return new Object[]{tileEntity.getMaxHeat()};
}
@Callback
@Callback(doc = "Get the reactor's energy output. Not multiplied with the base EU/t value.")
public Object[] getReactorEnergyOutput(final Context context, final Arguments args) {
return new Object[]{tileEntity.getReactorEnergyOutput()};
}
@Callback
@Callback(doc = "Get the reactor's base EU/t value.")
public Object[] getReactorEUOutput(final Context context, final Arguments args) {
return new Object[]{IC2Reactor.getEUOutput()};
}
@Callback(doc = "Get whether the reactor is active and supposed to produce energy.")
public Object[] producesEnergy(final Context context, final Arguments args) {
return new Object[]{tileEntity.produceEnergy()};
}