mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Update TileEntityReactorZirnox.java
This commit is contained in:
parent
cf93a0be4a
commit
46adbf3273
@ -36,7 +36,14 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver {
|
import cpw.mods.fml.common.Optional;
|
||||||
|
import li.cil.oc.api.machine.Arguments;
|
||||||
|
import li.cil.oc.api.machine.Callback;
|
||||||
|
import li.cil.oc.api.machine.Context;
|
||||||
|
import li.cil.oc.api.network.SimpleComponent;
|
||||||
|
|
||||||
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
|
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver, SimpleComponent {
|
||||||
|
|
||||||
public int heat;
|
public int heat;
|
||||||
public static final int maxHeat = 100000;
|
public static final int maxHeat = 100000;
|
||||||
@ -498,4 +505,46 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
|||||||
this.markDirty();
|
this.markDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// do some opencomputer stuff
|
||||||
|
@Override
|
||||||
|
public String getComponentName() {
|
||||||
|
return "zirnox_reactor";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getTemp(Context context, Arguments args) { // or getHeat, whatever.
|
||||||
|
return new Object[] {heat};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getPressure(Context context, Arguments args) {
|
||||||
|
return new Object[] {pressure};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getWater(Context context, Arguments args) {
|
||||||
|
return new Object[] {water.getFill()};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getCarbonDioxide(Context context, Arguments args) {
|
||||||
|
return new Object[] {carbonDioxide.getFill()};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] isActive(Context context, Arguments args) {
|
||||||
|
return new Object[] {isOn};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] setActive(Context context, Arguments args) {
|
||||||
|
isOn = Boolean.parseBoolean(args.checkString(0));
|
||||||
|
return new Object[] {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user