mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Large update to direct calls and limits for pulling values.
This commit is contained in:
parent
2f2f389e90
commit
4451e80db9
@ -156,19 +156,19 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
|
||||
return "ntm_fluid_gauge";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTransfer(Context context, Arguments args) {
|
||||
return new Object[] {deltaTick, deltaSecond};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFluid(Context context, Arguments args) {
|
||||
return new Object[] {getType().getName()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {deltaTick, deltaSecond, getType().getName(), xCoord, yCoord, zCoord};
|
||||
|
||||
@ -274,44 +274,44 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
||||
return "dfc_emitter";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEnergyInfo(Context context, Arguments args) {
|
||||
return new Object[] {getPower(), getMaxPower()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCryogel(Context context, Arguments args) {
|
||||
return new Object[] {tank.getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInput(Context context, Arguments args) {
|
||||
return new Object[] {watts};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {getPower(), getMaxPower(), tank.getFill(), watts, isOn};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 2)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] isActive(Context context, Arguments args) {
|
||||
return new Object[] {isOn};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 2)
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setActive(Context context, Arguments args) {
|
||||
isOn = args.checkBoolean(0);
|
||||
return new Object[] {};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 2)
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setInput(Context context, Arguments args) {
|
||||
int newOutput = args.checkInteger(0);
|
||||
|
||||
@ -199,19 +199,19 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
||||
return "dfc_injector";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 2)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFuel(Context context, Arguments args) {
|
||||
return new Object[] {tanks[0].getFill(), tanks[1].getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 2)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTypes(Context context, Arguments args) {
|
||||
return new Object[] {tanks[0].getTankType().getName(), tanks[1].getTankType().getName()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {tanks[0].getFill(), tanks[0].getTankType().getName(), tanks[1].getFill(), tanks[1].getTankType().getName()};
|
||||
|
||||
@ -191,19 +191,19 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
||||
return "dfc_receiver";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEnergyInfo(Context context, Arguments args) {
|
||||
return new Object[] {joules, getPower()}; //literally only doing this for the consistency between components
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCryogel(Context context, Arguments args) {
|
||||
return new Object[] {tank.getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {joules, getPower(), tank.getFill()};
|
||||
|
||||
@ -172,19 +172,19 @@ public class TileEntityCoreStabilizer extends TileEntityMachineBase implements I
|
||||
return "dfc_stabilizer";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEnergyInfo(Context context, Arguments args) {
|
||||
return new Object[] {getPower(), getMaxPower()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInput(Context context, Arguments args) {
|
||||
return new Object[] {watts};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getDurability(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.ams_lens && ItemLens.getLensDamage(slots[0]) < ((ItemLens)ModItems.ams_lens).maxDamage) {
|
||||
@ -193,7 +193,7 @@ public class TileEntityCoreStabilizer extends TileEntityMachineBase implements I
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
Object lens_damage_buf;
|
||||
@ -205,7 +205,7 @@ public class TileEntityCoreStabilizer extends TileEntityMachineBase implements I
|
||||
return new Object[] {power, maxPower, watts, lens_damage_buf};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 2)
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setInput(Context context, Arguments args) {
|
||||
int newOutput = args.checkInteger(0);
|
||||
|
||||
@ -68,7 +68,7 @@ public class TileEntityGeiger extends TileEntity implements SimpleComponent {
|
||||
return "ntm_geiger";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getRads(Context context, Arguments args) {
|
||||
return new Object[] {check()};
|
||||
|
||||
@ -289,19 +289,19 @@ public class TileEntityMachineRadar extends TileEntityTickingBase implements IEn
|
||||
return "ntm_radar";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEnergyInfo(Context context, Arguments args) {
|
||||
return new Object[] {getPower(), getMaxPower()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] isJammed(Context context, Arguments args) {
|
||||
return new Object[] {jammed};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEntities(Context context, Arguments args) { //fuck fuck fuck
|
||||
if(!jammed) {
|
||||
|
||||
@ -256,19 +256,19 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I
|
||||
return "reactor_control";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] isLinked(Context context, Arguments args) {
|
||||
return new Object[] {isLinked};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getReactor(Context context, Arguments args) {
|
||||
return new Object[] {getDisplayData()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setParams(Context context, Arguments args) { //i hate my life
|
||||
int newFunction = args.checkInteger(0);
|
||||
@ -284,7 +284,7 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I
|
||||
return new Object[] {};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getParams(Context context, Arguments args) {
|
||||
return new Object[] {function.ordinal(), heatUpper, heatLower, levelUpper, levelLower};
|
||||
|
||||
@ -392,37 +392,37 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements
|
||||
return "research_reactor";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTemp(Context context, Arguments args) { // or getHeat, whatever.
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getLevel(Context context, Arguments args) {
|
||||
return new Object[] {level * 100};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTargetLevel(Context context, Arguments args) {
|
||||
return new Object[] {targetLevel};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFlux(Context context, Arguments args) {
|
||||
return new Object[] {totalFlux};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, level, targetLevel, totalFlux};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setLevel(Context context, Arguments args) {
|
||||
double newLevel = args.checkDouble(0)/100.0;
|
||||
|
||||
@ -545,49 +545,49 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
return "zirnox_reactor";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTemp(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getPressure(Context context, Arguments args) {
|
||||
return new Object[] {pressure};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getWater(Context context, Arguments args) {
|
||||
return new Object[] {water.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteam(Context context, Arguments args) {
|
||||
return new Object[] {steam.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCarbonDioxide(Context context, Arguments args) {
|
||||
return new Object[] {carbonDioxide.getFill()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] isActive(Context context, Arguments args) {
|
||||
return new Object[] {isOn};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, pressure, water.getFill(), steam.getFill(), carbonDioxide.getFill(), isOn};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setActive(Context context, Arguments args) {
|
||||
isOn = args.checkBoolean(0);
|
||||
|
||||
@ -378,7 +378,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
return new Object[] {"Crane not found"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getDepletion(Context context, Arguments args) {
|
||||
if(loadedItem != null && loadedItem.getItem() instanceof ItemRBMKRod) {
|
||||
@ -387,7 +387,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getXenonPoison(Context context, Arguments args) {
|
||||
if(loadedItem != null && loadedItem.getItem() instanceof ItemRBMKRod) {
|
||||
|
||||
@ -332,76 +332,60 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
||||
public String getComponentName() {
|
||||
return "rbmk_boiler";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteam(Context context, Arguments args) {
|
||||
return new Object[] {steam.getFill()};
|
||||
}
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteamMax(Context context, Arguments args) {
|
||||
return new Object[] {steam.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getWater(Context context, Arguments args) {
|
||||
return new Object[] {feed.getFill()};
|
||||
}
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getWaterMax(Context context, Arguments args) {
|
||||
return new Object[] {feed.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
int type_1 = (int) CompatHandler.steamTypeToInt(steam.getTankType())[0];
|
||||
return new Object[] {heat, steam.getFill(), steam.getMaxFill(), feed.getFill(), feed.getMaxFill(), type_1, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSteamType(Context context, Arguments args) {
|
||||
return CompatHandler.steamTypeToInt(steam.getTankType());
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setSteamType(Context context, Arguments args) {
|
||||
int type = args.checkInteger(0);
|
||||
if(type > 3) {
|
||||
type = 3;
|
||||
} else if(type < 0) {
|
||||
type = 0;
|
||||
}
|
||||
if(type == 0) {
|
||||
steam.setTankType(Fluids.STEAM);
|
||||
return new Object[] {true};
|
||||
} else if(type == 1) {
|
||||
steam.setTankType(Fluids.HOTSTEAM);
|
||||
return new Object[] {true};
|
||||
} else if(type == 2) {
|
||||
steam.setTankType(Fluids.SUPERHOTSTEAM);
|
||||
return new Object[] {true};
|
||||
} else {
|
||||
steam.setTankType(Fluids.ULTRAHOTSTEAM);
|
||||
return new Object[] {true};
|
||||
}
|
||||
steam.setTankType(CompatHandler.intToSteamType(type));
|
||||
return new Object[] {true};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -9,6 +9,7 @@ import li.cil.oc.api.machine.Callback;
|
||||
import li.cil.oc.api.machine.Context;
|
||||
import li.cil.oc.api.network.SimpleComponent;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase implements SimpleComponent {
|
||||
@ -126,46 +127,41 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
|
||||
return "rbmk_control_rod";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getLevel(Context context, Arguments args) {
|
||||
return new Object[] {getMult() * 100};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getTargetLevel(Context context, Arguments args) {
|
||||
return new Object[] {targetLevel * 100};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, getMult() * 100, targetLevel * 100, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setLevel(Context context, Arguments args) {
|
||||
double newLevel = args.checkDouble(0)/100.0;
|
||||
if (newLevel > 1.0) {
|
||||
newLevel = 1.0;
|
||||
} else if (newLevel < 0.0) {
|
||||
newLevel = 0.0;
|
||||
}
|
||||
targetLevel = newLevel;
|
||||
targetLevel = MathHelper.clamp_double(newLevel, 0, 1);
|
||||
return new Object[] {};
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ public class TileEntityRBMKControlManual extends TileEntityRBMKControl implement
|
||||
return data;
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getColor(Context context, Arguments args) {
|
||||
return new Object[] {this.color};
|
||||
|
||||
@ -149,31 +149,31 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
|
||||
return "rbmk_cooler";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[]{heat};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCryo(Context context, Arguments args) {
|
||||
return new Object[]{tank.getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCryoMax(Context context, Arguments args) {
|
||||
return new Object[]{tank.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[]{heat, tank.getFill(), tank.getMaxFill(), xCoord, yCoord, zCoord};
|
||||
|
||||
@ -280,54 +280,54 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
return "rbmk_heater";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFill(Context context, Arguments args) {
|
||||
return new Object[] {feed.getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFillMax(Context context, Arguments args) {
|
||||
return new Object[] {feed.getMaxFill()};
|
||||
}
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getExport(Context context, Arguments args) {
|
||||
return new Object[] {steam.getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getExportMax(Context context, Arguments args) {
|
||||
return new Object[] {steam.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFillType(Context context, Arguments args) {
|
||||
return new Object[] {feed.getTankType().getName()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getExportType(Context context, Arguments args) {
|
||||
return new Object[] {steam.getTankType().getName()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {heat, feed.getFill(), feed.getMaxFill(), steam.getFill(), steam.getMaxFill(), feed.getTankType().getName(), steam.getTankType().getName(), xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
|
||||
@ -226,37 +226,37 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
return "rbmk_outgasser";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getGas(Context context, Arguments args) {
|
||||
return new Object[] {gas.getFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getGasMax(Context context, Arguments args) {
|
||||
return new Object[] {gas.getMaxFill()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getGasType(Context context, Arguments args) {
|
||||
return new Object[] {gas.getTankType().getID()};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getProgress(Context context, Arguments args) {
|
||||
return new Object[] {progress};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 8)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord};
|
||||
|
||||
@ -389,25 +389,25 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return "rbmk_fuel_rod";
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getHeat(Context context, Arguments args) {
|
||||
return new Object[] {heat};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFluxSlow(Context context, Arguments args) {
|
||||
return new Object[] {fluxSlow};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFluxFast(Context context, Arguments args) {
|
||||
return new Object[] {fluxFast};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getDepletion(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -416,7 +416,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getXenonPoison(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -425,7 +425,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoreHeat(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -434,7 +434,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getSkinHeat(Context context, Arguments args) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||
@ -443,7 +443,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {"N/A"};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
Object OC_enrich_buf;
|
||||
@ -464,13 +464,13 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
return new Object[] {heat, OC_hull_buf, OC_core_buf, fluxSlow, fluxFast, OC_enrich_buf, OC_poison_buf, ((RBMKRod)this.getBlockType()).moderated, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getModerated(Context context, Arguments args) {
|
||||
return new Object[] {((RBMKRod)this.getBlockType()).moderated};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 16)
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user