Posted April 13, 201510 yr So I'm creating a mod that has a power system in it and I'm having an issue creating conduits. I'm using the RedstoneFlux-API and power will bounce back and forth between the capacitor (storage entity) and the conduits. I figure its the way I'm transferring power between entities and wanted to come here to see if any one had a better way to do it than I have. This is the way I'm passing power between entities: @Override public void updateEntity() { if(!worldObj.isRemote) { LogHelper.info(storage.getEnergyStored()); for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { TileEntity entity = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ); if (entity instanceof IEnergyHandler) { storage.extractEnergy(((IEnergyHandler) entity).receiveEnergy(dir.getOpposite(), storage.extractEnergy(storage.getMaxExtract(), true), false), false); } } } } Feel free to ask for more info. My GitHub for this project: https://github.com/Tikaji/HaloCraft
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.