Giter VIP home page Giter VIP logo

scratch2mcpi's Introduction

Scratch2MCPI(Scratch2MinecraftPi)

日本語の情報

With Scratch2MCPI, you can control Minecraft Pi Edition from Scratch on Raspberry Pi.

On the latest 2.0, it supports Minecraft Graphics Turtle.

Demo Movie on YouTube

Tested Environments

  • NOOBS 2.9.0(2018-10-11)

Installation

Install Minecraft Pi Edition if you don't have. You can either install from http://pi.minecraft.net/?p=68 or use the following installation script.(If you install Raspbian OS from the latest NOOBS, Minecraft Pi may be pre-installed. If the Minecraft Pi icon exists on the Desktop, skip this step.)

# curl http://scratch2mcpi.github.io/mcpi.sh | sh

Install Scratch2MCPI

# curl http://scratch2mcpi.github.io/install.sh | sh

Getting Started

  1. Start Minecraft, click "Start Game", then "Create New". Wait until the new world is generated.
  2. After the world is generated, double click Scratch2MCPI icon to start Scratch and Scratch2MCPI.
  3. On Scratch, click Green flag, and run the script. "hello minecraft" should be displayed on Minecraft chat window.

How to use

You can send the following commands by "broadcast" block of Scratch.

  • hello_minecraft: Send "hello minecraft" message to chat section.
  • setPos: Move the player to the position specified by Scratch variables: "mcpiX", "mcpiY", "mcpiZ".
  • setBlock: Place the block at the position specified by Scratch variables: "mcpiX", "mcpiY", "mcpiZ". The block type and block data can be specified by Scratch variables: "blockTypeId" and "blockData".
  • getPos: Get the current position of the player. The position values can be gotten by Scratch sensor values: "PlayerX", "PlayerY", "PlayerZ".
  • getHeight: Get the y position of the highest block at the position specified by Scratch variables: "mcpiX" and "mcpiZ". The y postion can be gotten by Scratch sensor value "posY".
  • pollBlockHits: Get the block event information of the last block hit by the player. The event info values can be gotten by Scratch sensor values: "blockEventX", "blockEventY", "blockEventZ", "blockEventFace", "blockEventEntityId".
  • reset: [WARNING] Reset the world. This will delete clean up the world, so please be aware to use it.

Reference

Requirements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.