mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
Updated some dependencies.
This commit is contained in:
parent
e1195ef8f0
commit
43a734e110
@ -5,14 +5,14 @@ oc.version=1.4.0
|
||||
oc.subversion=dev
|
||||
|
||||
ae2.version=rv1-stable-1
|
||||
bc.version=6.0.18
|
||||
bc.version=6.1.8
|
||||
cc.cf=2216/236
|
||||
cc.version=1.65
|
||||
ccl.version=1.1.1.104
|
||||
cofhlib.cf=2212/893
|
||||
cofhlib.version=[1.7.10]1.0.0B6-dev-26
|
||||
eio.cf=2216/699
|
||||
eio.version=1.7.10-2.1.2.237
|
||||
eio.cf=2219/296
|
||||
eio.version=1.7.10-2.2.1.276
|
||||
es.version=1.4.5.24
|
||||
fmp.version=1.1.0.308
|
||||
forestry.version=3.1.1.4
|
||||
@ -27,8 +27,8 @@ mfr.version=[1.7.10]2.8.0RC3-dev-591
|
||||
nei.version=1.0.3.57
|
||||
projred.build=51
|
||||
projred.version=4.5.1
|
||||
rc.cf=2215/652
|
||||
rc.version=1.7.10-9.3.3.0
|
||||
rc.cf=2219/321
|
||||
rc.version=1.7.10-9.4.0.0
|
||||
redlogic.version=59.0.3
|
||||
rotc.version=1
|
||||
tmech.version=75.0afb56c
|
||||
|
@ -0,0 +1,44 @@
|
||||
package li.cil.oc.integration.buildcraft;
|
||||
|
||||
import buildcraft.api.tiles.IControllable;
|
||||
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.ManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverTileEntity;
|
||||
import li.cil.oc.integration.ManagedTileEntityEnvironment;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public final class DriverControllable extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return IControllable.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z) {
|
||||
return new Environment((IControllable) world.getTileEntity(x, y, z));
|
||||
}
|
||||
|
||||
public static final class Environment extends ManagedTileEntityEnvironment<IControllable> {
|
||||
public Environment(final IControllable tileEntity) {
|
||||
super(tileEntity, "bc_controllable");
|
||||
}
|
||||
|
||||
@Callback(doc = "function():string -- Get the current control mode.")
|
||||
public Object[] getControlMode(final Context context, final Arguments args) {
|
||||
return new Object[]{tileEntity.getControlMode().name()};
|
||||
}
|
||||
|
||||
@Callback(doc = "function(mode:string):boolean -- Test whether the specified control mode is acceptable.")
|
||||
public Object[] acceptsControlMode(final Context context, final Arguments args) {
|
||||
return new Object[]{tileEntity.acceptsControlMode(IControllable.Mode.valueOf(args.checkString(0)))};
|
||||
}
|
||||
|
||||
@Callback(doc = "function(mode:string):boolean -- Sets the control mode to the specified value.")
|
||||
public Object[] setControlMode(final Context context, final Arguments args) {
|
||||
tileEntity.setControlMode(IControllable.Mode.valueOf(args.checkString(0)));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package li.cil.oc.integration.buildcraft;
|
||||
|
||||
|
||||
import buildcraft.core.IMachine;
|
||||
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.ManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverTileEntity;
|
||||
import li.cil.oc.integration.ManagedTileEntityEnvironment;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public final class DriverMachine extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return IMachine.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z) {
|
||||
return new Environment((IMachine) world.getTileEntity(x, y, z));
|
||||
}
|
||||
|
||||
public static final class Environment extends ManagedTileEntityEnvironment<IMachine> {
|
||||
public Environment(final IMachine tileEntity) {
|
||||
super(tileEntity, "machine");
|
||||
}
|
||||
|
||||
@Callback(doc = "function():boolean -- Returns whether the machine is active.")
|
||||
public Object[] isActive(final Context context, final Arguments args) {
|
||||
return new Object[]{tileEntity.isActive()};
|
||||
}
|
||||
|
||||
@Callback(doc = "function():boolean -- Returns whether the machine can manage fluids.")
|
||||
public Object[] manageFluids(final Context context, final Arguments args) {
|
||||
return new Object[]{tileEntity.manageFluids()};
|
||||
}
|
||||
|
||||
@Callback(doc = "function():boolean -- Returns whether the machine can manage solids.")
|
||||
public Object[] manageSolids(final Context context, final Arguments args) {
|
||||
return new Object[]{tileEntity.manageSolids()};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -12,7 +12,7 @@ import li.cil.oc.integration.ManagedTileEntityEnvironment;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public final class DriverPipeTE extends DriverTileEntity {
|
||||
public final class DriverPipeTile extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return IPipeTile.class;
|
||||
@ -41,7 +41,7 @@ public final class DriverPipeTE extends DriverTileEntity {
|
||||
@Callback(doc = "function():string -- Returns the type of the pipe.")
|
||||
public Object[] getPipeType(final Context context, final Arguments args) {
|
||||
try {
|
||||
return new Object[]{tileEntity.getPipeType().name().toLowerCase()};
|
||||
return new Object[]{tileEntity.getPipeType().name()};
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
return new Object[]{null, "none"};
|
||||
@ -59,7 +59,25 @@ public final class DriverPipeTE extends DriverTileEntity {
|
||||
@Callback(doc = "function(color:string):boolean -- Returns whether the pipe is wired with the given color.")
|
||||
public Object[] isWired(final Context context, final Arguments args) {
|
||||
try {
|
||||
return new Object[]{tileEntity.isWireActive(PipeWire.valueOf(args.checkString(0)))};
|
||||
return new Object[]{tileEntity.getPipe().isWired(PipeWire.valueOf(args.checkString(0)))};
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
return new Object[]{false};
|
||||
}
|
||||
|
||||
@Callback(doc = "function(color:string):boolean -- Returns whether the wired with the given color is active.")
|
||||
public Object[] isWireActive(final Context context, final Arguments args) {
|
||||
try {
|
||||
return new Object[]{tileEntity.getPipe().isWireActive(PipeWire.valueOf(args.checkString(0)))};
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
return new Object[]{false};
|
||||
}
|
||||
|
||||
@Callback(doc = "function(side:number):boolean -- Returns whether the pipe has a gate on the specified side.")
|
||||
public Object[] hasGate(final Context context, final Arguments args) {
|
||||
try {
|
||||
return new Object[]{tileEntity.getPipe().hasGate(ForgeDirection.getOrientation(args.checkInteger(0)))};
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
return new Object[]{false};
|
@ -8,7 +8,7 @@ object ModBuildCraft extends ModProxy {
|
||||
override def getMod = Mods.BuildCraft
|
||||
|
||||
override def initialize() {
|
||||
Driver.add(new DriverPipeTE)
|
||||
Driver.add(new DriverMachine)
|
||||
Driver.add(new DriverPipeTile)
|
||||
Driver.add(new DriverControllable)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user