Examples of EnergySourceAdjacent


Examples of micdoodle8.mods.galacticraft.api.power.EnergySource.EnergySourceAdjacent

                {
                    TileBaseUniversalElectricalSource electricalTile = (TileBaseUniversalElectricalSource) tile;

                    if (electricalTile.storage.getEnergyStoredGC() > 0)
                    {
                        EnergySourceAdjacent source = new EnergySourceAdjacent(ForgeDirection.getOrientation(this.facing ^ 1));
                        float toSend = Math.min(electricalTile.storage.getMaxExtract(), electricalTile.storage.getEnergyStoredGC());
                        float transmitted = this.getTarget().receiveEnergyGC(new EnergySourceWireless(Lists.newArrayList((ILaserNode) this)), toSend, false);
                        electricalTile.extractEnergyGC(source, transmitted, false);
                    }
                }
            }

            if (this.modeReceive == ReceiverMode.RECEIVE.ordinal() && this.storage.getEnergyStoredGC() > 0)
            {
                TileEntity tileAdj = this.getAttachedTile();

                if (tileAdj instanceof TileBaseUniversalElectrical)
                {
                    TileBaseUniversalElectrical electricalTile = (TileBaseUniversalElectrical) tileAdj;
                    EnergySourceAdjacent source = new EnergySourceAdjacent(ForgeDirection.getOrientation(this.facing ^ 1));
                    this.storage.extractEnergyGC(electricalTile.receiveEnergyGC(source, this.storage.getEnergyStoredGC(), false), false);
                }
                else
                {
                    ForgeDirection inputAdj = ForgeDirection.getOrientation(this.facing);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.