Package universalelectricity.core.item

Examples of universalelectricity.core.item.IItemElectric


                return pack;
            else if (toCharge.getItem() == null)
                return pack;
            else if (toCharge.getItem() instanceof IItemElectric)
            {
                IItemElectric item = (IItemElectric) toCharge.getItem();
               
                UEElectricPack request = PowerConversionUtils.INSTANCE.new UEElectricPack(item.getTransfer(toCharge));
                GenericPack actualTransmitted = getSmallest(pack, request);
               
                item.recharge(toCharge, actualTransmitted.toUEWatts(), true);
               
                return actualTransmitted;
            }
            else
                return pack;
View Full Code Here


                return PowerConversionUtils.INSTANCE.new EmptyPack();
            else if (toDischarge.getItem() == null)
                return PowerConversionUtils.INSTANCE.new EmptyPack();
            else if (toDischarge.getItem() instanceof IItemElectric)
            {
                IItemElectric item = (IItemElectric) toDischarge.getItem();
               
                UEElectricPack request = PowerConversionUtils.INSTANCE.new UEElectricPack(item.discharge(toDischarge, maxRequest.toUEWatts(), false));
                GenericPack actualTransmitted = getSmallest(maxRequest, request);
               
                item.discharge(toDischarge, actualTransmitted.toUEWatts(), true);
               
                return actualTransmitted;
            }
            else
                return PowerConversionUtils.INSTANCE.new EmptyPack();
View Full Code Here

TOP

Related Classes of universalelectricity.core.item.IItemElectric

Copyright © 2018 www.massapicom. 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.