JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q36463F
  • License MIT

Code minecraft education edition using nodeJS

Package Exports

  • codeconnection
  • codeconnection/codeController.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (codeconnection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Code connection for Minecraft Education Edition clone using NodeJS.

To turn on the server run:

(npx) codeserver-start

To turn off the server run:

(npx) codeserver-stop

The server runs an expressJS server (port 3001) and a websocket (port 3000). Minecraft connects to port 3000 using the /connect localhost:3000 slash command.

The player script automatically sends http requests to express that relays them to Minecraft. Minecraft responds (eventually) with some JSON data that is parsed with true/false/useful data being sent back to the player.


Scripts should start with

const { agent, d } = require('codeconnection')

agent - this gives access to the agent to send commands d - this gives quick access to direction commands LEFT, RIGHT, UP, DOWN, FORWARD, BACK

Possible agent commands:

agent.move() agent.turn() .. and others