Jump to content

Cofh/RedstoneFlux api


shadoskill

Recommended Posts

I am trying to create a mod that will convert EU to RF, I know it can get unbalanced its for personal use. I can get my block to accept ic2 EU and store it just fine. I can get RF Cables from EnderIO to connect to my block, but I cant get it to output RF.

Is there any form of tutorial for RF api that I could get a link to?

 

This is my TileEntity

http://pastebin.com/fmgN2KvS

 

If its a case of me doing something wrong please let me know, its my first time working with mod api's :/

Link to comment
Share on other sites

Please read javadoc on IEnergyHandler. It's written pretty well.

In particular extractEnergy/receiveEnergy should return the amount of energy being transferred out/in. And you're returning 0 from extractEnergy. No wonder you're getting no RF output.

Please also note that EU and RF aren't 1:1. AFAIK the ratio is usually 4 EU to 10 RF.

 

Link to comment
Share on other sites

Please read javadoc on IEnergyHandler. It's written pretty well.

In particular extractEnergy/receiveEnergy should return the amount of energy being transferred out/in. And you're returning 0 from extractEnergy. No wonder you're getting no RF output.

Please also note that EU and RF aren't 1:1. AFAIK the ratio is usually 4 EU to 10 RF.

 

Iv tried a number of things, returning anything for extractEnergy dosen't change anything.

 

As for the javadoc, unless this is what you are speaking of.

/**
 * Remove energy from an IEnergyHandler, internal distribution is left entirely to the IEnergyHandler.
 * 
 * @param from
 *            Orientation the energy is extracted from.
 * @param maxExtract
 *            Maximum amount of energy to extract.
 * @param simulate
 *            If TRUE, the extraction will only be simulated.
 * @return Amount of energy that was (or would have been, if simulated) extracted.
 */

That doesn't help much at all, sure I understand what each one does but I can't get anything to output.

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.