Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/29/17 in all areas

  1. 4) In that case, IBattery should extend IChargable or you have to interfaces IChargable and IDrainalbe (or whatever) and a battery just implements both. But in any case, you should really learn to use capabilities. It really isn't that difficult. This is pretty much all you need: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/capability/RawMechanicalPowerHandler.java Only instead of IMechanicalPower you'll use whatever the interface is that Forge supplies for Energy. You'd then set up some kind of object for the energy storage (look at the ItemStackHandler for inspiration on how to handle it) and then supply that object instance via getCapability. You might need this, I'm not sure: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/capability/SimpleCapabilityProvider.java
    1 point
×
×
  • Create New...

Important Information

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