Jump to content

Recommended Posts

Posted

Hey, so im looking to create a new type of energy using forges energy system thingy...

 

To give some background as to what I mean exactly here's an example:

 

EU is an Type of Energy, RF, AE, and so on...

 

I want to create my OWN type of energy and make it so my blocks only accept it. How do I do this and yes I checked http://jabelarminecraft.blogspot.com/p/minecraft.html and while it is helpful, it doesn't really show me how I can do this specifically. The part im looking for that blog post was vague about it. Specifically LexManos' Explaination on it: 

  • "IF modders want to be discriminating and create sub-energy systems then they can. It's as simple as 'public interface ThaumcraftMana extends IEnergyStorage{}' Caps.register(ThamcraftMana.class...)"

 

Say for instance I want to create something called "ArcaneFlux" how would I go around doing that from the start. The only code I have so far for it is an interface but I dont really know how I can well.. use it.

 

Here is the code I guess: 

 

package emeraldjelly.mystica.api;

import net.minecraftforge.energy.IEnergyStorage;

public interface IArcaneFlux extends IEnergyStorage {}

 

 

Thanks, EmeraldJelly

Posted

The "problem" with the Forge Engery API is that for your case you don't want your energy interchangeable with other energies, whereas FE was designed specifically to help interchange between energies. I believe it is possible to use FE to discriminate the energy type, probably by testing in the getCapability() methods, but is an added complexity.

 

I think the easiest way is to simply make your own capability. There are tutorials for capabilities like mana. An energy system sounds fancy but really only requires an interface for storing energy with some methods for generating, transferring and consuming the energy.

 

In fact you can probably just copy an existing energy system, maybe even the FE system. I don't mean use an existing energy system, but rather make your own capability that has similar code it so it is separate.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.