Skip to content

nhajratw/minecraft_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft API for the Raspberry Pi

A Ruby API for the Raspberry Pi version of minecraft

Setup

Prerequisites :

Install the gem using the classic command :

gem install minecraft_api

Then, setup your code by importing the minecraft_api gem and connecting to your game.

require 'minecraft_api'

# hostname should be the ip or hostname of your server.
# port defaults to 4711, but you can override it.
api = MinecraftApi.new(hostname)

Playing around

# Set a block somewhere
api.world.block(5,10,15,Block::WOOD)

# Teleport the player away
api.player.go(20,40,60)

# Place a colored wool
my_wool = Wool.new(Color.PURPLE)
api.world.block(1,5,10,my_wool)

About

A Ruby API for the Raspberry Pi version of minecraft

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages