• Stars
    star
    531
  • Rank 83,526 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create Minecraft servers with a powerful, stable, and high level JavaScript API.

flying-squid

NPM version Build Status Discord Gitter Irc

Create Minecraft servers with a powerful, stable, and high level JavaScript API.

Features

  • Support for Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15 and 1.16
  • Players can see the world
  • Players see each other in-game and in tab
  • Digging
  • Placing blocks
  • Player movement
  • World generation
  • Anvil loading
  • Multi-world

Building / Running

Before running or building it is recommended that you configure the server in config/settings.json

npm install
node app.js

You can also install flying-squid globally with sudo npm install -g flying-squid and then run it with flying-squid command.

Docker

Docker allows for a higher level of isolation, compatibility and consistency. You can learn how to install Docker here.

Quick start a simple server to test out flying-squid:

docker run -p 25565:25565 prismarinejs/flying-squid

With specific configuration and a container name:

docker run -p 25565:25565 -v $(pwd)/config:/config --name my-flying-squid prismarinejs/flying-squid

docker-compose is useful to quickly launch & stop a single container with a specific configuration.

docker-compose.yaml:

version: '3.8'

services:
  flying-squid:
    image: prismarinejs/flying-squid
    volumes:
       - ${PWD}/config:/config
    ports:
      - "25565:25565"
volumes:
  flying-squid:
docker-compose -f path/to/docker-compose.yaml up

Or do it all locally:

docker build -t local-flying-squid .
docker run -p 25565:25565 local-flying-squid

or

docker-compose up

World generation

There are several modules than can be used to generate the world. The default one is called diamond-square

  • node-voxel-worldgen: a voxel world generator written in Rust, compatible with flying-squid and allows basic minecraft-like generation including caves.
  • diamond-square: a diamond square minecraft generation.
  • superflat: a superflat worldgen with configurable blocks and biome.

To install a world generation, all you have to do is npm install it and then change the generation option in settings.json.

Plugins

  • flying-squid-irc a bridge between a irc chan and the minecraft server. Currently used between our test server (rom1504.fr) and our gitter room (through the official gitter irc bridge)
  • flying-squid-schematic Flying-squid plugin providing /listSchemas and /loadSchema commands. You can add schema through a simple http api and then add them in your world by just calling /loadSchema in game.
  • flying-squid-essentials Plugin that in a future will be like Essentials of bukkit/spigot. All the basic commands that a server should have
  • squidcord a bridge between a discord channel and the minecraft server.
  • authme an auth plugin for online-mode=false servers.

Documentation

For development see the API documentation, CONTRIBUTE.md and HISTORY.md

Using as a lib

flying-squid is also a server lib. Here is a basic example of usage:

const mcServer = require('flying-squid')

mcServer.createMCServer({
  'motd': 'A Minecraft Server \nRunning flying-squid',
  'port': 25565,
  'max-players': 10,
  'online-mode': true,
  'logging': true,
  'gameMode': 1,
  'difficulty': 1,
  'worldFolder': 'world',
  'generation': {
    'name': 'diamond_square',
    'options': {
      'worldHeight': 80
    }
  },
  'kickTimeout': 10000,
  'plugins': {

  },
  'modpe': false,
  'view-distance': 10,
  'player-list-text': {
    'header': 'Flying squid',
    'footer': 'Test server'
  },
  'everybody-op': true,
  'max-entities': 100,
  'version': '1.16.1'
})

You can add server plugins and player plugins in your package, following CONTRIBUTE.md.

For further examples, see the examples page.

Contributors

  • @mhsjlw creator of flying-squid
  • @roblabla for helping out with the protocols
  • @rom1504 for massive contributions to the code
  • @demipixel
  • The PrismarineJS team for creating prismarine-chunk and node-minecraft-protocol
  • wiki.vg for documenting minecraft protocols
  • All of our other awesome contributors!

More Repositories

1

mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
JavaScript
4,956
star
2

node-minecraft-protocol

Parse and serialize minecraft packets, plus authentication and encryption.
JavaScript
1,206
star
3

minecraft-data

Language independent module providing minecraft data for minecraft clients, servers and libraries.
JavaScript
657
star
4

prismarine-web-client

Minecraft web client running in your browser
JavaScript
437
star
5

bedrock-protocol

Minecraft Bedrock protocol library, with authentication and encryption
JavaScript
311
star
6

prismarine-viewer

Web based viewer for servers and bots
JavaScript
248
star
7

mineflayer-pathfinder

Pathfinding plugin that gives bot the ability to go from A to B
JavaScript
213
star
8

mineflayer-statemachine

A state machine plugin for Mineflayer to aid in designing more complex behavior trees.
TypeScript
108
star
9

node-minecraft-data

Provide easy access to minecraft-data in node.js
JavaScript
100
star
10

prismarine-nbt

An NBT parser for node-minecraft-protocol
JavaScript
93
star
11

prismarine-chunk

A class to hold chunk data for Minecraft
JavaScript
61
star
12

mineflayer-navigate

mineflayer plugin which gives bots a high level 3d navigating API using A*
JavaScript
59
star
13

minecraft-assets

Provide minecraft assets along with json files that help to use them.
59
star
14

node-minecraft-protocol-forge

Plugin to add FML/Forge client support (including auto-versioning) to node-minecraft-protocol
JavaScript
52
star
15

mineflayer-pvp

Adds support for basic PVP and PVE to Mineflayer bots.
TypeScript
50
star
16

prismarine-auth

Microsoft/Xbox Live authentication
JavaScript
48
star
17

node-vec3

3d vector math with robust unit tests
JavaScript
42
star
18

node-yggdrasil

Node.js library to interact with Mojang's authentication system, known as Yggdrasil
JavaScript
40
star
19

prismarine-windows

Represent minecraft windows
JavaScript
37
star
20

mineflayer-radar

(unmaintained) A plugin to give you a web-based radar interface to your mineflayer bot.
JavaScript
36
star
21

mineflayer-collectblock

A simple utility plugin for Mineflayer that add a higher level API for collecting blocks.
TypeScript
36
star
22

prismarine-physics

Provide the physics engine for minecraft entities
JavaScript
35
star
23

prismarine-world

The core implementation of worlds for prismarine
JavaScript
34
star
24

prismarine-chat

A parser for a minecraft chat message
JavaScript
33
star
25

numerous-alpaca

A Minecraft Bedrock Edition server in JavaScript
JavaScript
29
star
26

prismarine-block

Represent a minecraft block with its associated data
JavaScript
29
star
27

prismarine-server

NodeJS Game Server compatible with Minecraft Client
JavaScript
26
star
28

mineflayer-scaffold

mineflayer plugin to build or break blocks to get to a certain point
JavaScript
26
star
29

prismarine-proxy

Provide features to build proxies using Prismarine modules
JavaScript
25
star
30

dazed-sheep

A Minecraft Classic server in JavaScript
JavaScript
24
star
31

MineflayerArmorManager

TypeScript
24
star
32

node-minecraft-wrap

Download and wrap the vanilla minecraft server and client in node.js
JavaScript
24
star
33

prismarine-entity

Represent a minecraft entity
JavaScript
23
star
34

mineflayer-builder

JavaScript
22
star
35

prismarine-schematic

Read and write schematic of any minecraft version, provide them in a convenient and stable API
JavaScript
21
star
36

mineflayer-tool

A tool/weapon selection Mineflayer plugin for automatically selecting the best tool to use for a specific task.
TypeScript
20
star
37

prismarine-item

Represent a minecraft item with its associated data
JavaScript
19
star
38

node-minecraft-assets

Provide minecraft assets in node.js
JavaScript
17
star
39

node-mojangson

A mojangson parser written in node.js
JavaScript
16
star
40

bedrock-provider

Minecraft bedrock level provider for disk and network with caching support
TypeScript
14
star
41

prismarine-contribute

What is PrismarineJS and how to contribute
13
star
42

prismarine-provider-anvil

Anvil Storage Provider implementation.
JavaScript
13
star
43

prismarine-gameplay

A high level gameplay API for making Mineflayer bots.
TypeScript
12
star
44

prismarinejs.github.io

https://prismarinejs.github.io
JavaScript
11
star
45

minecraft-packets

Stores minecraft packets to test implementation of the minecraft protocol
11
star
46

prismarine-realms

Library for interacting with Minecraft Realms
JavaScript
11
star
47

minecraft-wiki-extractor

Extract structured data from the minecraft wiki
JavaScript
10
star
48

prismarine-recipe

Represent minecraft recipes
JavaScript
10
star
49

minecraft-inventory-gui

Render minecraft inventory GUIs in the browser and (soon) headless
JavaScript
10
star
50

diamond-square

A diamond square minecraft generation
JavaScript
9
star
51

minecraft-chunk-dumper

Dumps chunks for any minecraft version
JavaScript
9
star
52

minecraft-classic-protocol

[En][de]code Minecraft 0.30c packets
JavaScript
8
star
53

minecraft-jar-extractor

Extract structured data from the minecraft jar
JavaScript
8
star
54

prismarine-template

A template repository to make it easy to create new prismarine repo
JavaScript
7
star
55

minecraft-data-generator-server

Java
7
star
56

speedrun-challenge-ssgp

JavaScript
7
star
57

mineflayer-cmd

A command handler plugin for Mineflayer.
TypeScript
6
star
58

prismarine-registry

JavaScript
6
star
59

prismarine-biome

Represent a minecraft biome with its associated data
JavaScript
5
star
60

flying-squid-modpe

Flying squid modpe api
JavaScript
4
star
61

mineflayer-test-api

An automated testing library for Mineflayer and Mineflayer plugins with CI/CD.
JavaScript
4
star
62

minecraft-classic-protocol-extension

A plugin for minecraft-classic-protocol that adds experimental and bleeding-edge CPE features
JavaScript
4
star
63

auto-sheep

Automatically update and start dazed-sheep without a githook!
Shell
4
star
64

McDataExtracting

Extract block collision shapes to JSON using Fabric mod loader
Java
4
star
65

node-minecraft-packets

Access minecraft packets examples in node
JavaScript
4
star
66

prismarine-yggdrasil

An implementation of Minecraft's yggdrasil login API
JavaScript
3
star
67

prismarine-rng

JavaScript
3
star
68

gdmc-challenge-2021

The PrismarineJS entry for the 2021 Generative in Design Minecraft Competition.
JavaScript
3
star
69

auto-alpaca

Automatically update and start numerous-alpaca without a githook!
Shell
3
star
70

mineflayer-gptj

JavaScript
3
star
71

prismarine-packet-dumper

Dump minecraft packets
JavaScript
3
star
72

prismarine-updates

Summary of work being done in PrismarineJS modules and user modules, useful for communication
3
star
73

mcdevs-wiki-extractor

Extract structured data from the mcdevs wiki
JavaScript
3
star
74

prismarine-world-sync

A sync proxy to prismarine-world
JavaScript
3
star
75

burger-extractor

Convert burger to minecraft-data
JavaScript
3
star
76

minecraft-assets-pixel-perfection

Assets for the Pixel Perfection pack
GLSL
2
star
77

entity-model-extractor

JavaScript
2
star
78

prismarine-design

Discuss about design and big refactoring that can affects many modules
2
star
79

minecraft-data-auto-updater

Automatically run minecraft data extractors and create pull request for minecraft-data
2
star
80

marketing-and-media

Media/Marketing Materials
1
star
81

prismarine-provider-raw

Raw (prismarine-chunk based) Storage Provider implementation.
JavaScript
1
star
82

prismarine-meta

Make it easy to do chores and maintenance work using the meta package
JavaScript
1
star
83

prismarine-repo-actions

Github Action implementing issue/PR comment commands for repo automation
JavaScript
1
star