Examples of toUEPack()


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

                            GenericPack thisRequest = PowerConversionUtils.INSTANCE.new UEElectricPack(Math.min(this.getOutputCap() / 2, this.getEnergyStored()) / this.getVoltage(), this.getVoltage());
                            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
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.