Search in sources :

Example 1 with IInsulatedRedwire

use of com.bluepowermod.api.wire.redstone.IRedwire.IInsulatedRedwire in project BluePower by Qmunity.

the class BundledPropagator method propagate.

@Override
public void propagate() {
    if ((device instanceof IPart && ((IPart) device).getParent() == null) || device.getWorld() == null)
        return;
    for (MinecraftColor c : MinecraftColor.VALID_COLORS) {
        IRedstoneDevice dev;
        if (device instanceof IInsulatedRedwire) {
            dev = (IRedstoneDevice) device;
        } else {
            dev = BundledDeviceWrapper.wrap(device, c);
        }
        if (dev == null)
            continue;
        RedstoneApi.getInstance().getRedstonePropagator(dev, side).propagate();
    }
}
Also used : MinecraftColor(com.bluepowermod.api.misc.MinecraftColor) IInsulatedRedwire(com.bluepowermod.api.wire.redstone.IRedwire.IInsulatedRedwire) IPart(uk.co.qmunity.lib.part.IPart) IRedstoneDevice(com.bluepowermod.api.wire.redstone.IRedstoneDevice)

Aggregations

MinecraftColor (com.bluepowermod.api.misc.MinecraftColor)1 IRedstoneDevice (com.bluepowermod.api.wire.redstone.IRedstoneDevice)1 IInsulatedRedwire (com.bluepowermod.api.wire.redstone.IRedwire.IInsulatedRedwire)1 IPart (uk.co.qmunity.lib.part.IPart)1