Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Forge Energy API
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
dragonwhisper92

[1.12.2] Forge Energy API

By dragonwhisper92, April 27, 2018 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

dragonwhisper92    1

dragonwhisper92

dragonwhisper92    1

  • Tree Puncher
  • dragonwhisper92
  • Members
  • 1
  • 30 posts
Posted April 27, 2018

So im not sure how this api works? can someone point me towards the documentation, also is it possible to create my own energy type, by using this?

  • Quote

Share this post


Link to post
Share on other sites

Ugdhar    88

Ugdhar

Ugdhar    88

  • Dragon Slayer
  • Ugdhar
  • Members
  • 88
  • 763 posts
Posted April 28, 2018

http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/

 

You would want to use the IEnergyStorage capability.

 

I guess I'm confused about creating your own energy type, I guess my question is, isn't the point of using the existing capability so you do not have to create your own energy type? If you use Forge Energy, your mod/machine/whatever will work with other mods/machines/power sources that provide/consume Forge Energy. I guess it's up to you how much energy your thing creates, and/or what you call it, but "under the hood", it would still be Forge Energy.

 

Read the docs, search the forums for some other people asking about it, and try some code. I would advise posting your code to a github repository, then if you get stuck, you can link it here, along with complete fml-client-latest.log output, and someone will likely try to help you out.

  • Quote

Share this post


Link to post
Share on other sites

dragonwhisper92    1

dragonwhisper92

dragonwhisper92    1

  • Tree Puncher
  • dragonwhisper92
  • Members
  • 1
  • 30 posts
Posted April 28, 2018
6 hours ago, Ugdhar said:

http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/

Thx

6 hours ago, Ugdhar said:

I guess I'm confused about creating your own energy type, I guess my question is, isn't the point of using the existing capability so you do not have to create your own energy type?

yes but i was hoping it would just help making a custom type easier

 

6 hours ago, Ugdhar said:

If you use Forge Energy, your mod/machine/whatever will work with other mods/machines/power sources that provide/consume Forge Energy.

yeah this i dont want since my energy is more like a magic energy rather then the common type

6 hours ago, Ugdhar said:

 I would advise posting your code to a github repository, then if you get stuck, you can link it here, along with complete fml-client-latest.log output, and someone will likely try to help you out.

Thx will look into github have never used it so we will see

  • Quote

Share this post


Link to post
Share on other sites

jabelar    591

jabelar

jabelar    591

  • Reality Controller
  • jabelar
  • Members
  • 591
  • 3266 posts
Posted April 28, 2018
3 minutes ago, dragonwhisper92 said:

Thx will look into github have never used it so we will see

 

For using git I suggest using a graphical user interface called SourceTree. It is free (and ad-free). I have tutorial here on setting it up (along with github): http://jabelarminecraft.blogspot.com/p/minecraft-forge-publishing-to-github.html

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6693

diesieben07

diesieben07    6693

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6693
  • 45741 posts
Posted April 28, 2018
31 minutes ago, dragonwhisper92 said:

yeah this i dont want since my energy is more like a magic energy rather then the common type

Then you do not need to use the Forge energy API. The API's sole purpose is to provide interoperability.

  • Quote

Share this post


Link to post
Share on other sites

dragonwhisper92    1

dragonwhisper92

dragonwhisper92    1

  • Tree Puncher
  • dragonwhisper92
  • Members
  • 1
  • 30 posts
Posted April 28, 2018
6 hours ago, jabelar said:

 

For using git I suggest using a graphical user interface called SourceTree. It is free (and ad-free). I have tutorial here on setting it up (along with github): http://jabelarminecraft.blogspot.com/p/minecraft-forge-publishing-to-github.html

Hmm okay thx will look into it

  • Quote

Share this post


Link to post
Share on other sites

dragonwhisper92    1

dragonwhisper92

dragonwhisper92    1

  • Tree Puncher
  • dragonwhisper92
  • Members
  • 1
  • 30 posts
Posted April 28, 2018
6 hours ago, diesieben07 said:

Then you do not need to use the Forge energy API. The API's sole purpose is to provide interoperability.

Yeah that's what i thought i was just hoping it had more functionality

 

Where should i start learning about creating my own energy?

  • Quote

Share this post


Link to post
Share on other sites

jabelar    591

jabelar

jabelar    591

  • Reality Controller
  • jabelar
  • Members
  • 591
  • 3266 posts
Posted April 29, 2018
3 hours ago, dragonwhisper92 said:

Yeah that's what i thought i was just hoping it had more functionality

 

Where should i start learning about creating my own energy?

Programming is just logic. So if you want to have your own energy system, you just need the ability to generate, store, transfer and consume a "quantity". You can do that with your own fields, but Minecraft Forge provides the capability system which helps because capabilities can be attached to players, entities, tile entities and items which is all the places you probably need energy functionality.

 

There are various tutorials out there. Here is one that implements a "mana" (magical energy) capability: https://www.planetminecraft.com/blog/forge-tutorial-capability-system/

 

And some other info on capabilities:

  • https://gist.github.com/williewillus/c8dc2a1e7963b57ef436c699f25a710d
  • http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
  • Choonster's example Capability implementation (API, implementation)

 

 

 

 

  • Quote

Share this post


Link to post
Share on other sites

dragonwhisper92    1

dragonwhisper92

dragonwhisper92    1

  • Tree Puncher
  • dragonwhisper92
  • Members
  • 1
  • 30 posts
Posted April 30, 2018
On 29/04/2018 at 3:01 AM, jabelar said:

Programming is just logic. So if you want to have your own energy system, you just need the ability to generate, store, transfer and consume a "quantity". You can do that with your own fields, but Minecraft Forge provides the capability system which helps because capabilities can be attached to players, entities, tile entities and items which is all the places you probably need energy functionality.

 

There are various tutorials out there. Here is one that implements a "mana" (magical energy) capability: https://www.planetminecraft.com/blog/forge-tutorial-capability-system/

 

And some other info on capabilities:

  • https://gist.github.com/williewillus/c8dc2a1e7963b57ef436c699f25a710d
  • http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
  • Choonster's example Capability implementation (API, implementation)

 

 

 

 

Thx will look through these now

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • darkgreenminer
      [1.12.2] Multiple Structure Generation

      By darkgreenminer · Posted 12 minutes ago

      Someone else had that same problem of their mod only spawning the last structure added to WorldGenCustomStructures, and I remembered that the solution I found was what a commentor named Redstone Tim mentioned, that in WorldGenStructure you have to remove 'static'.  I'm happy to email my version of these two classes to you if you want to have a look.  It took me hours and hours to get them working.  I have no idea what might cause the cascading gen lag, but fixing the multiple structure problem might help.    
    • troyvs
      problems starting with modding

      By troyvs · Posted 56 minutes ago

      what command did you run to set up?  
    • MightyAhmed
      Immediate Crash On Any Version Of Forge

      By MightyAhmed · Posted 1 hour ago

      ok so its been a while but it was workling fine before somehow but now minecraft still works it just freezes and lagspikes every 5 seconds please help me on this issue i cant find anything on the internet also ihave 4GB ram total in my computer and i have dedicated 2gb ram to minecraft in the JVM arguments section also i have 125 mods installed.
    • deanvangreunen
      Custom Armor Item - Help - MC/Forge 1.14.4/1.14.3

      By deanvangreunen · Posted 2 hours ago

      Hello, I'm in progress of making a Minecraft 1.14.4 Mod using Forge. Needing some help, Could you please look at the following Class File and Explain what I'm doing wrong or what I should be doing?.   The "OnArmorTick" and other ".....Tick" functions don't work.   My intent: - if water is below and near player by 1 block while the boots are on then turn the water into ice. I'm trying to implement "Frost Walking Boots"   Code: - FrostBootsItem.java <- File I need help with - My Project Repo  <- Repo, So if you want to see how my mod is setup. (includes my world saves, etc)   Dev Details: - Minecraft Version: 1.14.4 - Minecraft Snapshot: 20191020-1.14.3 - Forge Version: 1.14.4-28.1.61   Notes: - I've followed a tutorial for 1.14.4 modding by MCJty on youtube (The author of RFTools) - I'm new to minecraft modding. I have expeirenced as a software developer/engineer.   ❤️❤️❤️❤️❤️❤️❤️❤️❤️  ❤️  .Thanks in advance. ❤️  ❤️❤️❤️❤️❤️❤️❤️❤️❤️ 
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 2 hours ago

      please see the screenshoot above.
  • Topics

    • Merthew
      8
      [1.12.2] Multiple Structure Generation

      By Merthew
      Started November 7, 2018

    • coolian
      1
      problems starting with modding

      By coolian
      Started October 9

    • MightyAhmed
      83
      Immediate Crash On Any Version Of Forge

      By MightyAhmed
      Started November 10

    • deanvangreunen
      0
      Custom Armor Item - Help - MC/Forge 1.14.4/1.14.3

      By deanvangreunen
      Started 2 hours ago

    • DragonITA
      48
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started December 9

  • Who's Online (See full list)

    • bitman
    • LTNightshade
    • GttiqwT
    • ricoc90
    • darkgreenminer
    • Choonster
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Forge Energy API
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community