EmeraldJelly Posted May 1, 2018 Posted May 1, 2018 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 Quote
jabelar Posted May 1, 2018 Posted May 1, 2018 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. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
EmeraldJelly Posted May 1, 2018 Author Posted May 1, 2018 Thanks so much! Do you think you can link or refer a tutorial to me? Quote
jabelar Posted May 1, 2018 Posted May 1, 2018 47 minutes ago, EmeraldJelly said: Thanks so much! Do you think you can link or refer a tutorial to me? This one might help: https://www.planetminecraft.com/blog/forge-tutorial-capability-system/ Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
EmeraldJelly Posted May 1, 2018 Author Posted May 1, 2018 1 minute ago, jabelar said: This one might help: https://www.planetminecraft.com/blog/forge-tutorial-capability-system/ Thanks Quote
Recommended Posts
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.