mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
cleaned up after peripheral redesign
This commit is contained in:
parent
2636f02400
commit
0b3c9ddecd
@ -10,7 +10,6 @@ import li.cil.occ.mods.buildcraft.ModBuildCraft;
|
||||
import li.cil.occ.mods.computercraft.ModComputerCraft;
|
||||
import li.cil.occ.mods.enderstorage.ModEnderStorage;
|
||||
import li.cil.occ.mods.ic2.ModIndustrialCraft2;
|
||||
import li.cil.occ.mods.mekanism.ModMekanism;
|
||||
import li.cil.occ.mods.redstoneinmotion.ModRedstoneInMotion;
|
||||
import li.cil.occ.mods.thermalexpansion.ModThermalExpansion;
|
||||
import li.cil.occ.mods.vanilla.ModVanilla;
|
||||
@ -49,7 +48,6 @@ public class OpenComponents {
|
||||
Registry.add(new ModBuildCraft());
|
||||
Registry.add(new ModEnderStorage());
|
||||
Registry.add(new ModIndustrialCraft2());
|
||||
Registry.add(new ModMekanism());
|
||||
Registry.add(new ModRedstoneInMotion());
|
||||
Registry.add(new ModThermalExpansion());
|
||||
Registry.add(new ModVanilla());
|
||||
|
@ -12,7 +12,7 @@ import net.minecraft.world.World;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class DriverPeripheral extends DriverTileEntity {
|
||||
public final class DriverPeripheral extends DriverTileEntity {
|
||||
private static final Set<Class<?>> blacklist = new HashSet<Class<?>>();
|
||||
|
||||
static {
|
||||
|
@ -1,7 +1,5 @@
|
||||
package li.cil.occ.mods.ic2;
|
||||
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import li.cil.oc.api.network.Arguments;
|
||||
import li.cil.oc.api.network.Callback;
|
||||
import li.cil.oc.api.network.Context;
|
||||
@ -12,7 +10,7 @@ import li.cil.occ.util.Reflection;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DriverMassFab extends DriverTileEntity {
|
||||
public final class DriverMassFab extends DriverTileEntity {
|
||||
private static final Class<?> TileController = Reflection.getClass("ic2.core.block.machine.tileentity.TileEntityMatter");
|
||||
|
||||
@Override
|
||||
|
@ -17,13 +17,13 @@ public final class ModIndustrialCraft2 implements IMod {
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
Driver.add(new DriverReactor());
|
||||
Driver.add(new DriverReactorChamber());
|
||||
Driver.add(new DriverEnergyConductor());
|
||||
Driver.add(new DriverEnergySink());
|
||||
Driver.add(new DriverEnergySource());
|
||||
Driver.add(new DriverMassFab());
|
||||
Driver.add(new DriverEnergyStorage());
|
||||
Driver.add(new DriverMassFab());
|
||||
Driver.add(new DriverReactor());
|
||||
Driver.add(new DriverReactorChamber());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverBasicMachine extends DriverPeripheral {
|
||||
private static final Class<?> TileEntityBasicMachine = Reflection.getClass("mekanism.common.tileentity.TileEntityBasicMachine");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileEntityBasicMachine;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverDigitalMiner extends DriverPeripheral {
|
||||
private static final Class<?> TileEntityDigitalMiner = Reflection.getClass("mekanism.common.tileentity.TileEntityDigitalMiner");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileEntityDigitalMiner;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverElectrolyticSeperator extends DriverPeripheral {
|
||||
private static final Class<?> TileEntityElectrolyticSeparator = Reflection.getClass("mekanism.generators.common.tileentity.TileEntityElectrolyticSeparator");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileEntityElectrolyticSeparator;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverEnergyCube extends DriverPeripheral {
|
||||
private static final Class<?> TileentityEnergyCube = Reflection.getClass("mekanism.common.tileentity.TileEntityEnergyCube");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileentityEnergyCube;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverFactory extends DriverPeripheral {
|
||||
private static final Class<?> TileEntityFactory = Reflection.getClass("mekanism.common.tileentity.TileEntityFactory");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileEntityFactory;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverGenerator extends DriverPeripheral {
|
||||
private static final Class<?> TileGenerator = Reflection.getClass("mekanism.generators.common.tileentity.TileEntityGenerator");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileGenerator;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverMetallurgicInfuser extends DriverPeripheral {
|
||||
private static final Class<?> TileEntityMetallurgicInfuser = Reflection.getClass("mekanism.common.tileentity.TileEntityMetallurgicInfuser");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileEntityMetallurgicInfuser;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.occ.mods.computercraft.DriverPeripheral;
|
||||
import li.cil.occ.util.Reflection;
|
||||
|
||||
public final class DriverTeleporter extends DriverPeripheral {
|
||||
private static final Class<?> TileEntityTeleporter = Reflection.getClass("mekanism.common.tileentity.TileEntityTeleporter");
|
||||
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileEntityTeleporter;
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package li.cil.occ.mods.mekanism;
|
||||
|
||||
import li.cil.oc.api.Driver;
|
||||
import li.cil.occ.mods.IMod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public final class ModMekanism implements IMod {
|
||||
@Override
|
||||
public String getModId() {
|
||||
return "Mekanism";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
Driver.add(new DriverBasicMachine());
|
||||
Driver.add(new DriverDigitalMiner());
|
||||
Driver.add(new DriverElectrolyticSeperator());
|
||||
Driver.add(new DriverEnergyCube());
|
||||
Driver.add(new DriverFactory());
|
||||
Driver.add(new DriverGenerator());
|
||||
Driver.add(new DriverMetallurgicInfuser());
|
||||
Driver.add(new DriverTeleporter());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populate(final Map<String, Object> map, final ItemStack stack) {
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ import li.cil.occ.util.Reflection;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DriverLamp extends DriverTileEntity {
|
||||
public final class DriverLamp extends DriverTileEntity {
|
||||
private static final Class<?> TileLamp = Reflection.getClass("thermalexpansion.block.lamp.TileLamp");
|
||||
|
||||
@Override
|
||||
@ -26,17 +26,12 @@ public class DriverLamp extends DriverTileEntity {
|
||||
|
||||
public static final class Environment extends ManagedTileEntityEnvironment<TileEntity> {
|
||||
public Environment(final TileEntity tileEntity) {
|
||||
super(tileEntity, "Lamp");
|
||||
super(tileEntity, "lamp");
|
||||
}
|
||||
|
||||
@Callback
|
||||
public Object[] setColor(final Context context, final Arguments args) {
|
||||
try {
|
||||
return new Object[]{Reflection.invoke(tileEntity, "setColor", args.checkInteger(0))};
|
||||
} catch (Throwable t) {
|
||||
return new Object[]{null, "Error"};
|
||||
}
|
||||
return new Object[]{Reflection.tryInvoke(tileEntity, "setColor", args.checkInteger(0))};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ public final class ModThermalExpansion implements IMod {
|
||||
public void initialize() {
|
||||
Driver.add(new DriverEnderAttuned());
|
||||
Driver.add(new DriverEnergyHandler());
|
||||
Driver.add(new DriverLamp());
|
||||
Driver.add(new DriverEnergyInfo());
|
||||
Driver.add(new DriverLamp());
|
||||
Driver.add(new DriverRedstoneControl());
|
||||
Driver.add(new DriverSecureTile());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user