Bedrock Power API Library, allows other modders to implement a shared power system. This is a NPM library not an addon.
⚠️ : This Library requires Experimental Beta Features in Minecraft.
- In your addon run:
npm i https://github.com/nathanswanson/powerapi.git
When creating a custom block, extend the
export class BlockQuarry extends PowerConsumer {
bufferCapacity = 4096; //How much power this block can store
consumptionRate = 5; //How much power should be consumed every run()
run() {
//one tick (for quarry this would be mining one block)
}
}- Reduce dynamic property access call.
- Implement block dynamic property when it is released from Mojang.
- Cables - currently blocks have to be adjacent.