Skip navigation links

Package buildcraft.api.mj

Contains the Minecraft Joule API (shortened to Mj), reborn.

See: Description

Package buildcraft.api.mj Description

Contains the Minecraft Joule API (shortened to Mj), reborn.

MJ is stored in the long type, as micro Mj - so you need a long storing a value of 1 million to have a single MJ. All power should be passed around in code as micro Mj (10 ^ -6 of an Mj), but shown to the player as full MJ - so divided by 1 million.

A single MJ as a constant is available in MjAPI.ONE_MINECRAFT_JOULE, and a player formatter MjAPI.formatMj(long)

Capability's

MJ should be exposed from tile entities and entities via the forge capability system as one of the following types:

Note that you *must* expose the base interface types as capabilities as well as the top type so if you have an instance of IMjReceiver then you must return it for both of the capability's MjAPI.CAP_CONNECTOR and MjAPI.CAP_RECEIVER. A simple way to do this is provided in MjCapabilityHelper.
Skip navigation links