Skip to content

nathanswanson/powerapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bedrock Power API

Bedrock Power API Library, allows other modders to implement a shared power system. This is a NPM library not an addon.

Table of Contents

Installation

⚠️ : This Library requires Experimental Beta Features in Minecraft.

  1. In your addon run: npm i https://github.com/nathanswanson/powerapi.git

Usage

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)
  }
}

Future Plans

  • Reduce dynamic property access call.
  • Implement block dynamic property when it is released from Mojang.
  • Cables - currently blocks have to be adjacent.

About

Minecraft Bedrock Power Library API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors