Examples of toUEWatts()


Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

    {
        GenericPack givenEnergy = PowerConversionUtils.INSTANCE.new IC2Pack(amount, 1);
        double rejects = 0;
        GenericPack neededEnergy = PowerConversionUtils.INSTANCE.new UEElectricPack(this.getMaxEnergyStored() - this.energyStored);
       
        if (givenEnergy.toUEWatts() < neededEnergy.toUEWatts())
        {
            this.energyStored += givenEnergy.toUEWatts();
        }
        else if (givenEnergy.toUEWatts() > neededEnergy.toUEWatts())
        {
View Full Code Here

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

       
        if (givenEnergy.toUEWatts() < neededEnergy.toUEWatts())
        {
            this.energyStored += givenEnergy.toUEWatts();
        }
        else if (givenEnergy.toUEWatts() > neededEnergy.toUEWatts())
        {
            this.energyStored += neededEnergy.toUEWatts();
            rejects = givenEnergy.toEU() - neededEnergy.toEU();
        }
       
View Full Code Here

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

        {
            this.energyStored += givenEnergy.toUEWatts();
        }
        else if (givenEnergy.toUEWatts() > neededEnergy.toUEWatts())
        {
            this.energyStored += neededEnergy.toUEWatts();
            rejects = givenEnergy.toEU() - neededEnergy.toEU();
        }
       
        return rejects;
    }
View Full Code Here

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

                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

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

                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

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

                            GenericPack targetRequest = PowerConversionUtils.INSTANCE.new UEElectricPack(target.getRequest(ForgeDirection.UNKNOWN));
                           
                            GenericPack actualSent = PowerUtils.CommonUtil.getSmallest(thisRequest, targetRequest);
                           
                            target.receiveElectricity(actualSent.toUEPack(Math.min(this.getVoltage(), target.getVoltage()), ElectricUnit.VOLTAGE), true);
                            this.setEnergyStored(this.getEnergyStored() - actualSent.toUEWatts() * 2);
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

    {
        GenericPack givenEnergy = PowerConversionUtils.INSTANCE.new IC2Pack(amount, 1);
        double rejects = 0;
        GenericPack neededEnergy = PowerConversionUtils.INSTANCE.new UEElectricPack(this.getMaxEnergyStored() - this.energyStored);
       
        if (givenEnergy.toUEWatts() < neededEnergy.toUEWatts())
        {
            this.energyStored += givenEnergy.toUEWatts();
        }
        else if (givenEnergy.toUEWatts() > neededEnergy.toUEWatts())
        {
View Full Code Here

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

       
        if (givenEnergy.toUEWatts() < neededEnergy.toUEWatts())
        {
            this.energyStored += givenEnergy.toUEWatts();
        }
        else if (givenEnergy.toUEWatts() > neededEnergy.toUEWatts())
        {
            this.energyStored += neededEnergy.toUEWatts();
            rejects = givenEnergy.toEU() - neededEnergy.toEU();
        }
       
View Full Code Here

Examples of electricexpansion.common.misc.PowerConversionUtils.GenericPack.toUEWatts()

        {
            this.energyStored += givenEnergy.toUEWatts();
        }
        else if (givenEnergy.toUEWatts() > neededEnergy.toUEWatts())
        {
            this.energyStored += neededEnergy.toUEWatts();
            rejects = givenEnergy.toEU() - neededEnergy.toEU();
        }
       
        return rejects;
    }
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.